diff --git a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/CachedObjectStorage/Memcache.php b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/CachedObjectStorage/Memcache.php
index f1fc43c4..cf6c6719 100644
--- a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/CachedObjectStorage/Memcache.php
+++ b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/CachedObjectStorage/Memcache.php
@@ -186,7 +186,7 @@ public function __construct(PHPExcel_Worksheet $parent, $arguments) {
// Set a new Memcache object and connect to the Memcache server
$this->_memcache = new Memcache();
- if (!$this->_memcache->addServer($memcacheServer, $memcachePort, false, 50, 5, 5, true, array($this, 'failureCallback')) {
+ if (!$this->_memcache->addServer($memcacheServer, $memcachePort, false, 50, 5, 5, true, array($this, 'failureCallback'))) {
throw new Exception('Could not connect to Memcache server at '.$memcacheServer.':'.$memcachePort);
}
$this->_cacheTime = $cacheTime;
@@ -197,7 +197,7 @@ public function __construct(PHPExcel_Worksheet $parent, $arguments) {
public function failureCallback($host, $port) {
- throw new Exception('memcache '.$host.':'.$port' failed');
+ throw new Exception('memcache '.$host.':'.$port.' failed');
}
diff --git a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Calculation.php b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Calculation.php
index bdbca4c4..3371b4c3 100644
--- a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Calculation.php
+++ b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Calculation.php
@@ -2022,7 +2022,7 @@ public static function _wrapResult($value) {
*/
public static function _unwrapResult($value) {
if (is_string($value)) {
- if ((strlen($value) > 0) && ($value{0} == '"') && (substr($value,-1) == '"')) {
+ if ((strlen($value) > 0) && ($value[0] == '"') && (substr($value,-1) == '"')) {
return substr($value,1,-1);
}
// Convert numeric errors to NaN error
@@ -2130,7 +2130,7 @@ public function parseFormula($formula) {
// Basic validation that this is indeed a formula
// We return an empty array if not
$formula = trim($formula);
- if ((strlen($formula) == 0) || ($formula{0} != '=')) return array();
+ if ((strlen($formula) == 0) || ($formula[0] != '=')) return array();
$formula = trim(substr($formula,1));
$formulaLength = strlen($formula);
if ($formulaLength < 1) return array();
@@ -2186,7 +2186,7 @@ public function _calculateFormulaValue($formula, $cellID=null, PHPExcel_Cell $pC
// Basic validation that this is indeed a formula
// We simply return the "cell value" (formula) if not
$formula = trim($formula);
- if ($formula{0} != '=') return self::_wrapResult($formula);
+ if ($formula[0] != '=') return self::_wrapResult($formula);
$formula = trim(substr($formula,1));
$formulaLength = strlen($formula);
if ($formulaLength < 1) return self::_wrapResult($formula);
@@ -2479,7 +2479,7 @@ private static function _showTypeDetails($value) {
case 'string' :
if ($value == '') {
return 'an empty string';
- } elseif ($value{0} == '#') {
+ } elseif ($value[0] == '#') {
return 'a '.$value.' error';
} else {
$typeString = 'a string';
@@ -2602,10 +2602,10 @@ private function _parseFormula($formula) {
// Loop through the formula extracting each operator and operand in turn
while(True) {
// echo 'Assessing Expression '.substr($formula, $index).'
';
- $opCharacter = $formula{$index}; // Get the first character of the value at the current index position
+ $opCharacter = $formula[$index]; // Get the first character of the value at the current index position
// echo 'Initial character of expression block is '.$opCharacter.'
';
- if ((in_array($opCharacter, $comparisonOperators)) && (strlen($formula) > $index) && (in_array($formula{$index+1}, $comparisonOperators))) {
- $opCharacter .= $formula{++$index};
+ if ((in_array($opCharacter, $comparisonOperators)) && (strlen($formula) > $index) && (in_array($formula[$index+1], $comparisonOperators))) {
+ $opCharacter .= $formula[++$index];
// echo 'Initial character of expression block is comparison operator '.$opCharacter.'
';
}
@@ -2832,11 +2832,11 @@ private function _parseFormula($formula) {
}
}
// Ignore white space
- while (($formula{$index} == "\n") || ($formula{$index} == "\r")) {
+ while (($formula[$index] == "\n") || ($formula[$index] == "\r")) {
++$index;
}
- if ($formula{$index} == ' ') {
- while ($formula{$index} == ' ') {
+ if ($formula[$index] == ' ') {
+ while ($formula[$index] == ' ') {
++$index;
}
// If we're expecting an operator, but only have a space between the previous and next operands (and both are
@@ -3220,7 +3220,7 @@ private function _processTokenStack($tokens, $cellID = null, PHPExcel_Cell $pCel
// echo 'Token is a PHPExcel constant: '.$excelConstant.'
';
$stack->push('Constant Value',self::$_ExcelConstants[$excelConstant]);
$this->_writeDebug('Evaluating Constant '.$excelConstant.' as '.self::_showTypeDetails(self::$_ExcelConstants[$excelConstant]));
- } elseif ((is_numeric($token)) || (is_bool($token)) || (is_null($token)) || ($token == '') || ($token{0} == '"') || ($token{0} == '#')) {
+ } elseif ((is_numeric($token)) || (is_bool($token)) || (is_null($token)) || ($token == '') || ($token[0] == '"') || ($token[0] == '#')) {
// echo 'Token is a number, boolean, string, null or an Excel error
';
$stack->push('Value',$token);
// if the token is a named range, push the named range name onto the stack
@@ -3255,11 +3255,11 @@ private function _validateBinaryOperand($cellID,&$operand,&$stack) {
if (is_string($operand)) {
// We only need special validations for the operand if it is a string
// Start by stripping off the quotation marks we use to identify true excel string values internally
- if ($operand > '' && $operand{0} == '"') { $operand = self::_unwrapResult($operand); }
+ if ($operand > '' && $operand[0] == '"') { $operand = self::_unwrapResult($operand); }
// If the string is a numeric value, we treat it as a numeric, so no further testing
if (!is_numeric($operand)) {
// If not a numeric, test to see if the value is an Excel error, and so can't be used in normal binary operations
- if ($operand > '' && $operand{0} == '#') {
+ if ($operand > '' && $operand[0] == '#') {
$stack->push('Value', $operand);
$this->_writeDebug('Evaluation Result is '.self::_showTypeDetails($operand));
return false;
@@ -3312,8 +3312,8 @@ private function _executeBinaryComparisonOperation($cellID,$operand1,$operand2,$
}
// Simple validate the two operands if they are string values
- if (is_string($operand1) && $operand1 > '' && $operand1{0} == '"') { $operand1 = self::_unwrapResult($operand1); }
- if (is_string($operand2) && $operand2 > '' && $operand2{0} == '"') { $operand2 = self::_unwrapResult($operand2); }
+ if (is_string($operand1) && $operand1 > '' && $operand1[0] == '"') { $operand1 = self::_unwrapResult($operand1); }
+ if (is_string($operand2) && $operand2 > '' && $operand2[0] == '"') { $operand2 = self::_unwrapResult($operand2); }
// execute the necessary operation
switch ($operation) {
diff --git a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Calculation/FormulaParser.php b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Calculation/FormulaParser.php
index a1f0c923..1fb9c02e 100644
--- a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Calculation/FormulaParser.php
+++ b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Calculation/FormulaParser.php
@@ -159,7 +159,7 @@ private function _parseToTokens() {
// Check if the formula has a valid starting =
$formulaLength = strlen($this->_formula);
- if ($formulaLength < 2 || $this->_formula{0} != '=') return;
+ if ($formulaLength < 2 || $this->_formula[0] != '=') return;
// Helper variables
$tokens1 = $tokens2 = $stack = array();
@@ -179,8 +179,8 @@ private function _parseToTokens() {
// embeds are doubled
// end marks token
if ($inString) {
- if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE) {
- if ((($index + 2) <= $formulaLength) && ($this->_formula{$index + 1} == PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE)) {
+ if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE) {
+ if ((($index + 2) <= $formulaLength) && ($this->_formula[$index + 1] == PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE)) {
$value .= PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE;
++$index;
} else {
@@ -189,7 +189,7 @@ private function _parseToTokens() {
$value = "";
}
} else {
- $value .= $this->_formula{$index};
+ $value .= $this->_formula[$index];
}
++$index;
continue;
@@ -199,15 +199,15 @@ private function _parseToTokens() {
// embeds are double
// end does not mark a token
if ($inPath) {
- if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE) {
- if ((($index + 2) <= $formulaLength) && ($this->_formula{$index + 1} == PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE)) {
+ if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE) {
+ if ((($index + 2) <= $formulaLength) && ($this->_formula[$index + 1] == PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE)) {
$value .= PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE;
++$index;
} else {
$inPath = false;
}
} else {
- $value .= $this->_formula{$index};
+ $value .= $this->_formula[$index];
}
++$index;
continue;
@@ -217,10 +217,10 @@ private function _parseToTokens() {
// no embeds (changed to "()" by Excel)
// end does not mark a token
if ($inRange) {
- if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::BRACKET_CLOSE) {
+ if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::BRACKET_CLOSE) {
$inRange = false;
}
- $value .= $this->_formula{$index};
+ $value .= $this->_formula[$index];
++$index;
continue;
}
@@ -228,7 +228,7 @@ private function _parseToTokens() {
// error values
// end marks a token, determined from absolute list of values
if ($inError) {
- $value .= $this->_formula{$index};
+ $value .= $this->_formula[$index];
++$index;
if (in_array($value, $ERRORS)) {
$inError = false;
@@ -239,10 +239,10 @@ private function _parseToTokens() {
}
// scientific notation check
- if (strpos(PHPExcel_Calculation_FormulaParser::OPERATORS_SN, $this->_formula{$index}) !== false) {
+ if (strpos(PHPExcel_Calculation_FormulaParser::OPERATORS_SN, $this->_formula[$index]) !== false) {
if (strlen($value) > 1) {
- if (preg_match("/^[1-9]{1}(\.[0-9]+)?E{1}$/", $this->_formula{$index}) != 0) {
- $value .= $this->_formula{$index};
+ if (preg_match("/^[1-9]{1}(\.[0-9]+)?E{1}$/", $this->_formula[$index]) != 0) {
+ $value .= $this->_formula[$index];
++$index;
continue;
}
@@ -252,7 +252,7 @@ private function _parseToTokens() {
// independent character evaluation (order not important)
// establish state-dependent character evaluations
- if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE) {
+ if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE) {
if (strlen($value > 0)) { // unexpected
$tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_UNKNOWN);
$value = "";
@@ -262,7 +262,7 @@ private function _parseToTokens() {
continue;
}
- if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE) {
+ if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE) {
if (strlen($value) > 0) { // unexpected
$tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_UNKNOWN);
$value = "";
@@ -272,14 +272,14 @@ private function _parseToTokens() {
continue;
}
- if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::BRACKET_OPEN) {
+ if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::BRACKET_OPEN) {
$inRange = true;
$value .= PHPExcel_Calculation_FormulaParser::BRACKET_OPEN;
++$index;
continue;
}
- if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::ERROR_START) {
+ if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::ERROR_START) {
if (strlen($value) > 0) { // unexpected
$tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_UNKNOWN);
$value = "";
@@ -291,7 +291,7 @@ private function _parseToTokens() {
}
// mark start and end of arrays and array rows
- if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::BRACE_OPEN) {
+ if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::BRACE_OPEN) {
if (strlen($value) > 0) { // unexpected
$tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_UNKNOWN);
$value = "";
@@ -309,7 +309,7 @@ private function _parseToTokens() {
continue;
}
- if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::SEMICOLON) {
+ if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::SEMICOLON) {
if (strlen($value) > 0) {
$tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND);
$value = "";
@@ -331,7 +331,7 @@ private function _parseToTokens() {
continue;
}
- if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::BRACE_CLOSE) {
+ if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::BRACE_CLOSE) {
if (strlen($value) > 0) {
$tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND);
$value = "";
@@ -352,14 +352,14 @@ private function _parseToTokens() {
}
// trim white-space
- if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::WHITESPACE) {
+ if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::WHITESPACE) {
if (strlen($value) > 0) {
$tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND);
$value = "";
}
$tokens1[] = new PHPExcel_Calculation_FormulaToken("", PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_WHITESPACE);
++$index;
- while (($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::WHITESPACE) && ($index < $formulaLength)) {
+ while (($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::WHITESPACE) && ($index < $formulaLength)) {
++$index;
}
continue;
@@ -379,29 +379,29 @@ private function _parseToTokens() {
}
// standard infix operators
- if (strpos(PHPExcel_Calculation_FormulaParser::OPERATORS_INFIX, $this->_formula{$index}) !== false) {
+ if (strpos(PHPExcel_Calculation_FormulaParser::OPERATORS_INFIX, $this->_formula[$index]) !== false) {
if (strlen($value) > 0) {
$tokens1[] =new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND);
$value = "";
}
- $tokens1[] = new PHPExcel_Calculation_FormulaToken($this->_formula{$index}, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERATORINFIX);
+ $tokens1[] = new PHPExcel_Calculation_FormulaToken($this->_formula[$index], PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERATORINFIX);
++$index;
continue;
}
// standard postfix operators (only one)
- if (strpos(PHPExcel_Calculation_FormulaParser::OPERATORS_POSTFIX, $this->_formula{$index}) !== false) {
+ if (strpos(PHPExcel_Calculation_FormulaParser::OPERATORS_POSTFIX, $this->_formula[$index]) !== false) {
if (strlen($value) > 0) {
$tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND);
$value = "";
}
- $tokens1[] = new PHPExcel_Calculation_FormulaToken($this->_formula{$index}, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERATORPOSTFIX);
+ $tokens1[] = new PHPExcel_Calculation_FormulaToken($this->_formula[$index], PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERATORPOSTFIX);
++$index;
continue;
}
// start subexpression or function
- if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::PAREN_OPEN) {
+ if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::PAREN_OPEN) {
if (strlen($value) > 0) {
$tmp = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_FUNCTION, PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_START);
$tokens1[] = $tmp;
@@ -417,7 +417,7 @@ private function _parseToTokens() {
}
// function, subexpression, or array parameters, or operand unions
- if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::COMMA) {
+ if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::COMMA) {
if (strlen($value) > 0) {
$tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND);
$value = "";
@@ -438,7 +438,7 @@ private function _parseToTokens() {
}
// stop subexpression
- if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::PAREN_CLOSE) {
+ if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::PAREN_CLOSE) {
if (strlen($value) > 0) {
$tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND);
$value = "";
@@ -454,7 +454,7 @@ private function _parseToTokens() {
}
// token accumulation
- $value .= $this->_formula{$index};
+ $value .= $this->_formula[$index];
++$index;
}
diff --git a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Calculation/Functions.php b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Calculation/Functions.php
index abecdb47..9e5a8b56 100644
--- a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Calculation/Functions.php
+++ b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Calculation/Functions.php
@@ -596,7 +596,7 @@ public static function HYPERLINK($linkURL = '', $displayName = null, PHPExcel_Ce
* ATAN2
*
* This function calculates the arc tangent of the two variables x and y. It is similar to
- * calculating the arc tangent of y ÷ x, except that the signs of both arguments are used
+ * calculating the arc tangent of y � x, except that the signs of both arguments are used
* to determine the quadrant of the result.
* The arctangent is the angle from the x-axis to a line containing the origin (0, 0) and a
* point with coordinates (xCoordinate, yCoordinate). The angle is given in radians between
@@ -1027,7 +1027,7 @@ public static function MAXA() {
private static function _ifCondition($condition) {
$condition = self::flattenSingleValue($condition);
- if (!in_array($condition{0},array('>', '<', '='))) {
+ if (!in_array($condition[0],array('>', '<', '='))) {
if (!is_numeric($condition)) { $condition = PHPExcel_Calculation::_wrapResult(strtoupper($condition)); }
return '='.$condition;
} else {
@@ -5111,19 +5111,19 @@ public static function CHARACTER($character) {
private static function _uniord($c) {
- if (ord($c{0}) >=0 && ord($c{0}) <= 127)
- return ord($c{0});
- if (ord($c{0}) >= 192 && ord($c{0}) <= 223)
- return (ord($c{0})-192)*64 + (ord($c{1})-128);
- if (ord($c{0}) >= 224 && ord($c{0}) <= 239)
- return (ord($c{0})-224)*4096 + (ord($c{1})-128)*64 + (ord($c{2})-128);
- if (ord($c{0}) >= 240 && ord($c{0}) <= 247)
- return (ord($c{0})-240)*262144 + (ord($c{1})-128)*4096 + (ord($c{2})-128)*64 + (ord($c{3})-128);
- if (ord($c{0}) >= 248 && ord($c{0}) <= 251)
- return (ord($c{0})-248)*16777216 + (ord($c{1})-128)*262144 + (ord($c{2})-128)*4096 + (ord($c{3})-128)*64 + (ord($c{4})-128);
- if (ord($c{0}) >= 252 && ord($c{0}) <= 253)
- return (ord($c{0})-252)*1073741824 + (ord($c{1})-128)*16777216 + (ord($c{2})-128)*262144 + (ord($c{3})-128)*4096 + (ord($c{4})-128)*64 + (ord($c{5})-128);
- if (ord($c{0}) >= 254 && ord($c{0}) <= 255) //error
+ if (ord($c[0]) >=0 && ord($c[0]) <= 127)
+ return ord($c[0]);
+ if (ord($c[0]) >= 192 && ord($c[0]) <= 223)
+ return (ord($c[0])-192)*64 + (ord($c[1])-128);
+ if (ord($c[0]) >= 224 && ord($c[0]) <= 239)
+ return (ord($c[0])-224)*4096 + (ord($c[1])-128)*64 + (ord($c[2])-128);
+ if (ord($c[0]) >= 240 && ord($c[0]) <= 247)
+ return (ord($c[0])-240)*262144 + (ord($c[1])-128)*4096 + (ord($c[2])-128)*64 + (ord($c[3])-128);
+ if (ord($c[0]) >= 248 && ord($c[0]) <= 251)
+ return (ord($c[0])-248)*16777216 + (ord($c[1])-128)*262144 + (ord($c[2])-128)*4096 + (ord($c[3])-128)*64 + (ord($c[4])-128);
+ if (ord($c[0]) >= 252 && ord($c[0]) <= 253)
+ return (ord($c[0])-252)*1073741824 + (ord($c[1])-128)*16777216 + (ord($c[2])-128)*262144 + (ord($c[3])-128)*4096 + (ord($c[4])-128)*64 + (ord($c[5])-128);
+ if (ord($c[0]) >= 254 && ord($c[0]) <= 255) //error
return self::$_errorCodes['value'];
return 0;
} // function _uniord()
@@ -7241,7 +7241,7 @@ public static function _parseComplex($complexNumber) {
// Split the input into its Real and Imaginary components
$leadingSign = 0;
if (strlen($workString) > 0) {
- $leadingSign = (($workString{0} == '+') || ($workString{0} == '-')) ? 1 : 0;
+ $leadingSign = (($workString[0] == '+') || ($workString[0] == '-')) ? 1 : 0;
}
$power = '';
$realNumber = strtok($workString, '+-');
@@ -7276,10 +7276,10 @@ public static function _parseComplex($complexNumber) {
private static function _cleanComplex($complexNumber) {
- if ($complexNumber{0} == '+') $complexNumber = substr($complexNumber,1);
- if ($complexNumber{0} == '0') $complexNumber = substr($complexNumber,1);
- if ($complexNumber{0} == '.') $complexNumber = '0'.$complexNumber;
- if ($complexNumber{0} == '+') $complexNumber = substr($complexNumber,1);
+ if ($complexNumber[0] == '+') $complexNumber = substr($complexNumber,1);
+ if ($complexNumber[0] == '0') $complexNumber = substr($complexNumber,1);
+ if ($complexNumber[0] == '.') $complexNumber = '0'.$complexNumber;
+ if ($complexNumber[0] == '+') $complexNumber = substr($complexNumber,1);
return $complexNumber;
}
@@ -11337,7 +11337,7 @@ public static function N($value) {
break;
case 'string' :
// Errors
- if ((strlen($value) > 0) && ($value{0} == '#')) {
+ if ((strlen($value) > 0) && ($value[0] == '#')) {
return $value;
}
break;
@@ -11392,7 +11392,7 @@ public static function TYPE($value) {
break;
case 'string' :
// Errors
- if ((strlen($value) > 0) && ($value{0} == '#')) {
+ if ((strlen($value) > 0) && ($value[0] == '#')) {
return 16;
}
return 2;
diff --git a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Cell.php b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Cell.php
index fdc36ffa..265264eb 100644
--- a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Cell.php
+++ b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Cell.php
@@ -662,11 +662,11 @@ public static function columnIndexFromString($pString = 'A')
$strLen = strlen($pString);
// Convert column to integer
if ($strLen == 1) {
- return (ord($pString{0}) - 64);
+ return (ord($pString[0]) - 64);
} elseif ($strLen == 2) {
- return $result = ((1 + (ord($pString{0}) - 65)) * 26) + (ord($pString{1}) - 64);
+ return $result = ((1 + (ord($pString[0]) - 65)) * 26) + (ord($pString[1]) - 64);
} elseif ($strLen == 3) {
- return ((1 + (ord($pString{0}) - 65)) * 676) + ((1 + (ord($pString{1}) - 65)) * 26) + (ord($pString{2}) - 64);
+ return ((1 + (ord($pString[0]) - 65)) * 676) + ((1 + (ord($pString[1]) - 65)) * 26) + (ord($pString[2]) - 64);
} else {
throw new Exception("Column string index can not be " . ($strLen != 0 ? "longer than 3 characters" : "empty") . ".");
}
diff --git a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Cell/DefaultValueBinder.php b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Cell/DefaultValueBinder.php
index 6b3e22e1..8f008aaf 100644
--- a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Cell/DefaultValueBinder.php
+++ b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Cell/DefaultValueBinder.php
@@ -73,7 +73,7 @@ public static function dataTypeForValue($pValue = null) {
} elseif ($pValue instanceof PHPExcel_RichText) {
return PHPExcel_Cell_DataType::TYPE_STRING;
- } elseif ($pValue{0} === '=' && strlen($pValue) > 1) {
+ } elseif ($pValue[0] === '=' && strlen($pValue) > 1) {
return PHPExcel_Cell_DataType::TYPE_FORMULA;
} elseif (is_bool($pValue)) {
diff --git a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Reader/Excel2003XML.php b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Reader/Excel2003XML.php
index 346996aa..40f30662 100644
--- a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Reader/Excel2003XML.php
+++ b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Reader/Excel2003XML.php
@@ -618,12 +618,12 @@ public function loadIntoExisting($pFilename, PHPExcel $objPHPExcel)
// Empty R reference is the current row
if ($rowReference == '') $rowReference = $rowID;
// Bracketed R references are relative to the current row
- if ($rowReference{0} == '[') $rowReference = $rowID + trim($rowReference,'[]');
+ if ($rowReference[0] == '[') $rowReference = $rowID + trim($rowReference,'[]');
$columnReference = $cellReference[4][0];
// Empty C reference is the current column
if ($columnReference == '') $columnReference = $columnNumber;
// Bracketed C references are relative to the current column
- if ($columnReference{0} == '[') $columnReference = $columnNumber + trim($columnReference,'[]');
+ if ($columnReference[0] == '[') $columnReference = $columnNumber + trim($columnReference,'[]');
$A1CellReference = PHPExcel_Cell::stringFromColumnIndex($columnReference-1).$rowReference;
$value = substr_replace($value,$A1CellReference,$cellReference[0][1],strlen($cellReference[0][0]));
}
diff --git a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Reader/Excel5.php b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Reader/Excel5.php
index a4f20e7a..e8ee5e2d 100644
--- a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Reader/Excel5.php
+++ b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Reader/Excel5.php
@@ -1174,7 +1174,7 @@ private function _readDateMode()
// offset: 0; size: 2; 0 = base 1900, 1 = base 1904
PHPExcel_Shared_Date::setExcelCalendar(PHPExcel_Shared_Date::CALENDAR_WINDOWS_1900);
- if (ord($recordData{0}) == 1) {
+ if (ord($recordData[0]) == 1) {
PHPExcel_Shared_Date::setExcelCalendar(PHPExcel_Shared_Date::CALENDAR_MAC_1904);
}
}
@@ -1232,7 +1232,7 @@ private function _readFont()
}
// offset: 10; size: 1; underline type
- $underlineType = ord($recordData{10});
+ $underlineType = ord($recordData[10]);
switch ($underlineType) {
case 0x00:
break; // no underline
@@ -1369,7 +1369,7 @@ private function _readXf()
// offset: 6; size: 1; Alignment and text break
// bit 2-0, mask 0x07; horizontal alignment
- $horAlign = (0x07 & ord($recordData{6})) >> 0;
+ $horAlign = (0x07 & ord($recordData[6])) >> 0;
switch ($horAlign) {
case 0:
$objStyle->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_GENERAL);
@@ -1391,7 +1391,7 @@ private function _readXf()
break;
}
// bit 3, mask 0x08; wrap text
- $wrapText = (0x08 & ord($recordData{6})) >> 3;
+ $wrapText = (0x08 & ord($recordData[6])) >> 3;
switch ($wrapText) {
case 0:
$objStyle->getAlignment()->setWrapText(false);
@@ -1401,7 +1401,7 @@ private function _readXf()
break;
}
// bit 6-4, mask 0x70; vertical alignment
- $vertAlign = (0x70 & ord($recordData{6})) >> 4;
+ $vertAlign = (0x70 & ord($recordData[6])) >> 4;
switch ($vertAlign) {
case 0:
$objStyle->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_TOP);
@@ -1419,7 +1419,7 @@ private function _readXf()
if ($this->_version == self::XLS_BIFF8) {
// offset: 7; size: 1; XF_ROTATION: Text rotation angle
- $angle = ord($recordData{7});
+ $angle = ord($recordData[7]);
$rotation = 0;
if ($angle <= 90) {
$rotation = $angle;
@@ -1432,11 +1432,11 @@ private function _readXf()
// offset: 8; size: 1; Indentation, shrink to cell size, and text direction
// bit: 3-0; mask: 0x0F; indent level
- $indent = (0x0F & ord($recordData{8})) >> 0;
+ $indent = (0x0F & ord($recordData[8])) >> 0;
$objStyle->getAlignment()->setIndent($indent);
// bit: 4; mask: 0x10; 1 = shrink content to fit into cell
- $shrinkToFit = (0x10 & ord($recordData{8})) >> 4;
+ $shrinkToFit = (0x10 & ord($recordData[8])) >> 4;
switch ($shrinkToFit) {
case 0:
$objStyle->getAlignment()->setShrinkToFit(false);
@@ -1518,7 +1518,7 @@ private function _readXf()
// BIFF5
// offset: 7; size: 1; Text orientation and flags
- $orientationAndFlags = ord($recordData{7});
+ $orientationAndFlags = ord($recordData[7]);
// bit: 1-0; mask: 0x03; XF_ORIENTATION: Text orientation
$xfOrientation = (0x03 & $orientationAndFlags) >> 0;
@@ -1641,7 +1641,7 @@ private function _readXfExt()
$xclrValue = substr($extData, 4, 4); // color value (value based on color type)
if ($xclfType == 2) {
- $rgb = sprintf('%02X%02X%02X', ord($xclrValue{0}), ord($xclrValue{1}), ord($xclrValue{2}));
+ $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2]));
// modify the relevant style property
if ( isset($this->_mapCellXfIndex[$ixfe]) ) {
@@ -1657,7 +1657,7 @@ private function _readXfExt()
$xclrValue = substr($extData, 4, 4); // color value (value based on color type)
if ($xclfType == 2) {
- $rgb = sprintf('%02X%02X%02X', ord($xclrValue{0}), ord($xclrValue{1}), ord($xclrValue{2}));
+ $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2]));
// modify the relevant style property
if ( isset($this->_mapCellXfIndex[$ixfe]) ) {
@@ -1673,7 +1673,7 @@ private function _readXfExt()
$xclrValue = substr($extData, 4, 4); // color value (value based on color type)
if ($xclfType == 2) {
- $rgb = sprintf('%02X%02X%02X', ord($xclrValue{0}), ord($xclrValue{1}), ord($xclrValue{2}));
+ $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2]));
// modify the relevant style property
if ( isset($this->_mapCellXfIndex[$ixfe]) ) {
@@ -1689,7 +1689,7 @@ private function _readXfExt()
$xclrValue = substr($extData, 4, 4); // color value (value based on color type)
if ($xclfType == 2) {
- $rgb = sprintf('%02X%02X%02X', ord($xclrValue{0}), ord($xclrValue{1}), ord($xclrValue{2}));
+ $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2]));
// modify the relevant style property
if ( isset($this->_mapCellXfIndex[$ixfe]) ) {
@@ -1705,7 +1705,7 @@ private function _readXfExt()
$xclrValue = substr($extData, 4, 4); // color value (value based on color type)
if ($xclfType == 2) {
- $rgb = sprintf('%02X%02X%02X', ord($xclrValue{0}), ord($xclrValue{1}), ord($xclrValue{2}));
+ $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2]));
// modify the relevant style property
if ( isset($this->_mapCellXfIndex[$ixfe]) ) {
@@ -1721,7 +1721,7 @@ private function _readXfExt()
$xclrValue = substr($extData, 4, 4); // color value (value based on color type)
if ($xclfType == 2) {
- $rgb = sprintf('%02X%02X%02X', ord($xclrValue{0}), ord($xclrValue{1}), ord($xclrValue{2}));
+ $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2]));
// modify the relevant style property
if ( isset($this->_mapCellXfIndex[$ixfe]) ) {
@@ -1737,7 +1737,7 @@ private function _readXfExt()
$xclrValue = substr($extData, 4, 4); // color value (value based on color type)
if ($xclfType == 2) {
- $rgb = sprintf('%02X%02X%02X', ord($xclrValue{0}), ord($xclrValue{1}), ord($xclrValue{2}));
+ $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2]));
// modify the relevant style property
if ( isset($this->_mapCellXfIndex[$ixfe]) ) {
@@ -1753,7 +1753,7 @@ private function _readXfExt()
$xclrValue = substr($extData, 4, 4); // color value (value based on color type)
if ($xclfType == 2) {
- $rgb = sprintf('%02X%02X%02X', ord($xclrValue{0}), ord($xclrValue{1}), ord($xclrValue{2}));
+ $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2]));
// modify the relevant style property
if ( isset($this->_mapCellXfIndex[$ixfe]) ) {
@@ -1794,7 +1794,7 @@ private function _readStyle()
if ($isBuiltIn) {
// offset: 2; size: 1; identifier for built-in style
- $builtInId = ord($recordData{2});
+ $builtInId = ord($recordData[2]);
switch ($builtInId) {
case 0x00:
@@ -1858,7 +1858,7 @@ private function _readSheet()
$rec_offset = $this->_GetInt4d($recordData, 0);
// offset: 4; size: 1; sheet state
- switch (ord($recordData{4})) {
+ switch (ord($recordData[4])) {
case 0x00: $sheetState = PHPExcel_Worksheet::SHEETSTATE_VISIBLE; break;
case 0x01: $sheetState = PHPExcel_Worksheet::SHEETSTATE_HIDDEN; break;
case 0x02: $sheetState = PHPExcel_Worksheet::SHEETSTATE_VERYHIDDEN; break;
@@ -1866,7 +1866,7 @@ private function _readSheet()
}
// offset: 5; size: 1; sheet type
- $sheetType = ord($recordData{5});
+ $sheetType = ord($recordData[5]);
// offset: 6; size: var; sheet name
if ($this->_version == self::XLS_BIFF8) {
@@ -2041,7 +2041,7 @@ private function _readDefinedName()
// offset: 2; size: 1; keyboard shortcut
// offset: 3; size: 1; length of the name (character count)
- $nlen = ord($recordData{3});
+ $nlen = ord($recordData[3]);
// offset: 4; size: 2; size of the formula data (it can happen that this is zero)
// note: there can also be additional data, this is not included in $flen
@@ -2123,7 +2123,7 @@ private function _readSst()
$pos += 2;
// option flags
- $optionFlags = ord($recordData{$pos});
+ $optionFlags = ord($recordData[$pos]);
++$pos;
// bit: 0; mask: 0x01; 0 = compressed; 1 = uncompressed
@@ -2192,7 +2192,7 @@ private function _readSst()
// repeated option flags
// OpenOffice.org documentation 5.21
- $option = ord($recordData{$pos});
+ $option = ord($recordData[$pos]);
++$pos;
if ($isCompressed && ($option == 0)) {
@@ -2216,7 +2216,7 @@ private function _readSst()
// this fragment compressed
$len = min($charsLeft, $limitpos - $pos);
for ($j = 0; $j < $len; ++$j) {
- $retstr .= $recordData{$pos + $j} . chr(0);
+ $retstr .= $recordData[$pos + $j] . chr(0);
}
$charsLeft -= $len;
$isCompressed = false;
@@ -3088,7 +3088,7 @@ private function _readFormula()
// We can apparently not rely on $isPartOfSharedFormula. Even when $isPartOfSharedFormula = true
// the formula data may be ordinary formula data, therefore we need to check
// explicitly for the tExp token (0x01)
- $isPartOfSharedFormula = $isPartOfSharedFormula && ord($formulaStructure{2}) == 0x01;
+ $isPartOfSharedFormula = $isPartOfSharedFormula && ord($formulaStructure[2]) == 0x01;
if ($isPartOfSharedFormula) {
// part of shared formula which means there will be a formula with a tExp token and nothing else
@@ -3112,9 +3112,9 @@ private function _readFormula()
$xfIndex = $this->_GetInt2d($recordData, 4);
// offset: 6; size: 8; result of the formula
- if ( (ord($recordData{6}) == 0)
- && (ord($recordData{12}) == 255)
- && (ord($recordData{13}) == 255) ) {
+ if ( (ord($recordData[6]) == 0)
+ && (ord($recordData[12]) == 255)
+ && (ord($recordData[13]) == 255) ) {
// String formula. Result follows in appended STRING record
$dataType = PHPExcel_Cell_DataType::TYPE_STRING;
@@ -3128,25 +3128,25 @@ private function _readFormula()
// read STRING record
$value = $this->_readString();
- } elseif ((ord($recordData{6}) == 1)
- && (ord($recordData{12}) == 255)
- && (ord($recordData{13}) == 255)) {
+ } elseif ((ord($recordData[6]) == 1)
+ && (ord($recordData[12]) == 255)
+ && (ord($recordData[13]) == 255)) {
// Boolean formula. Result is in +2; 0=false, 1=true
$dataType = PHPExcel_Cell_DataType::TYPE_BOOL;
- $value = (bool) ord($recordData{8});
+ $value = (bool) ord($recordData[8]);
- } elseif ((ord($recordData{6}) == 2)
- && (ord($recordData{12}) == 255)
- && (ord($recordData{13}) == 255)) {
+ } elseif ((ord($recordData[6]) == 2)
+ && (ord($recordData[12]) == 255)
+ && (ord($recordData[13]) == 255)) {
// Error formula. Error code is in +2
$dataType = PHPExcel_Cell_DataType::TYPE_ERROR;
- $value = $this->_mapErrorCode(ord($recordData{8}));
+ $value = $this->_mapErrorCode(ord($recordData[8]));
- } elseif ((ord($recordData{6}) == 3)
- && (ord($recordData{12}) == 255)
- && (ord($recordData{13}) == 255)) {
+ } elseif ((ord($recordData[6]) == 3)
+ && (ord($recordData[12]) == 255)
+ && (ord($recordData[13]) == 255)) {
// Formula result is a null string
$dataType = PHPExcel_Cell_DataType::TYPE_NULL;
@@ -3213,7 +3213,7 @@ private function _readSharedFmla()
// offset: 6, size: 1; not used
// offset: 7, size: 1; number of existing FORMULA records for this shared formula
- $no = ord($recordData{7});
+ $no = ord($recordData[7]);
// offset: 8, size: var; Binary token array of the shared formula
$formula = substr($recordData, 8);
@@ -3278,10 +3278,10 @@ private function _readBoolErr()
$xfIndex = $this->_GetInt2d($recordData, 4);
// offset: 6; size: 1; the boolean value or error value
- $boolErr = ord($recordData{6});
+ $boolErr = ord($recordData[6]);
// offset: 7; size: 1; 0=boolean; 1=error
- $isError = ord($recordData{7});
+ $isError = ord($recordData[7]);
$cell = $this->_phpSheet->getCell($columnString . ($row + 1));
switch ($isError) {
@@ -3564,7 +3564,7 @@ private function _readSelection()
if (!$this->_readDataOnly) {
// offset: 0; size: 1; pane identifier
- $paneId = ord($recordData{0});
+ $paneId = ord($recordData[0]);
// offset: 1; size: 2; index to row of the active cell
$r = $this->_GetInt2d($recordData, 1);
@@ -3691,9 +3691,9 @@ private function _readHyperLink()
$hyperlinkType = 'UNC';
} else if (!$isFileLinkOrUrl) {
$hyperlinkType = 'workbook';
- } else if (ord($recordData{$offset}) == 0x03) {
+ } else if (ord($recordData[$offset]) == 0x03) {
$hyperlinkType = 'local';
- } else if (ord($recordData{$offset}) == 0xE0) {
+ } else if (ord($recordData[$offset]) == 0xE0) {
$hyperlinkType = 'URL';
}
@@ -5216,10 +5216,10 @@ private function _readBIFF5CellRangeAddressFixed($subData)
$lr = $this->_GetInt2d($subData, 2) + 1;
// offset: 4; size: 1; index to first column
- $fc = ord($subData{4});
+ $fc = ord($subData[4]);
// offset: 5; size: 1; index to last column
- $lc = ord($subData{5});
+ $lc = ord($subData[5]);
// check values
if ($fr > $lr || $fc > $lc) {
@@ -5617,13 +5617,13 @@ private function _readBIFF8Constant($valueData)
private function _readRGB($rgb)
{
// offset: 0; size 1; Red component
- $r = ord($rgb{0});
+ $r = ord($rgb[0]);
// offset: 1; size: 1; Green component
- $g = ord($rgb{1});
+ $g = ord($rgb[1]);
// offset: 2; size: 1; Blue component
- $b = ord($rgb{2});
+ $b = ord($rgb[2]);
// HEX notation, e.g. 'FF00FC'
$rgb = sprintf('%02X', $r) . sprintf('%02X', $g) . sprintf('%02X', $b);
diff --git a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Reader/Excel5/Escher.php b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Reader/Excel5/Escher.php
index d89f2054..9c70a3bb 100644
--- a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Reader/Excel5/Escher.php
+++ b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Reader/Excel5/Escher.php
@@ -251,16 +251,16 @@ private function _readBSE()
$foDelay = $this->_GetInt4d($recordData, 28);
// offset: 32; size: 1; unused1
- $unused1 = ord($recordData{32});
+ $unused1 = ord($recordData[32]);
// offset: 33; size: 1; size of nameData in bytes (including null terminator)
- $cbName = ord($recordData{33});
+ $cbName = ord($recordData[33]);
// offset: 34; size: 1; unused2
- $unused2 = ord($recordData{34});
+ $unused2 = ord($recordData[34]);
// offset: 35; size: 1; unused3
- $unused3 = ord($recordData{35});
+ $unused3 = ord($recordData[35]);
// offset: 36; size: $cbName; nameData
$nameData = substr($recordData, 36, $cbName);
@@ -302,7 +302,7 @@ private function _readBlipJPEG()
}
// offset: var; size: 1; tag
- $tag = ord($recordData{$pos});
+ $tag = ord($recordData[$pos]);
$pos += 1;
// offset: var; size: var; the raw image data
@@ -343,7 +343,7 @@ private function _readBlipPNG()
}
// offset: var; size: 1; tag
- $tag = ord($recordData{$pos});
+ $tag = ord($recordData[$pos]);
$pos += 1;
// offset: var; size: var; the raw image data
diff --git a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Reader/SYLK.php b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Reader/SYLK.php
index c97f88ae..3e20caf3 100644
--- a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Reader/SYLK.php
+++ b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Reader/SYLK.php
@@ -256,7 +256,7 @@ public function loadIntoExisting($pFilename, PHPExcel $objPHPExcel)
if ($dataType == 'P') {
$formatArray = array();
foreach($rowData as $rowDatum) {
- switch($rowDatum{0}) {
+ switch($rowDatum[0]) {
case 'P' : $formatArray['numberformat']['code'] = str_replace($fromFormats,$toFormats,substr($rowDatum,1));
break;
case 'E' :
@@ -266,7 +266,7 @@ public function loadIntoExisting($pFilename, PHPExcel $objPHPExcel)
break;
case 'S' : $styleSettings = substr($rowDatum,1);
for ($i=0;$i.
-//
+//
// See LICENSE.TXT file for more information.
// ----------------------------------------------------------------------------
//
-// Description : PHP class to creates array representations for
+// Description : PHP class to creates array representations for
// common 1D barcodes to be used with TCPDF.
//
// Author: Nicola Asuni
@@ -60,15 +60,15 @@
* @license http://www.gnu.org/copyleft/lesser.html LGPL
*/
class TCPDFBarcode {
-
+
/**
* @var array representation of barcode.
* @access protected
*/
protected $barcode_array;
-
+
/**
- * This is the class constructor.
+ * This is the class constructor.
* Return an array representations for common 1D barcodes:
* - $arrcode['code'] code to be printed on text label
* - $arrcode['maxh'] max bar height
@@ -84,16 +84,16 @@ class TCPDFBarcode {
public function __construct($code, $type) {
$this->setBarcode($code, $type);
}
-
- /**
+
+ /**
* Return an array representations of barcode.
* @return array
*/
public function getBarcodeArray() {
return $this->barcode_array;
}
-
- /**
+
+ /**
* Set the barcode.
* @param string $code code to print
* @param string $type type of barcode: - C39 : CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9.
- C39+ : CODE 39 with checksum
- C39E : CODE 39 EXTENDED
- C39E+ : CODE 39 EXTENDED + CHECKSUM
- C93 : CODE 93 - USS-93
- S25 : Standard 2 of 5
- S25+ : Standard 2 of 5 + CHECKSUM
- I25 : Interleaved 2 of 5
- I25+ : Interleaved 2 of 5 + CHECKSUM
- C128A : CODE 128 A
- C128B : CODE 128 B
- C128C : CODE 128 C
- EAN2 : 2-Digits UPC-Based Extention
- EAN5 : 5-Digits UPC-Based Extention
- EAN8 : EAN 8
- EAN13 : EAN 13
- UPCA : UPC-A
- UPCE : UPC-E
- MSI : MSI (Variation of Plessey code)
- MSI+ : MSI + CHECKSUM (modulo 11)
- POSTNET : POSTNET
- PLANET : PLANET
- RMS4CC : RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code)
- KIX : KIX (Klant index - Customer index)
- IMB: Intelligent Mail Barcode - Onecode - USPS-B-3200
- CODABAR : CODABAR
- CODE11 : CODE 11
- PHARMA : PHARMACODE
- PHARMA2T : PHARMACODE TWO-TRACKS
@@ -225,7 +225,7 @@ public function setBarcode($code, $type) {
}
$this->barcode_array = $arrcode;
}
-
+
/**
* CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9.
* General-purpose code in very wide use world-wide
@@ -279,7 +279,7 @@ protected function barcode_code39($code, $extended=false, $checksum=false) {
$chr['+'] = '121112121';
$chr['%'] = '111212121';
$chr['*'] = '121121211';
-
+
$code = strtoupper($code);
if ($extended) {
// extended mode
@@ -294,12 +294,12 @@ protected function barcode_code39($code, $extended=false, $checksum=false) {
}
// add start and stop codes
$code = '*'.$code.'*';
-
+
$bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array());
$k = 0;
$clen = strlen($code);
for ($i = 0; $i < $clen; ++$i) {
- $char = $code{$i};
+ $char = $code[$i];
if(!isset($chr[$char])) {
// invalid character
return false;
@@ -310,7 +310,7 @@ protected function barcode_code39($code, $extended=false, $checksum=false) {
} else {
$t = false; // space
}
- $w = $chr[$char]{$j};
+ $w = $chr[$char][$j];
$bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);
$bararray['maxw'] += $w;
++$k;
@@ -321,7 +321,7 @@ protected function barcode_code39($code, $extended=false, $checksum=false) {
}
return $bararray;
}
-
+
/**
* Encode a string to be used for CODE 39 Extended mode.
* @param string $code code to represent.
@@ -365,14 +365,14 @@ protected function encode_code39_ext($code) {
$code_ext = '';
$clen = strlen($code);
for ($i = 0 ; $i < $clen; ++$i) {
- if (ord($code{$i}) > 127) {
+ if (ord($code[$i]) > 127) {
return false;
}
- $code_ext .= $encode[$code{$i}];
+ $code_ext .= $encode[$code[$i]];
}
return $code_ext;
}
-
+
/**
* Calculate CODE 39 checksum (modulo 43).
* @param string $code code to represent.
@@ -388,13 +388,13 @@ protected function checksum_code39($code) {
$sum = 0;
$clen = strlen($code);
for ($i = 0 ; $i < $clen; ++$i) {
- $k = array_keys($chars, $code{$i});
+ $k = array_keys($chars, $code[$i]);
$sum += $k[0];
}
$j = ($sum % 43);
return $chars[$j];
}
-
+
/**
* CODE 93 - USS-93
* Compact code similar to Code 39
@@ -489,10 +489,10 @@ protected function barcode_code93($code) {
$code_ext = '';
$clen = strlen($code);
for ($i = 0 ; $i < $clen; ++$i) {
- if (ord($code{$i}) > 127) {
+ if (ord($code[$i]) > 127) {
return false;
}
- $code_ext .= $encode[$code{$i}];
+ $code_ext .= $encode[$code[$i]];
}
// checksum
$code .= $this->checksum_code93($code);
@@ -502,7 +502,7 @@ protected function barcode_code93($code) {
$k = 0;
$clen = strlen($code);
for ($i = 0; $i < $clen; ++$i) {
- $char = $code{$i};
+ $char = $code[$i];
if(!isset($chr[$char])) {
// invalid character
return false;
@@ -513,7 +513,7 @@ protected function barcode_code93($code) {
} else {
$t = false; // space
}
- $w = $chr[$char]{$j};
+ $w = $chr[$char][$j];
$bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);
$bararray['maxw'] += $w;
++$k;
@@ -521,10 +521,10 @@ protected function barcode_code93($code) {
}
$bararray['bcode'][$k] = array('t' => true, 'w' => 1, 'h' => 1, 'p' => 0);
$bararray['maxw'] += 1;
- ++$k;
+ ++$k;
return $bararray;
}
-
+
/**
* Calculate CODE 93 checksum (modulo 47).
* @param string $code code to represent.
@@ -538,13 +538,13 @@ protected function checksum_code93($code) {
'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V',
'W', 'X', 'Y', 'Z', '-', '.', ' ', '$', '/', '+', '%');
// translate special characters
- $code = strtr($code, chr(128).chr(129).chr(130).chr(131), '$/+%');
+ $code = strtr($code, chr(128).chr(129).chr(130).chr(131), '$/+%');
$len = strlen($code);
// calculate check digit C
$p = 1;
$check = 0;
for ($i = ($len - 1); $i >= 0; --$i) {
- $k = array_keys($chars, $code{$i});
+ $k = array_keys($chars, $code[$i]);
$check += ($k[0] * $p);
++$p;
if ($p > 20) {
@@ -558,7 +558,7 @@ protected function checksum_code93($code) {
$p = 1;
$check = 0;
for ($i = $len; $i >= 0; --$i) {
- $k = array_keys($chars, $code{$i});
+ $k = array_keys($chars, $code[$i]);
$check += ($k[0] * $p);
++$p;
if ($p > 15) {
@@ -569,7 +569,7 @@ protected function checksum_code93($code) {
$k = $chars[$check];
return $c.$k;
}
-
+
/**
* Checksum for standard 2 of 5 barcodes.
* @param string $code code to process.
@@ -580,11 +580,11 @@ protected function checksum_s25($code) {
$len = strlen($code);
$sum = 0;
for ($i = 0; $i < $len; $i+=2) {
- $sum += $code{$i};
+ $sum += $code[$i];
}
$sum *= 3;
for ($i = 1; $i < $len; $i+=2) {
- $sum += ($code{$i});
+ $sum += ($code[$i]);
}
$r = $sum % 10;
if($r > 0) {
@@ -592,10 +592,10 @@ protected function checksum_s25($code) {
}
return $r;
}
-
+
/**
* MSI.
- * Variation of Plessey code, with similar applications
+ * Variation of Plessey code, with similar applications
* Contains digits (0 to 9) and encodes the data only in the width of bars.
* @param string $code code to represent.
* @param boolean $checksum if true add a checksum to the code (modulo 11)
@@ -625,7 +625,7 @@ protected function barcode_msi($code, $checksum=false) {
$p = 2;
$check = 0;
for ($i = ($clen - 1); $i >= 0; --$i) {
- $check += (hexdec($code{$i}) * $p);
+ $check += (hexdec($code[$i]) * $p);
++$p;
if ($p > 7) {
$p = 2;
@@ -640,18 +640,18 @@ protected function barcode_msi($code, $checksum=false) {
$seq = '110'; // left guard
$clen = strlen($code);
for ($i = 0; $i < $clen; ++$i) {
- $digit = $code{$i};
+ $digit = $code[$i];
if (!isset($chr[$digit])) {
// invalid character
return false;
}
$seq .= $chr[$digit];
- }
+ }
$seq .= '1001'; // right guard
$bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array());
return $this->binseq_to_array($seq, $bararray);
}
-
+
/**
* Standard 2 of 5 barcodes.
* Used in airline ticket marking, photofinishing
@@ -683,18 +683,18 @@ protected function barcode_s25($code, $checksum=false) {
$seq = '11011010';
$clen = strlen($code);
for ($i = 0; $i < $clen; ++$i) {
- $digit = $code{$i};
+ $digit = $code[$i];
if (!isset($chr[$digit])) {
// invalid character
return false;
}
$seq .= $chr[$digit];
- }
+ }
$seq .= '1101011';
$bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array());
return $this->binseq_to_array($seq, $bararray);
}
-
+
/**
* Convert binary barcode sequence to TCPDF barcode array
* @param string $seq barcode as binary sequence
@@ -708,8 +708,8 @@ protected function binseq_to_array($seq, $bararray) {
$k = 0;
for ($i = 0; $i < $len; ++$i) {
$w += 1;
- if (($i == ($len - 1)) OR (($i < ($len - 1)) AND ($seq{$i} != $seq{($i+1)}))) {
- if ($seq{$i} == '1') {
+ if (($i == ($len - 1)) OR (($i < ($len - 1)) AND ($seq[$i] != $seq[($i+1)]))) {
+ if ($seq[$i] == '1') {
$t = true; // bar
} else {
$t = false; // space
@@ -722,7 +722,7 @@ protected function binseq_to_array($seq, $bararray) {
}
return $bararray;
}
-
+
/**
* Interleaved 2 of 5 barcodes.
* Compact numeric code, widely used in industry, air cargo
@@ -755,13 +755,13 @@ protected function barcode_i25($code, $checksum=false) {
}
// add start and stop codes
$code = 'AA'.strtolower($code).'ZA';
-
+
$bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array());
$k = 0;
$clen = strlen($code);
for ($i = 0; $i < $clen; $i = ($i + 2)) {
- $char_bar = $code{$i};
- $char_space = $code{$i+1};
+ $char_bar = $code[$i];
+ $char_space = $code[$i+1];
if((!isset($chr[$char_bar])) OR (!isset($chr[$char_space]))) {
// invalid character
return false;
@@ -770,7 +770,7 @@ protected function barcode_i25($code, $checksum=false) {
$seq = '';
$chrlen = strlen($chr[$char_bar]);
for ($s = 0; $s < $chrlen; $s++){
- $seq .= $chr[$char_bar]{$s} . $chr[$char_space]{$s};
+ $seq .= $chr[$char_bar][$s] . $chr[$char_space][$s];
}
$seqlen = strlen($seq);
for ($j = 0; $j < $seqlen; ++$j) {
@@ -779,7 +779,7 @@ protected function barcode_i25($code, $checksum=false) {
} else {
$t = false; // space
}
- $w = $seq{$j};
+ $w = $seq[$j];
$bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);
$bararray['maxw'] += $w;
++$k;
@@ -787,9 +787,9 @@ protected function barcode_i25($code, $checksum=false) {
}
return $bararray;
}
-
+
/**
- * C128 barcodes.
+ * C128 barcodes.
* Very capable code, excellent density, high reliability; in very wide use world-wide
* @param string $code code to represent.
* @param string $type barcode type: A, B or C
@@ -935,7 +935,7 @@ protected function barcode_c128($code, $type='B') {
$new_code = '';
$hclen = (strlen($code) / 2);
for ($i = 0; $i < $hclen; ++$i) {
- $new_code .= chr(intval($code{(2 * $i)}.$code{(2 * $i + 1)}));
+ $new_code .= chr(intval($code[(2 * $i)].$code[(2 * $i + 1)]));
}
$code = $new_code;
break;
@@ -948,7 +948,7 @@ protected function barcode_c128($code, $type='B') {
$sum = $startid;
$clen = strlen($code);
for ($i = 0; $i < $clen; ++$i) {
- $sum += (strpos($keys, $code{$i}) * ($i+1));
+ $sum += (strpos($keys, $code[$i]) * ($i+1));
}
$check = ($sum % 103);
// add start, check and stop codes
@@ -957,9 +957,9 @@ protected function barcode_c128($code, $type='B') {
$k = 0;
$len = strlen($code);
for ($i = 0; $i < $len; ++$i) {
- $ck = strpos($keys, $code{$i});
+ $ck = strpos($keys, $code[$i]);
if (($i == 0) OR ($i > ($len-4))) {
- $char_num = ord($code{$i});
+ $char_num = ord($code[$i]);
$seq = $chr[$char_num];
} elseif(($ck >= 0) AND isset($chr[$ck])) {
$seq = $chr[$ck];
@@ -973,15 +973,15 @@ protected function barcode_c128($code, $type='B') {
} else {
$t = false; // space
}
- $w = $seq{$j};
+ $w = $seq[$j];
$bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);
$bararray['maxw'] += $w;
++$k;
}
}
- return $bararray;
+ return $bararray;
}
-
+
/**
* EAN13 and UPC-A barcodes.
* EAN13: European Article Numbering international retail product code
@@ -1005,14 +1005,14 @@ protected function barcode_eanupc($code, $len=13) {
// calculate check digit
$sum_a = 0;
for ($i = 1; $i < $data_len; $i+=2) {
- $sum_a += $code{$i};
+ $sum_a += $code[$i];
}
if ($len > 12) {
$sum_a *= 3;
}
$sum_b = 0;
for ($i = 0; $i < $data_len; $i+=2) {
- $sum_b += ($code{$i});
+ $sum_b += ($code[$i]);
}
if ($len < 13) {
$sum_b *= 3;
@@ -1024,7 +1024,7 @@ protected function barcode_eanupc($code, $len=13) {
if ($code_len == $data_len) {
// add check digit
$code .= $r;
- } elseif ($r !== intval($code{$data_len})) {
+ } elseif ($r !== intval($code[$data_len])) {
// wrong checkdigit
return false;
}
@@ -1133,9 +1133,9 @@ protected function barcode_eanupc($code, $len=13) {
$seq = '101'; // left guard bar
if ($upce) {
$bararray = array('code' => $upce_code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array());
- $p = $upce_parities[$code{1}][$r];
+ $p = $upce_parities[$code[1]][$r];
for ($i = 0; $i < 6; ++$i) {
- $seq .= $codes[$p[$i]][$upce_code{$i}];
+ $seq .= $codes[$p[$i]][$upce_code[$i]];
}
$seq .= '010101'; // right guard bar
} else {
@@ -1143,17 +1143,17 @@ protected function barcode_eanupc($code, $len=13) {
$half_len = ceil($len / 2);
if ($len == 8) {
for ($i = 0; $i < $half_len; ++$i) {
- $seq .= $codes['A'][$code{$i}];
+ $seq .= $codes['A'][$code[$i]];
}
} else {
- $p = $parities[$code{0}];
+ $p = $parities[$code[0]];
for ($i = 1; $i < $half_len; ++$i) {
- $seq .= $codes[$p[$i-1]][$code{$i}];
+ $seq .= $codes[$p[$i-1]][$code[$i]];
}
}
$seq .= '01010'; // center guard bar
for ($i = $half_len; $i < $len; ++$i) {
- $seq .= $codes['C'][$code{$i}];
+ $seq .= $codes['C'][$code[$i]];
}
$seq .= '101'; // right guard bar
}
@@ -1161,8 +1161,8 @@ protected function barcode_eanupc($code, $len=13) {
$w = 0;
for ($i = 0; $i < $clen; ++$i) {
$w += 1;
- if (($i == ($clen - 1)) OR (($i < ($clen - 1)) AND ($seq{$i} != $seq{($i+1)}))) {
- if ($seq{$i} == '1') {
+ if (($i == ($clen - 1)) OR (($i < ($clen - 1)) AND ($seq[$i] != $seq[($i+1)]))) {
+ if ($seq[$i] == '1') {
$t = true; // bar
} else {
$t = false; // space
@@ -1175,7 +1175,7 @@ protected function barcode_eanupc($code, $len=13) {
}
return $bararray;
}
-
+
/**
* UPC-Based Extentions
* 2-Digit Ext.: Used to indicate magazines and newspaper issue numbers
@@ -1192,7 +1192,7 @@ protected function barcode_eanext($code, $len=5) {
if ($len == 2) {
$r = $code % 4;
} elseif ($len == 5) {
- $r = (3 * ($code{0} + $code{2} + $code{4})) + (9 * ($code{1} + $code{3}));
+ $r = (3 * ($code[0] + $code[2] + $code[4])) + (9 * ($code[1] + $code[3]));
$r %= 10;
} else {
return false;
@@ -1240,18 +1240,18 @@ protected function barcode_eanext($code, $len=5) {
'7'=>array('A','B','A','B','A'),
'8'=>array('A','B','A','A','B'),
'9'=>array('A','A','B','A','B')
- );
+ );
$p = $parities[$len][$r];
$seq = '1011'; // left guard bar
- $seq .= $codes[$p[0]][$code{0}];
+ $seq .= $codes[$p[0]][$code[0]];
for ($i = 1; $i < $len; ++$i) {
$seq .= '01'; // separator
- $seq .= $codes[$p[$i]][$code{$i}];
+ $seq .= $codes[$p[$i]][$code[$i]];
}
$bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array());
return $this->binseq_to_array($seq, $bararray);
}
-
+
/**
* POSTNET and PLANET barcodes.
* Used by U.S. Postal Service for automated mail sorting
@@ -1297,7 +1297,7 @@ protected function barcode_postnet($code, $planet=false) {
// calculate checksum
$sum = 0;
for ($i = 0; $i < $len; ++$i) {
- $sum += intval($code{$i});
+ $sum += intval($code[$i]);
}
$chkd = ($sum % 10);
if($chkd > 0) {
@@ -1311,7 +1311,7 @@ protected function barcode_postnet($code, $planet=false) {
$bararray['maxw'] += 2;
for ($i = 0; $i < $len; ++$i) {
for ($j = 0; $j < 5; ++$j) {
- $h = $barlen[$code{$i}][$j];
+ $h = $barlen[$code[$i]][$j];
$p = floor(1 / $h);
$bararray['bcode'][$k++] = array('t' => 1, 'w' => 1, 'h' => $h, 'p' => $p);
$bararray['bcode'][$k++] = array('t' => 0, 'w' => 1, 'h' => 2, 'p' => 0);
@@ -1323,7 +1323,7 @@ protected function barcode_postnet($code, $planet=false) {
$bararray['maxw'] += 1;
return $bararray;
}
-
+
/**
* RMS4CC - CBC - KIX
* RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code) - KIX (Klant index - Customer index)
@@ -1376,7 +1376,7 @@ protected function barcode_rms4cc($code, $kix=false) {
'W' => array(1,2,4,3),
'X' => array(2,1,3,4),
'Y' => array(2,1,4,3),
- 'Z' => array(2,2,3,3)
+ 'Z' => array(2,2,3,3)
);
$code = strtoupper($code);
$len = strlen($code);
@@ -1424,8 +1424,8 @@ protected function barcode_rms4cc($code, $kix=false) {
$row = 0;
$col = 0;
for ($i = 0; $i < $len; ++$i) {
- $row += $checktable[$code{$i}][0];
- $col += $checktable[$code{$i}][1];
+ $row += $checktable[$code[$i]][0];
+ $col += $checktable[$code[$i]][1];
}
$row %= 6;
$col %= 6;
@@ -1442,7 +1442,7 @@ protected function barcode_rms4cc($code, $kix=false) {
}
for ($i = 0; $i < $len; ++$i) {
for ($j = 0; $j < 4; ++$j) {
- switch ($barmode[$code{$i}][$j]) {
+ switch ($barmode[$code[$i]][$j]) {
case 1: {
$p = 0;
$h = 2;
@@ -1476,7 +1476,7 @@ protected function barcode_rms4cc($code, $kix=false) {
}
return $bararray;
}
-
+
/**
* CODABAR barcodes.
* Older code often used in library systems, sometimes in blood banks
@@ -1514,17 +1514,17 @@ protected function barcode_codabar($code) {
$code = 'A'.strtoupper($code).'A';
$len = strlen($code);
for ($i = 0; $i < $len; ++$i) {
- if (!isset($chr[$code{$i}])) {
+ if (!isset($chr[$code[$i]])) {
return false;
}
- $seq = $chr[$code{$i}];
+ $seq = $chr[$code[$i]];
for ($j = 0; $j < 8; ++$j) {
if (($j % 2) == 0) {
$t = true; // bar
} else {
$t = false; // space
}
- $w = $seq{$j};
+ $w = $seq[$j];
$bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);
$bararray['maxw'] += $w;
++$k;
@@ -1532,7 +1532,7 @@ protected function barcode_codabar($code) {
}
return $bararray;
}
-
+
/**
* CODE11 barcodes.
* Used primarily for labeling telecommunications equipment
@@ -1555,7 +1555,7 @@ protected function barcode_code11($code) {
'-' => '112111',
'S' => '112211'
);
-
+
$bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array());
$k = 0;
$w = 0;
@@ -1565,7 +1565,7 @@ protected function barcode_code11($code) {
$p = 1;
$check = 0;
for ($i = ($len - 1); $i >= 0; --$i) {
- $digit = $code{$i};
+ $digit = $code[$i];
if ($digit == '-') {
$dval = 10;
} else {
@@ -1580,14 +1580,14 @@ protected function barcode_code11($code) {
$check %= 11;
if ($check == 10) {
$check = '-';
- }
+ }
$code .= $check;
if ($len > 10) {
// calculate check digit K
$p = 1;
$check = 0;
for ($i = $len; $i >= 0; --$i) {
- $digit = $code{$i};
+ $digit = $code[$i];
if ($digit == '-') {
$dval = 10;
} else {
@@ -1606,17 +1606,17 @@ protected function barcode_code11($code) {
$code = 'S'.$code.'S';
$len += 3;
for ($i = 0; $i < $len; ++$i) {
- if (!isset($chr[$code{$i}])) {
+ if (!isset($chr[$code[$i]])) {
return false;
}
- $seq = $chr[$code{$i}];
+ $seq = $chr[$code[$i]];
for ($j = 0; $j < 6; ++$j) {
if (($j % 2) == 0) {
$t = true; // bar
} else {
$t = false; // space
}
- $w = $seq{$j};
+ $w = $seq[$j];
$bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);
$bararray['maxw'] += $w;
++$k;
@@ -1624,7 +1624,7 @@ protected function barcode_code11($code) {
}
return $bararray;
}
-
+
/**
* Pharmacode
* Contains digits (0 to 9)
@@ -1650,7 +1650,7 @@ protected function barcode_pharmacode($code) {
$bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array());
return $this->binseq_to_array($seq, $bararray);
}
-
+
/**
* Pharmacode two-track
* Contains digits (0 to 9)
@@ -1685,7 +1685,7 @@ protected function barcode_pharmacode2t($code) {
$bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 2, 'bcode' => array());
$len = strlen($seq);
for ($i = 0; $i < $len; ++$i) {
- switch ($seq{$i}) {
+ switch ($seq[$i]) {
case '1': {
$p = 1;
$h = 1;
@@ -1710,11 +1710,11 @@ protected function barcode_pharmacode2t($code) {
--$bararray['maxw'];
return $bararray;
}
-
-
+
+
/**
* IMB - Intelligent Mail Barcode - Onecode - USPS-B-3200
- * (requires PHP bcmath extension)
+ * (requires PHP bcmath extension)
* Intelligent Mail barcode is a 65-bar code for use on mail in the United States.
* The fields are described as follows:- The Barcode Identifier shall be assigned by USPS to encode the presort identification that is currently printed in human readable form on the optional endorsement line (OEL) as well as for future USPS use. This shall be two digits, with the second digit in the range of 0–4. The allowable encoding ranges shall be 00–04, 10–14, 20–24, 30–34, 40–44, 50–54, 60–64, 70–74, 80–84, and 90–94.
- The Service Type Identifier shall be assigned by USPS for any combination of services requested on the mailpiece. The allowable encoding range shall be 000http://it2.php.net/manual/en/function.dechex.php–999. Each 3-digit value shall correspond to a particular mail class with a particular combination of service(s). Each service program, such as OneCode Confirm and OneCode ACS, shall provide the list of Service Type Identifier values.
- The Mailer or Customer Identifier shall be assigned by USPS as a unique, 6 or 9 digit number that identifies a business entity. The allowable encoding range for the 6 digit Mailer ID shall be 000000- 899999, while the allowable encoding range for the 9 digit Mailer ID shall be 900000000-999999999.
- The Serial or Sequence Number shall be assigned by the mailer for uniquely identifying and tracking mailpieces. The allowable encoding range shall be 000000000–999999999 when used with a 6 digit Mailer ID and 000000-999999 when used with a 9 digit Mailer ID. e. The Delivery Point ZIP Code shall be assigned by the mailer for routing the mailpiece. This shall replace POSTNET for routing the mailpiece to its final delivery point. The length may be 0, 5, 9, or 11 digits. The allowable encoding ranges shall be no ZIP Code, 00000–99999, 000000000–999999999, and 00000000000–99999999999.
* @param string $code code to print, separate the ZIP (routing code) from the rest using a minus char '-' (BarcodeID_ServiceTypeID_MailerID_SerialNumber-RoutingCode)
@@ -1757,9 +1757,9 @@ protected function barcode_imb($code) {
}
}
$binary_code = bcmul($binary_code, 10);
- $binary_code = bcadd($binary_code, $tracking_number{0});
+ $binary_code = bcadd($binary_code, $tracking_number[0]);
$binary_code = bcmul($binary_code, 5);
- $binary_code = bcadd($binary_code, $tracking_number{1});
+ $binary_code = bcadd($binary_code, $tracking_number[1]);
$binary_code .= substr($tracking_number, 2, 18);
// convert to hexadecimal
$binary_code = $this->dec_to_hex($binary_code);
@@ -1838,10 +1838,10 @@ protected function barcode_imb($code) {
--$bararray['maxw'];
return $bararray;
}
-
+
/**
* Convert large integer number to hexadecimal representation.
- * (requires PHP bcmath extension)
+ * (requires PHP bcmath extension)
* @param string $number number to convert specified as a string
* @return string hexadecimal representation
*/
@@ -1862,10 +1862,10 @@ public function dec_to_hex($number) {
$hex = array_reverse($hex);
return implode($hex);
}
-
+
/**
* Convert large hexadecimal number to decimal representation (string).
- * (requires PHP bcmath extension)
+ * (requires PHP bcmath extension)
* @param string $hex hexadecimal number to convert specified as a string
* @return string hexadecimal representation
*/
@@ -1874,12 +1874,12 @@ public function hex_to_dec($hex) {
$bitval = 1;
$len = strlen($hex);
for($pos = ($len - 1); $pos >= 0; --$pos) {
- $dec = bcadd($dec, bcmul(hexdec($hex{$pos}), $bitval));
+ $dec = bcadd($dec, bcmul(hexdec($hex[$pos]), $bitval));
$bitval = bcmul($bitval, 16);
}
return $dec;
- }
-
+ }
+
/**
* Intelligent Mail Barcode calculation of Frame Check Sequence
* @param string $code_arr array of hexadecimal values (13 bytes holding 102 bits right justified).
@@ -1913,9 +1913,9 @@ protected function imb_crc11fcs($code_arr) {
$data <<= 1;
}
}
- return $fcs;
+ return $fcs;
}
-
+
/**
* Reverse unsigned short value
* @param int $num value to reversr
@@ -1931,7 +1931,7 @@ protected function imb_reverse_us($num) {
}
return $rev;
}
-
+
/**
* generate Nof13 tables used for Intelligent Mail Barcode
* @param int $n is the type of table: 2 for 2of13 table, 5 for 5of13table
@@ -1969,10 +1969,10 @@ protected function imb_tables($n, $size) {
}
return $table;
}
-
+
} // end of class
//============================================================+
-// END OF FILE
+// END OF FILE
//============================================================+
?>
diff --git a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Shared/PDF/tcpdf.php b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Shared/PDF/tcpdf.php
index e527f75f..d1eb2027 100644
--- a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Shared/PDF/tcpdf.php
+++ b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Shared/PDF/tcpdf.php
@@ -8,29 +8,29 @@
// License : GNU LGPL (http://www.gnu.org/copyleft/lesser.html)
// ----------------------------------------------------------------------------
// Copyright (C) 2002-2009 Nicola Asuni - Tecnick.com S.r.l.
-//
+//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 2.1 of the License, or
// (at your option) any later version.
-//
+//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
-//
+//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see .
-//
+//
// See LICENSE.TXT file for more information.
// ----------------------------------------------------------------------------
//
-// Description : This is a PHP class for generating PDF documents without
+// Description : This is a PHP class for generating PDF documents without
// requiring external extensions.
//
// NOTE:
-// This class was originally derived in 2002 from the Public
-// Domain FPDF class by Olivier Plathey (http://www.fpdf.org),
+// This class was originally derived in 2002 from the Public
+// Domain FPDF class by Olivier Plathey (http://www.fpdf.org),
// but now is almost entirely rewritten.
//
// Main features:
@@ -62,7 +62,7 @@
//
// -----------------------------------------------------------
// THANKS TO:
-//
+//
// Olivier Plathey (http://www.fpdf.org) for original FPDF.
// Efthimios Mavrogeorgiadis (emavro@yahoo.com) for suggestions on RTL language support.
// Klemen Vodopivec (http://www.fpdf.de/downloads/addons/37/) for Encryption algorithm.
@@ -151,9 +151,9 @@
if (!class_exists('TCPDF', false)) {
/**
* define default PDF document producer
- */
+ */
define('PDF_PRODUCER', 'TCPDF 4.8.009 (http://www.tcpdf.org)');
-
+
/**
* This is a PHP class for generating PDF documents without requiring external extensions.
* TCPDF project (http://www.tcpdf.org) has been originally derived in 2002 from the Public Domain FPDF class by Olivier Plathey (http://www.fpdf.org), but now is almost entirely rewritten.
@@ -165,7 +165,7 @@
* @license http://www.gnu.org/copyleft/lesser.html LGPL
*/
class TCPDF {
-
+
// protected or Protected properties
/**
@@ -173,7 +173,7 @@ class TCPDF {
* @access protected
*/
protected $page;
-
+
/**
* @var current object number
* @access protected
@@ -209,7 +209,7 @@ class TCPDF {
* @access protected
*/
protected $compress;
-
+
/**
* @var current page orientation (P = Portrait, L = Landscape)
* @access protected
@@ -294,7 +294,7 @@ class TCPDF {
*/
//protected
public $cMargin;
-
+
/**
* @var cell internal padding (previous value)
* @access protected
@@ -378,14 +378,14 @@ class TCPDF {
* @access protected
*/
protected $FontStyle;
-
+
/**
* @var current font ascent (distance between font top and baseline)
* @access protected
* @since 2.8.000 (2007-03-29)
*/
protected $FontAscent;
-
+
/**
* @var current font descent (distance between font bottom and baseline)
* @access protected
@@ -506,13 +506,13 @@ class TCPDF {
* @access protected
*/
protected $AliasNbPages = '{nb}';
-
+
/**
* @var alias for page number
* @access protected
*/
protected $AliasNumPage = '{pnb}';
-
+
/**
* @var right-bottom corner X coordinate of inserted image
* @since 2002-07-31
@@ -551,282 +551,282 @@ class TCPDF {
* @access protected
*/
protected $PDFVersion = '1.7';
-
-
+
+
// ----------------------
-
+
/**
* @var Minimum distance between header and top page margin.
* @access protected
*/
protected $header_margin;
-
+
/**
* @var Minimum distance between footer and bottom page margin.
* @access protected
*/
protected $footer_margin;
-
+
/**
* @var original left margin value
* @access protected
* @since 1.53.0.TC013
*/
protected $original_lMargin;
-
+
/**
* @var original right margin value
* @access protected
* @since 1.53.0.TC013
*/
protected $original_rMargin;
-
+
/**
* @var Header font.
* @access protected
*/
protected $header_font;
-
+
/**
* @var Footer font.
* @access protected
*/
protected $footer_font;
-
+
/**
* @var Language templates.
* @access protected
*/
protected $l;
-
+
/**
* @var Barcode to print on page footer (only if set).
* @access protected
*/
protected $barcode = false;
-
+
/**
* @var If true prints header
* @access protected
*/
protected $print_header = true;
-
+
/**
* @var If true prints footer.
* @access protected
*/
protected $print_footer = true;
-
+
/**
* @var Header image logo.
* @access protected
*/
protected $header_logo = '';
-
+
/**
* @var Header image logo width in mm.
* @access protected
*/
protected $header_logo_width = 30;
-
+
/**
* @var String to print as title on document header.
* @access protected
*/
protected $header_title = '';
-
+
/**
* @var String to print on document header.
* @access protected
*/
protected $header_string = '';
-
+
/**
* @var Default number of columns for html table.
* @access protected
*/
protected $default_table_columns = 4;
-
-
+
+
// variables for html parser
-
+
/**
* @var HTML PARSER: array to store current link and rendering styles.
* @access protected
*/
protected $HREF = array();
-
+
/**
* @var store a list of available fonts on filesystem.
* @access protected
*/
protected $fontlist = array();
-
+
/**
* @var current foreground color
* @access protected
*/
protected $fgcolor;
-
+
/**
* @var HTML PARSER: array of boolean values, true in case of ordered list (OL), false otherwise.
* @access protected
*/
protected $listordered = array();
-
+
/**
* @var HTML PARSER: array count list items on nested lists.
* @access protected
*/
protected $listcount = array();
-
+
/**
* @var HTML PARSER: current list nesting level.
* @access protected
*/
protected $listnum = 0;
-
+
/**
* @var HTML PARSER: indent amount for lists.
* @access protected
*/
protected $listindent;
-
+
/**
* @var current background color
* @access protected
*/
protected $bgcolor;
-
+
/**
* @var Store temporary font size in points.
* @access protected
*/
protected $tempfontsize = 10;
-
+
/**
* @var spacer for LI tags.
* @access protected
*/
protected $lispacer = '';
-
+
/**
* @var default encoding
* @access protected
* @since 1.53.0.TC010
*/
protected $encoding = 'UTF-8';
-
+
/**
* @var PHP internal encoding
* @access protected
* @since 1.53.0.TC016
*/
protected $internal_encoding;
-
+
/**
* @var indicates if the document language is Right-To-Left
* @access protected
* @since 2.0.000
*/
protected $rtl = false;
-
+
/**
* @var used to force RTL or LTR string inversion
* @access protected
* @since 2.0.000
*/
protected $tmprtl = false;
-
+
// --- Variables used for document encryption:
-
+
/**
* Indicates whether document is protected
* @access protected
* @since 2.0.000 (2008-01-02)
*/
protected $encrypted;
-
+
/**
* U entry in pdf document
* @access protected
* @since 2.0.000 (2008-01-02)
*/
protected $Uvalue;
-
+
/**
* O entry in pdf document
* @access protected
* @since 2.0.000 (2008-01-02)
*/
protected $Ovalue;
-
+
/**
* P entry in pdf document
* @access protected
* @since 2.0.000 (2008-01-02)
*/
protected $Pvalue;
-
+
/**
* encryption object id
* @access protected
* @since 2.0.000 (2008-01-02)
*/
protected $enc_obj_id;
-
+
/**
* last RC4 key encrypted (cached for optimisation)
* @access protected
* @since 2.0.000 (2008-01-02)
*/
protected $last_rc4_key;
-
+
/**
* last RC4 computed key
* @access protected
* @since 2.0.000 (2008-01-02)
*/
protected $last_rc4_key_c;
-
+
/**
* RC4 padding
* @access protected
*/
protected $padding = "\x28\xBF\x4E\x5E\x4E\x75\x8A\x41\x64\x00\x4E\x56\xFF\xFA\x01\x08\x2E\x2E\x00\xB6\xD0\x68\x3E\x80\x2F\x0C\xA9\xFE\x64\x53\x69\x7A";
-
+
/**
* RC4 encryption key
* @access protected
*/
protected $encryption_key;
-
+
// --- bookmark ---
-
+
/**
* Outlines for bookmark
* @access protected
* @since 2.1.002 (2008-02-12)
*/
protected $outlines = array();
-
+
/**
* Outline root for bookmark
* @access protected
* @since 2.1.002 (2008-02-12)
*/
protected $OutlineRoot;
-
-
+
+
// --- javascript and form ---
-
+
/**
* javascript code
* @access protected
* @since 2.1.002 (2008-02-12)
*/
protected $javascript = '';
-
+
/**
* javascript counter
* @access protected
@@ -885,91 +885,91 @@ class TCPDF {
* @since 3.0.000 (2008-03-27)
*/
protected $dpi = 72;
-
+
/**
* Array of page numbers were a new page group was started
* @access protected
* @since 3.0.000 (2008-03-27)
*/
protected $newpagegroup = array();
-
+
/**
* Contains the number of pages of the groups
* @access protected
* @since 3.0.000 (2008-03-27)
*/
protected $pagegroups;
-
+
/**
* Contains the alias of the current page group
* @access protected
* @since 3.0.000 (2008-03-27)
*/
- protected $currpagegroup;
-
+ protected $currpagegroup;
+
/**
* Restrict the rendering of some elements to screen or printout.
* @access protected
* @since 3.0.000 (2008-03-27)
*/
protected $visibility = 'all';
-
+
/**
* Print visibility.
* @access protected
* @since 3.0.000 (2008-03-27)
*/
protected $n_ocg_print;
-
+
/**
* View visibility.
* @access protected
* @since 3.0.000 (2008-03-27)
*/
protected $n_ocg_view;
-
+
/**
* Array of transparency objects and parameters.
* @access protected
* @since 3.0.000 (2008-03-27)
*/
protected $extgstates;
-
+
/**
* Set the default JPEG compression quality (1-100)
* @access protected
* @since 3.0.000 (2008-03-27)
*/
protected $jpeg_quality;
-
+
/**
* Default cell height ratio.
* @access protected
* @since 3.0.014 (2008-05-23)
*/
protected $cell_height_ratio = K_CELL_HEIGHT_RATIO;
-
+
/**
* PDF viewer preferences.
* @access protected
* @since 3.1.000 (2008-06-09)
*/
protected $viewer_preferences;
-
+
/**
* A name object specifying how the document should be displayed when opened.
* @access protected
* @since 3.1.000 (2008-06-09)
*/
protected $PageMode;
-
+
/**
* Array for storing gradient information.
* @access protected
* @since 3.1.000 (2008-06-09)
*/
protected $gradients = array();
-
+
/**
* Array used to store positions inside the pages buffer.
* keys are the page numbers
@@ -977,7 +977,7 @@ class TCPDF {
* @since 3.2.000 (2008-06-26)
*/
protected $intmrk = array();
-
+
/**
* Array used to store content positions inside the pages buffer.
* keys are the page numbers
@@ -985,99 +985,99 @@ class TCPDF {
* @since 4.6.021 (2009-07-20)
*/
protected $cntmrk = array();
-
+
/**
* Array used to store footer positions of each page.
* @access protected
* @since 3.2.000 (2008-07-01)
*/
protected $footerpos = array();
-
-
+
+
/**
* Array used to store footer lenght of each page.
* @access protected
* @since 4.0.014 (2008-07-29)
*/
protected $footerlen = array();
-
+
/**
* True if a newline is created.
* @access protected
* @since 3.2.000 (2008-07-01)
*/
protected $newline = true;
-
+
/**
* End position of the latest inserted line
* @access protected
* @since 3.2.000 (2008-07-01)
*/
protected $endlinex = 0;
-
+
/**
* PDF string for last line width
* @access protected
* @since 4.0.006 (2008-07-16)
*/
protected $linestyleWidth = '';
-
+
/**
* PDF string for last line width
* @access protected
* @since 4.0.006 (2008-07-16)
*/
protected $linestyleCap = '0 J';
-
+
/**
* PDF string for last line width
* @access protected
* @since 4.0.006 (2008-07-16)
*/
protected $linestyleJoin = '0 j';
-
+
/**
* PDF string for last line width
* @access protected
* @since 4.0.006 (2008-07-16)
*/
protected $linestyleDash = '[] 0 d';
-
+
/**
* True if marked-content sequence is open
* @access protected
* @since 4.0.013 (2008-07-28)
*/
protected $openMarkedContent = false;
-
+
/**
* Count the latest inserted vertical spaces on HTML
* @access protected
* @since 4.0.021 (2008-08-24)
*/
protected $htmlvspace = 0;
-
+
/**
* Array of Spot colors
* @access protected
* @since 4.0.024 (2008-09-12)
*/
protected $spot_colors = array();
-
+
/**
* Symbol used for HTML unordered list items
* @access protected
* @since 4.0.028 (2008-09-26)
*/
protected $lisymbol = '';
-
+
/**
* String used to mark the beginning and end of EPS image blocks
* @access protected
* @since 4.1.000 (2008-10-18)
*/
protected $epsmarker = 'x#!#EPS#!#x';
-
+
/**
* Array of transformation matrix
* @access protected
@@ -1098,21 +1098,21 @@ class TCPDF {
* @since 4.2.000 (2008-10-29)
*/
protected $booklet = false;
-
+
/**
* Epsilon value used for float calculations
* @access protected
* @since 4.2.000 (2008-10-29)
*/
protected $feps = 0.005;
-
+
/**
* Array used for custom vertical spaces for HTML tags
* @access protected
* @since 4.2.001 (2008-10-30)
*/
protected $tagvspaces = array();
-
+
/**
* @var HTML PARSER: custom indent amount for lists.
* Negative value means disabled.
@@ -1120,7 +1120,7 @@ class TCPDF {
* @since 4.2.007 (2008-11-12)
*/
protected $customlistindent = -1;
-
+
/**
* @var if true keeps the border open for the cell sides that cross the page.
* @access protected
@@ -1219,7 +1219,7 @@ class TCPDF {
* @since 4.5.000 (2009-01-02)
*/
protected $fontkeys = array();
-
+
/**
* Store the font object IDs.
* @access protected
@@ -1233,7 +1233,7 @@ class TCPDF {
* @since 4.5.000 (2009-01-02)
*/
protected $pageopen = array();
-
+
/**
* Default monospaced font
* @access protected
@@ -1359,28 +1359,28 @@ class TCPDF {
* @since 4.7.000 (2009-08-29)
*/
protected $annots_start_obj_id = 200000;
-
+
/**
* Max ID of annotation object
* @access protected
* @since 4.7.000 (2009-08-29)
*/
protected $annot_obj_id = 200000;
-
+
/**
* Current ID of annotation object
* @access protected
* @since 4.8.003 (2009-09-15)
*/
protected $curr_annot_obj_id = 200000;
-
+
/**
* List of form annotations IDs
* @access protected
* @since 4.8.000 (2009-09-07)
*/
protected $form_obj_id = array();
-
+
/*
* Deafult Javascript field properties. Possible values are described on official Javascript for Acrobat API reference. Annotation options can be directly specified using the 'aopt' entry.
* @access protected
@@ -1401,14 +1401,14 @@ class TCPDF {
* @since 4.8.000 (2009-09-07)
*/
protected $js_start_obj_id = 300000;
-
+
/**
* Current ID of javascript object
* @access protected
* @since 4.8.000 (2009-09-07)
*/
protected $js_obj_id = 300000;
-
+
/**
* Current form action (used during XHTML rendering)
* @access protected
@@ -1436,56 +1436,56 @@ class TCPDF {
* @since 4.8.001 (2009-09-09)
*/
protected $apxo_start_obj_id = 400000;
-
+
/**
* Current ID of appearance streams XObjects
* @access protected
* @since 4.8.001 (2009-09-09)
*/
protected $apxo_obj_id = 400000;
-
+
/**
* List of fonts used on form fields (fontname => fontkey).
* @access protected
* @since 4.8.001 (2009-09-09)
*/
protected $annotation_fonts = array();
-
+
/**
* List of radio buttons parent objects.
* @access protected
* @since 4.8.001 (2009-09-09)
*/
protected $radiobutton_groups = array();
-
+
/**
* List of radio group objects IDs
* @access protected
* @since 4.8.001 (2009-09-09)
*/
protected $radio_groups = array();
-
+
/**
- * Text indentation value (used for text-indent CSS attribute)
+ * Text indentation value (used for text-indent CSS attribute)
* @access protected
* @since 4.8.006 (2009-09-23)
*/
protected $textindent = 0;
-
+
/**
* Store page number when startTransaction() is called.
* @access protected
* @since 4.8.006 (2009-09-23)
*/
protected $start_transaction_page = 0;
-
+
//------------------------------------------------------------
// METHODS
//------------------------------------------------------------
/**
- * This is the class constructor.
- * It allows to set up the page format, the orientation and
+ * This is the class constructor.
+ * It allows to set up the page format, the orientation and
* the measure unit used in all the methods (except for the font sizes).
* @since 1.0
* @param string $orientation page orientation. Possible values are (case insensitive):- P or Portrait (default)
- L or Landscape
@@ -1591,7 +1591,7 @@ public function __construct($orientation='P', $unit='mm', $format='A4', $unicode
$this->ur_document = '/FullSave';
$this->ur_annots = '/Create/Delete/Modify/Copy/Import/Export';
$this->ur_form = '/Add/Delete/FillIn/Import/Export/SubmitStandalone/SpawnTemplate';
- $this->ur_signature = '/Modify';
+ $this->ur_signature = '/Modify';
// set default JPEG quality
$this->jpeg_quality = 75;
// initialize some settings
@@ -1616,7 +1616,7 @@ public function __construct($orientation='P', $unit='mm', $format='A4', $unicode
$this->js_obj_id = $this->js_start_obj_id;
$this->default_form_prop = array('lineWidth'=>1, 'borderStyle'=>'solid', 'fillColor'=>array(255, 255, 255), 'strokeColor'=>array(128, 128, 128));
}
-
+
/**
* Default destructor.
* @access public
@@ -1630,7 +1630,7 @@ public function __destruct() {
// unset all class variables
$this->_destroy(true);
}
-
+
/**
* Set the units of measure for the document.
* @param string $unit User measure unit. Possible values are:- pt: point
- mm: millimeter (default)
- cm: centimeter
- in: inch
A point equals 1/72 of inch, that is to say about 0.35 mm (an inch being 2.54 cm). This is a very common unit in typography; font sizes are expressed in that unit.
@@ -1671,7 +1671,7 @@ public function setPageUnit($unit) {
$this->setPageOrientation($this->CurOrientation);
}
}
-
+
/**
* Set the page format
* @param mixed $format The format used for pages. It can be either one of the following values (case insensitive) or a custom format in the form of a two-element array containing the width and the height (expressed in the unit given by unit).- 4A0
- 2A0
- A0
- A1
- A2
- A3
- A4 (default)
- A5
- A6
- A7
- A8
- A9
- A10
- B0
- B1
- B2
- B3
- B4
- B5
- B6
- B7
- B8
- B9
- B10
- C0
- C1
- C2
- C3
- C4
- C5
- C6
- C7
- C8
- C9
- C10
- RA0
- RA1
- RA2
- RA3
- RA4
- SRA0
- SRA1
- SRA2
- SRA3
- SRA4
- LETTER
- LEGAL
- EXECUTIVE
- FOLIO
@@ -1743,7 +1743,7 @@ public function setPageFormat($format, $orientation='P') {
}
$this->setPageOrientation($orientation);
}
-
+
/**
* Set page orientation.
* @param string $orientation page orientation. Possible values are (case insensitive):- P or PORTRAIT (default)
- L or LANDSCAPE
@@ -1786,7 +1786,7 @@ public function setPageOrientation($orientation, $autopagebreak='', $bottommargi
// store page dimensions
$this->pagedim[$this->page] = array('w' => $this->wPt, 'h' => $this->hPt, 'wk' => $this->w, 'hk' => $this->h, 'tm' => $this->tMargin, 'bm' => $bottommargin, 'lm' => $this->lMargin, 'rm' => $this->rMargin, 'pb' => $autopagebreak, 'or' => $this->CurOrientation, 'olm' => $this->original_lMargin, 'orm' => $this->original_rMargin);
}
-
+
/**
* Set regular expression to detect withespaces or word separators.
* @param string $re regular expression (leave empty for default).
@@ -1800,7 +1800,7 @@ public function setSpacesRE($re='/[\s]/') {
// \p{Lo} is needed because Chinese characters are packed next to each other without spaces in between.
$this->re_spaces = $re;
}
-
+
/**
* Enable or disable Right-To-Left language mode
* @param Boolean $enable if true enable Right-To-Left language mode.
@@ -1817,7 +1817,7 @@ public function setRTL($enable, $resetx=true) {
$this->Ln(0);
}
}
-
+
/**
* Return the RTL status
* @return boolean
@@ -1827,7 +1827,7 @@ public function setRTL($enable, $resetx=true) {
public function getRTL() {
return $this->rtl;
}
-
+
/**
* Force temporary RTL language direction
* @param mixed $mode can be false, 'L' for LTR or 'R' for RTL
@@ -1843,7 +1843,7 @@ public function setTempRTL($mode) {
}
}
}
-
+
/**
* Set the last cell height.
* @param float $h cell height.
@@ -1854,7 +1854,7 @@ public function setTempRTL($mode) {
public function setLastH($h) {
$this->lasth = $h;
}
-
+
/**
* Get the last cell height.
* @return last cell height
@@ -1864,7 +1864,7 @@ public function setLastH($h) {
public function getLastH() {
return $this->lasth;
}
-
+
/**
* Set the adjusting factor to convert pixels to user units.
* @param float $scale adjusting factor to convert pixels to user units.
@@ -1886,7 +1886,7 @@ public function setImageScale($scale) {
public function getImageScale() {
return $this->imgscale;
}
-
+
/**
* Returns an array of page dimensions:
* - $this->pagedim[$this->page]['w'] => page_width_in_points
- $this->pagedim[$this->page]['h'] => height in points
- $this->pagedim[$this->page]['wk'] => page_width_in_points
- $this->pagedim[$this->page]['hk'] => height
- $this->pagedim[$this->page]['tm'] => top_margin
- $this->pagedim[$this->page]['bm'] => bottom_margin
- $this->pagedim[$this->page]['lm'] => left_margin
- $this->pagedim[$this->page]['rm'] => right_margin
- $this->pagedim[$this->page]['pb'] => auto_page_break
- $this->pagedim[$this->page]['or'] => page_orientation
- $this->pagedim[$this->page]['olm'] => original_left_margin
- $this->pagedim[$this->page]['orm'] => original_right_margin
@@ -1902,7 +1902,7 @@ public function getPageDimensions($pagenum='') {
}
return $this->pagedim[$pagenum];
}
-
+
/**
* Returns the page width in units.
* @param int $pagenum page number (empty = current page)
@@ -2205,7 +2205,7 @@ public function SetCreator($creator) {
//Creator of document
$this->creator = $creator;
}
-
+
/**
* This method is automatically called in case of fatal error; it simply outputs the message and halts the execution. An inherited class may override it to customize the error handling but should always halt the script, or the resulting document would probably be invalid.
* 2004-06-11 :: Nicola Asuni : changed bold tag with strong
@@ -2255,7 +2255,7 @@ public function Close() {
// unset all class variables (except critical ones)
$this->_destroy(false);
}
-
+
/**
* Move pointer at the specified document page and update page dimensions.
* @param int $pnum page number
@@ -2303,7 +2303,7 @@ public function setPage($pnum, $resetmargins=false) {
$this->Error('Wrong page number on setPage() function.');
}
}
-
+
/**
* Reset pointer to the last document page.
* @param boolean $resetmargins if true reset left, right, top margins and Y position.
@@ -2314,7 +2314,7 @@ public function setPage($pnum, $resetmargins=false) {
public function lastPage($resetmargins=false) {
$this->setPage($this->getNumPages(), $resetmargins);
}
-
+
/**
* Get current document page number.
* @return int page number
@@ -2325,8 +2325,8 @@ public function lastPage($resetmargins=false) {
public function getPage() {
return $this->page;
}
-
-
+
+
/**
* Get the total number of insered pages.
* @return int number of pages
@@ -2422,7 +2422,7 @@ protected function startPage($orientation='', $format='') {
// print table header (if any)
$this->setTableHeader();
}
-
+
/**
* Set start-writing mark on current page for multicell borders and fills.
* This function must be called after calling Image() function for a background image.
@@ -2434,7 +2434,7 @@ public function setPageMark() {
$this->intmrk[$this->page] = $this->pagelen[$this->page];
$this->setContentMark();
}
-
+
/**
* Set start-writing mark on selected page.
* @param int $page page number (default is the current page)
@@ -2451,7 +2451,7 @@ protected function setContentMark($page=0) {
$this->cntmrk[$page] = $this->pagelen[$page];
}
}
-
+
/**
* Set header data.
* @param string $ln header image logo
@@ -2466,7 +2466,7 @@ public function setHeaderData($ln='', $lw=0, $ht='', $hs='') {
$this->header_title = $ht;
$this->header_string = $hs;
}
-
+
/**
* Returns header data:
* - $ret['logo'] = logo image
- $ret['logo_width'] = width of the image logo in user units
- $ret['title'] = header title
- $ret['string'] = header description string
@@ -2482,7 +2482,7 @@ public function getHeaderData() {
$ret['string'] = $this->header_string;
return $ret;
}
-
+
/**
* Set header margin.
* (minimum distance between header and top page margin)
@@ -2492,7 +2492,7 @@ public function getHeaderData() {
public function setHeaderMargin($hm=10) {
$this->header_margin = $hm;
}
-
+
/**
* Returns header margin in user units.
* @return float
@@ -2502,7 +2502,7 @@ public function setHeaderMargin($hm=10) {
public function getHeaderMargin() {
return $this->header_margin;
}
-
+
/**
* Set footer margin.
* (minimum distance between footer and bottom page margin)
@@ -2512,7 +2512,7 @@ public function getHeaderMargin() {
public function setFooterMargin($fm=10) {
$this->footer_margin = $fm;
}
-
+
/**
* Returns footer margin in user units.
* @return float
@@ -2524,40 +2524,40 @@ public function getFooterMargin() {
}
/**
* Set a flag to print page header.
- * @param boolean $val set to true to print the page header (default), false otherwise.
+ * @param boolean $val set to true to print the page header (default), false otherwise.
* @access public
*/
public function setPrintHeader($val=true) {
$this->print_header = $val;
}
-
+
/**
* Set a flag to print page footer.
- * @param boolean $value set to true to print the page footer (default), false otherwise.
+ * @param boolean $value set to true to print the page footer (default), false otherwise.
* @access public
*/
public function setPrintFooter($val=true) {
$this->print_footer = $val;
}
-
+
/**
* Return the right-bottom (or left-bottom for RTL) corner X coordinate of last inserted image
- * @return float
+ * @return float
* @access public
*/
public function getImageRBX() {
return $this->img_rb_x;
}
-
+
/**
* Return the right-bottom (or left-bottom for RTL) corner Y coordinate of last inserted image
- * @return float
+ * @return float
* @access public
*/
public function getImageRBY() {
return $this->img_rb_y;
}
-
+
/**
* This method is used to render the page header.
* It is automatically called by AddPage() and could be overwritten in your own inherited class.
@@ -2583,7 +2583,7 @@ public function Header() {
$this->SetTextColor(0, 0, 0);
// header title
$this->SetFont($headerfont[0], 'B', $headerfont[2] + 1);
- $this->SetX($header_x);
+ $this->SetX($header_x);
$this->Cell(0, $cell_height, $headerdata['title'], 0, 1, '', 0, '', 0);
// header string
$this->SetFont($headerfont[0], $headerfont[1], $headerfont[2]);
@@ -2599,16 +2599,16 @@ public function Header() {
}
$this->Cell(0, 0, '', 'T', 0, 'C');
}
-
+
/**
- * This method is used to render the page footer.
+ * This method is used to render the page footer.
* It is automatically called by AddPage() and could be overwritten in your own inherited class.
* @access public
*/
- public function Footer() {
+ public function Footer() {
$cur_y = $this->GetY();
$ormargins = $this->getOriginalMargins();
- $this->SetTextColor(0, 0, 0);
+ $this->SetTextColor(0, 0, 0);
//set style for cell border
$line_width = 0.85 / $this->getScaleFactor();
$this->SetLineStyle(array('width' => $line_width, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
@@ -2617,13 +2617,13 @@ public function Footer() {
if (!empty($barcode)) {
$this->Ln($line_width);
$barcode_width = round(($this->getPageWidth() - $ormargins['left'] - $ormargins['right'])/3);
- $this->write1DBarcode($barcode, 'C128B', $this->GetX(), $cur_y + $line_width, $barcode_width, (($this->getFooterMargin() / 3) - $line_width), 0.3, '', '');
+ $this->write1DBarcode($barcode, 'C128B', $this->GetX(), $cur_y + $line_width, $barcode_width, (($this->getFooterMargin() / 3) - $line_width), 0.3, '', '');
}
if (empty($this->pagegroups)) {
$pagenumtxt = $this->l['w_page'].' '.$this->getAliasNumPage().' / '.$this->getAliasNbPages();
} else {
$pagenumtxt = $this->l['w_page'].' '.$this->getPageNumGroupAlias().' / '.$this->getPageGroupAlias();
- }
+ }
$this->SetY($cur_y);
//Print page number
if ($this->getRTL()) {
@@ -2634,9 +2634,9 @@ public function Footer() {
$this->Cell(0, 0, $pagenumtxt, 'T', 0, 'R');
}
}
-
+
/**
- * This method is used to render the page header.
+ * This method is used to render the page header.
* @access protected
* @since 4.0.012 (2008-07-24)
*/
@@ -2665,9 +2665,9 @@ protected function setHeader() {
$this->lasth = $lasth;
}
}
-
+
/**
- * This method is used to render the page footer.
+ * This method is used to render the page footer.
* @access protected
* @since 4.0.012 (2008-07-24)
*/
@@ -2709,7 +2709,7 @@ protected function setFooter() {
}
/**
- * This method is used to render the table header on new page (if any).
+ * This method is used to render the table header on new page (if any).
* @access protected
* @since 4.5.030 (2009-03-25)
*/
@@ -2740,7 +2740,7 @@ protected function setTableHeader() {
$this->rMargin = $prev_rMargin;
}
}
-
+
/**
* Returns the current page number.
* @return int page number
@@ -2753,8 +2753,8 @@ public function PageNo() {
}
/**
- * Defines a new spot color.
- * It can be expressed in RGB components or gray scale.
+ * Defines a new spot color.
+ * It can be expressed in RGB components or gray scale.
* The method can be called before the first page is created and the value is retained from page to page.
* @param int $c Cyan color for CMYK. Value between 0 and 255
* @param int $m Magenta color for CMYK. Value between 0 and 255
@@ -2772,8 +2772,8 @@ public function AddSpotColor($name, $c, $m, $y, $k) {
}
/**
- * Defines the color used for all drawing operations (lines, rectangles and cell borders).
- * It can be expressed in RGB components or gray scale.
+ * Defines the color used for all drawing operations (lines, rectangles and cell borders).
+ * It can be expressed in RGB components or gray scale.
* The method can be called before the first page is created and the value is retained from page to page.
* @param array $color array of colors
* @access public
@@ -2832,7 +2832,7 @@ public function SetDrawColor($col1=0, $col2=-1, $col3=-1, $col4=-1) {
$this->_out($this->DrawColor);
}
}
-
+
/**
* Defines the spot color used for all drawing operations (lines, rectangles and cell borders).
* @param string $name name of the spot color
@@ -2850,10 +2850,10 @@ public function SetDrawSpotColor($name, $tint=100) {
$this->_out($this->DrawColor);
}
}
-
+
/**
- * Defines the color used for all filling operations (filled rectangles and cell backgrounds).
- * It can be expressed in RGB components or gray scale.
+ * Defines the color used for all filling operations (filled rectangles and cell backgrounds).
+ * It can be expressed in RGB components or gray scale.
* The method can be called before the first page is created and the value is retained from page to page.
* @param array $color array of colors
* @access public
@@ -2872,7 +2872,7 @@ public function SetFillColorArray($color) {
}
}
}
-
+
/**
* Defines the color used for all filling operations (filled rectangles and cell backgrounds). It can be expressed in RGB components or gray scale. The method can be called before the first page is created and the value is retained from page to page.
* @param int $col1 Gray level for single color, or Red color for RGB, or Cyan color for CMYK. Value between 0 and 255
@@ -2916,7 +2916,7 @@ public function SetFillColor($col1=0, $col2=-1, $col3=-1, $col4=-1) {
$this->_out($this->FillColor);
}
}
-
+
/**
* Defines the spot color used for all filling operations (filled rectangles and cell backgrounds).
* @param string $name name of the spot color
@@ -2935,9 +2935,9 @@ public function SetFillSpotColor($name, $tint=100) {
$this->_out($this->FillColor);
}
}
-
+
/**
- * Defines the color used for text. It can be expressed in RGB components or gray scale.
+ * Defines the color used for text. It can be expressed in RGB components or gray scale.
* The method can be called before the first page is created and the value is retained from page to page.
* @param array $color array of colors
* @access public
@@ -2997,7 +2997,7 @@ public function SetTextColor($col1=0, $col2=-1, $col3=-1, $col4=-1) {
}
$this->ColorFlag = ($this->FillColor != $this->TextColor);
}
-
+
/**
* Defines the spot color used for text.
* @param string $name name of the spot color
@@ -3031,7 +3031,7 @@ public function SetTextSpotColor($name, $tint=100) {
public function GetStringWidth($s, $fontname='', $fontstyle='', $fontsize=0) {
return $this->GetArrStringWidth($this->utf8Bidi($this->UTF8StringToArray($s), $s, $this->tmprtl), $fontname, $fontstyle, $fontsize);
}
-
+
/**
* Returns the string length of an array of chars in user unit. A font must be selected.
* @param string $sa The array of chars whose total length is to be computed
@@ -3061,7 +3061,7 @@ public function GetArrStringWidth($sa, $fontname='', $fontstyle='', $fontsize=0)
}
return $w;
}
-
+
/**
* Returns the length of the char in user unit for the current font.
* @param int $char The char code whose length is to be returned
@@ -3089,7 +3089,7 @@ public function GetCharWidth($char) {
}
return ($w * $this->FontSize / 1000);
}
-
+
/**
* Returns the numbero of characters in a string.
* @param string $s The input string.
@@ -3100,10 +3100,10 @@ public function GetCharWidth($char) {
public function GetNumChars($s) {
if (($this->CurrentFont['type'] == 'TrueTypeUnicode') OR ($this->CurrentFont['type'] == 'cidfont0')) {
return count($this->UTF8StringToArray($s));
- }
+ }
return strlen($s);
}
-
+
/**
* Fill the list of available fonts ($this->fontlist).
* @access protected
@@ -3118,10 +3118,10 @@ protected function getFontsList() {
}
closedir($fontsdir);
}
-
+
/**
* Imports a TrueType, Type1, core, or CID0 font and makes it available.
- * It is necessary to generate a font definition file first (read /fonts/utils/README.TXT).
+ * It is necessary to generate a font definition file first (read /fonts/utils/README.TXT).
* The definition file (and the font file itself when embedding) must be present either in the current directory or in the one indicated by K_PATH_FONTS if the constant is defined. If it could not be found, the error "Could not include font definition file" is generated.
* @param string $family Font family. The name can be chosen arbitrarily. If it is a standard family name, it will override the corresponding font.
* @param string $style Font style. Possible values are (case insensitive):- empty string: regular (default)
- B: bold
- I: italic
- BI or IB: bold italic
@@ -3177,10 +3177,10 @@ public function AddFont($family, $style='', $fontfile='') {
return $fontdata;
}
if (isset($type)) {
- unset($type);
+ unset($type);
}
if (isset($cw)) {
- unset($cw);
+ unset($cw);
}
// get specified font directory (if any)
$fontdir = '';
@@ -3258,7 +3258,7 @@ public function AddFont($family, $style='', $fontfile='') {
$dw = 600;
}
}
- ++$this->numfonts;
+ ++$this->numfonts;
if ($type == 'cidfont0') {
// register CID font (all styles at once)
$styles = array('' => '', 'B' => ',Bold', 'I' => ',Italic', 'BI' => ',BoldItalic');
@@ -3303,9 +3303,9 @@ public function AddFont($family, $style='', $fontfile='') {
}
/**
- * Sets the font used to print character strings.
+ * Sets the font used to print character strings.
* The font can be either a standard one or a font added via the AddFont() method. Standard fonts use Windows encoding cp1252 (Western Europe).
- * The method can be called before the first page is created and the font is retained from page to page.
+ * The method can be called before the first page is created and the font is retained from page to page.
* If you just wish to change the current font size, it is simpler to call SetFontSize().
* Note: for the standard fonts, the font metric files must be accessible. There are three possibilities for this:- They are in the current directory (the one where the running script lies)
- They are in one of the directories defined by the include_path parameter
- They are in the directory defined by the K_PATH_FONTS constant
* @param string $family Family font. It can be either a name defined by AddFont() or one of the standard Type1 families (case insensitive):- times (Times-Roman)
- timesb (Times-Bold)
- timesi (Times-Italic)
- timesbi (Times-BoldItalic)
- helvetica (Helvetica)
- helveticab (Helvetica-Bold)
- helveticai (Helvetica-Oblique)
- helveticabi (Helvetica-BoldOblique)
- courier (Courier)
- courierb (Courier-Bold)
- courieri (Courier-Oblique)
- courierbi (Courier-BoldOblique)
- symbol (Symbol)
- zapfdingbats (ZapfDingbats)
It is also possible to pass an empty string. In that case, the current family is retained.
@@ -3364,7 +3364,7 @@ public function SetFontSize($size) {
public function SetDefaultMonospacedFont($font) {
$this->default_monospaced_font = $font;
}
-
+
/**
* Creates a new internal link and returns its identifier. An internal link is a clickable area which directs to another place within the document.
* The identifier can then be passed to Cell(), Write(), Image() or Link(). The destination is defined with SetLink().
@@ -3414,7 +3414,7 @@ public function SetLink($link, $y=0, $page=-1) {
public function Link($x, $y, $w, $h, $link, $spaces=0) {
$this->Annotation($x, $y, $w, $h, $link, array('Subtype'=>'Link'), $spaces);
}
-
+
/**
* Puts a markup annotation on a rectangular area of the page.
* !!!!THE ANNOTATION SUPPORT IS NOT YET FULLY IMPLEMENTED !!!!
@@ -3524,7 +3524,7 @@ protected function _putEmbeddedFiles() {
$this->_out('endobj');
}
}
-
+
/**
* Prints a character string.
* The origin is on the left of the first charcter, on the baseline.
@@ -3561,8 +3561,8 @@ public function Text($x, $y, $txt, $stroke=0, $clip=false) {
if ($this->underline AND ($txt!='')) {
$s .= ' '.$this->_dounderline($xr, $y, $txt);
}
- if ($this->linethrough AND ($txt!='')) {
- $s .= ' '.$this->_dolinethrough($xr, $y, $txt);
+ if ($this->linethrough AND ($txt!='')) {
+ $s .= ' '.$this->_dolinethrough($xr, $y, $txt);
}
if ($this->ColorFlag AND (!$clip)) {
$s='q '.$this->TextColor.' '.$s.' Q';
@@ -3571,7 +3571,7 @@ public function Text($x, $y, $txt, $stroke=0, $clip=false) {
}
/**
- * Whenever a page break condition is met, the method is called, and the break is issued or not depending on the returned value.
+ * Whenever a page break condition is met, the method is called, and the break is issued or not depending on the returned value.
* The default implementation returns a value according to the mode selected by SetAutoPageBreak().
* This method is called automatically and should not be called directly by the application.
* @return boolean
@@ -3582,7 +3582,7 @@ public function Text($x, $y, $txt, $stroke=0, $clip=false) {
public function AcceptPageBreak() {
return $this->AutoPageBreak;
}
-
+
/**
* Add page if needed.
* @param float $h Cell height. Default value: 0.
@@ -3674,7 +3674,7 @@ public function removeSHY($txt='') {
}
return $txt;
}
-
+
/**
* Returns the PDF string code to print a cell (rectangular area) with optional borders, background color and character string. The upper-left corner of the cell corresponds to the current position. The text can be aligned or centered. After the call, the current position moves to the right or to the next line. It is possible to put a link on the text.
* If automatic page breaking is enabled and the cell goes beyond the limit, a page break is done before outputting.
@@ -3709,7 +3709,7 @@ protected function getCellCode($w, $h=0, $txt='', $border=0, $ln=0, $align='', $
$w = $this->w - $this->rMargin - $this->x;
}
}
- $s = '';
+ $s = '';
if (($fill == 1) OR ($border == 1)) {
if ($fill == 1) {
$op = ($border == 1) ? 'B' : 'f';
@@ -3856,7 +3856,7 @@ protected function getCellCode($w, $h=0, $txt='', $border=0, $ln=0, $align='', $
if ($this->underline) {
$s .= ' '.$this->_dounderlinew($xdx, $basefonty, $width);
}
- if ($this->linethrough) {
+ if ($this->linethrough) {
$s .= ' '.$this->_dolinethroughw($xdx, $basefonty, $width);
}
if ($this->ColorFlag) {
@@ -3908,7 +3908,7 @@ protected function getCellCode($w, $h=0, $txt='', $border=0, $ln=0, $align='', $
}
/**
- * This method allows printing text with line breaks.
+ * This method allows printing text with line breaks.
* They can be automatic (as soon as the text reaches the right border of the cell) or explicit (via the \n character). As many cells as necessary are output, one below the other.
* Text can be aligned, centered or justified. The cell block can be framed and the background painted.
* @param float $w Width of cells. If 0, they extend up to the right margin of the page.
@@ -3930,7 +3930,7 @@ protected function getCellCode($w, $h=0, $txt='', $border=0, $ln=0, $align='', $
* @since 1.3
* @see SetFont(), SetDrawColor(), SetFillColor(), SetTextColor(), SetLineWidth(), Cell(), Write(), SetAutoPageBreak()
*/
- public function MultiCell($w, $h, $txt, $border=0, $align='J', $fill=0, $ln=1, $x='', $y='', $reseth=true, $stretch=0, $ishtml=false, $autopadding=true, $maxh=0) {
+ public function MultiCell($w, $h, $txt, $border=0, $align='J', $fill=0, $ln=1, $x='', $y='', $reseth=true, $stretch=0, $ishtml=false, $autopadding=true, $maxh=0) {
if ($this->empty_string($this->lasth) OR $reseth) {
//set row height
$this->lasth = $this->FontSize * $this->cell_height_ratio;
@@ -4040,7 +4040,7 @@ public function MultiCell($w, $h, $txt, $border=0, $align='J', $fill=0, $ln=1, $
} else {
$h = max($h, ($currentY - $y));
// put cursor at the beginning of text
- $this->SetY($y);
+ $this->SetY($y);
$this->SetX($x);
// design a cell around the text
$ccode = $this->getCellCode($w, $h, '', $border, 1, '', $fill, '', 0, true);
@@ -4194,7 +4194,7 @@ public function getNumLines($txt, $w=0) {
}
return $lines;
}
-
+
/**
* This method prints text from the current position.
* @param float $h Line height
@@ -4388,7 +4388,7 @@ public function Write($h, $txt, $link='', $fill=0, $align='', $ln=false, $stretc
}
$j = $i;
--$i;
- }
+ }
} else {
// word wrapping
if ($this->rtl AND (!$firstblock)) {
@@ -4523,7 +4523,7 @@ public function Write($h, $txt, $link='', $fill=0, $align='', $ln=false, $stretc
}
return $nl;
}
-
+
/**
* Returns the remaining width between the current position and margins.
* @return int Return the remaining width
@@ -4592,7 +4592,7 @@ public function UniArrSubString($uniarr, $start='', $end='') {
public function UTF8ArrayToUniArray($ta) {
return array_map(array($this, 'unichr'), $ta);
}
-
+
/**
* Returns the unicode caracter specified by UTF-8 code
* @param int $c UTF-8 code
@@ -4620,10 +4620,10 @@ public function unichr($c) {
return '';
}
}
-
+
/**
- * Puts an image in the page.
- * The upper-left corner must be given.
+ * Puts an image in the page.
+ * The upper-left corner must be given.
* The dimensions can be specified in different ways:
* - explicit width and height (expressed in user unit)
* - one explicit dimension, the other being calculated automatically in order to keep the original proportions
@@ -4723,14 +4723,14 @@ public function Image($file, $x='', $y='', $w=0, $h=0, $type='', $link='', $alig
if ($info == 'pngalpha') {
return $this->ImagePngAlpha($file, $x, $y, $w, $h, 'PNG', $link, $align, $resize, $dpi, $palign);
}
- }
+ }
if (!$info) {
if (function_exists($gdfunction)) {
// GD library
$img = $gdfunction($file);
if ($resize) {
$imgr = imagecreatetruecolor($neww, $newh);
- imagecopyresampled($imgr, $img, 0, 0, 0, 0, $neww, $newh, $pixw, $pixh);
+ imagecopyresampled($imgr, $img, 0, 0, 0, 0, $neww, $newh, $pixw, $pixh);
$info = $this->_toJPEG($imgr);
} else {
$info = $this->_toJPEG($img);
@@ -4853,7 +4853,7 @@ public function Image($file, $x='', $y='', $w=0, $h=0, $type='', $link='', $alig
$this->endlinex = $this->img_rb_x;
return $info['i'];
}
-
+
/**
* Sets the current active configuration setting of magic_quotes_runtime (if the set_magic_quotes_runtime function exist)
* @param boolean $mqr FALSE for off, TRUE for on.
@@ -4862,29 +4862,29 @@ public function Image($file, $x='', $y='', $w=0, $h=0, $type='', $link='', $alig
public function set_mqr($mqr) {
if(!defined('PHP_VERSION_ID')) {
$version = PHP_VERSION;
- define('PHP_VERSION_ID', (($version{0} * 10000) + ($version{2} * 100) + $version{4}));
+ define('PHP_VERSION_ID', (($version[0] * 10000) + ($version[2] * 100) + $version[4]));
}
if (PHP_VERSION_ID < 50300) {
@set_magic_quotes_runtime($mqr);
}
}
-
+
/**
* Gets the current active configuration setting of magic_quotes_runtime (if the get_magic_quotes_runtime function exist)
- * @return Returns 0 if magic quotes runtime is off or get_magic_quotes_runtime doesn't exist, 1 otherwise.
+ * @return Returns 0 if magic quotes runtime is off or get_magic_quotes_runtime doesn't exist, 1 otherwise.
* @since 4.6.025 (2009-08-17)
*/
public function get_mqr() {
if(!defined('PHP_VERSION_ID')) {
$version = PHP_VERSION;
- define('PHP_VERSION_ID', (($version{0} * 10000) + ($version{2} * 100) + $version{4}));
+ define('PHP_VERSION_ID', (($version[0] * 10000) + ($version[2] * 100) + $version[4]));
}
if (PHP_VERSION_ID < 50300) {
return @get_magic_quotes_runtime();
}
return 0;
}
-
+
/**
* Convert the loaded php image to a JPEG and then return a structure for the PDF creator.
* This function requires GD library and write access to the directory defined on K_PATH_CACHE constant.
@@ -4902,7 +4902,7 @@ protected function _toJPEG($image) {
unlink($tempname);
return $retvars;
}
-
+
/**
* Extract info from a JPEG file without using the GD library.
* @param string $file image file to parse
@@ -5116,10 +5116,10 @@ protected function ImagePngAlpha($file, $x='', $y='', $w=0, $h=0, $type='', $lin
*/
protected function getGDgamma($v) {
return (pow(($v / 255), 2.2) * 255);
- }
-
+ }
+
/**
- * Performs a line break.
+ * Performs a line break.
* The current abscissa goes back to the left margin and the ordinate increases by the amount passed in parameter.
* @param float $h The height of the break. By default, the value equals the height of the last printed cell.
* @param boolean $cell if true add a cMargin to the x coordinate
@@ -5163,7 +5163,7 @@ public function GetX() {
return $this->x;
}
}
-
+
/**
* Returns the absolute X value of current position.
* @return float
@@ -5174,7 +5174,7 @@ public function GetX() {
public function GetAbsX() {
return $this->x;
}
-
+
/**
* Returns the ordinate of the current position.
* @return float
@@ -5186,9 +5186,9 @@ public function GetY() {
//Get y position
return $this->y;
}
-
+
/**
- * Defines the abscissa of the current position.
+ * Defines the abscissa of the current position.
* If the passed value is negative, it is relative to the right of the page (or left if language is RTL).
* @param float $x The value of the abscissa.
* @access public
@@ -5217,7 +5217,7 @@ public function SetX($x) {
$this->x = $this->w;
}
}
-
+
/**
* Moves the current abscissa back to the left margin and sets the ordinate.
* If the passed value is negative, it is relative to the bottom of the page.
@@ -5248,9 +5248,9 @@ public function SetY($y, $resetx=true) {
$this->y = $this->h;
}
}
-
+
/**
- * Defines the abscissa and ordinate of the current position.
+ * Defines the abscissa and ordinate of the current position.
* If the passed values are negative, they are relative respectively to the right and bottom of the page.
* @param float $x The value of the abscissa
* @param float $y The value of the ordinate
@@ -5265,7 +5265,7 @@ public function SetXY($x, $y) {
}
/**
- * Send the document to a given destination: string, local file or browser.
+ * Send the document to a given destination: string, local file or browser.
* In the last case, the plug-in may be used (if present) or a download ("Save as" dialog box) may be forced.
* The method first calls Close() if necessary to terminate the document.
* @param string $name The name of the file when saved. Note that special characters are removed and blanks characters are replaced with the underscore character.
@@ -5329,7 +5329,7 @@ public function Output($name='doc.pdf', $dest='I') {
openssl_pkcs7_sign($tempdoc, $tempsign, $this->signature_data['signcert'], array($this->signature_data['privkey'], $this->signature_data['password']), array(), PKCS7_BINARY | PKCS7_DETACHED);
} else {
openssl_pkcs7_sign($tempdoc, $tempsign, $this->signature_data['signcert'], array($this->signature_data['privkey'], $this->signature_data['password']), array(), PKCS7_BINARY | PKCS7_DETACHED, $this->signature_data['extracerts']);
- }
+ }
unlink($tempdoc);
// read signature
$signature = file_get_contents($tempsign, false, null, $pdfdoc_lenght);
@@ -5365,7 +5365,7 @@ public function Output($name='doc.pdf', $dest='I') {
header('Cache-Control: public, must-revalidate, max-age=0'); // HTTP/1.1
header('Pragma: public');
header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past
- header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
+ header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Content-Length: '.$this->bufferlen);
header('Content-Disposition: inline; filename="'.basename($name).'";');
}
@@ -5436,10 +5436,10 @@ public function _destroy($destroyall=false, $preserve_objcopy=false) {
}
foreach (array_keys(get_object_vars($this)) as $val) {
if ($destroyall OR (
- ($val != 'internal_encoding')
- AND ($val != 'state')
- AND ($val != 'bufferlen')
- AND ($val != 'buffer')
+ ($val != 'internal_encoding')
+ AND ($val != 'state')
+ AND ($val != 'bufferlen')
+ AND ($val != 'buffer')
AND ($val != 'diskcache')
AND ($val != 'sign')
AND ($val != 'signature_data')
@@ -5452,7 +5452,7 @@ public function _destroy($destroyall=false, $preserve_objcopy=false) {
}
}
}
-
+
/**
* Check for locale-related bug
* @access protected
@@ -5479,7 +5479,7 @@ protected function _getfontpath() {
}
return defined('K_PATH_FONTS') ? K_PATH_FONTS : '';
}
-
+
/**
* Output pages.
* @access protected
@@ -6081,7 +6081,7 @@ protected function _putannotsobjs() {
}
if (isset($pl['opt']['mk']['ac'])) {
$annots .= ' /AC '.$pl['opt']['mk']['ca'].'';
- }
+ }
if (isset($pl['opt']['mk']['i'])) {
$info = $this->getImageBuffer($pl['opt']['mk']['i']);
if ($info !== false) {
@@ -6099,7 +6099,7 @@ protected function _putannotsobjs() {
if ($info !== false) {
$annots .= ' /IX '.$info['n'].' 0 R';
}
- }
+ }
if (isset($pl['opt']['mk']['if']) AND (is_array($pl['opt']['mk']['if'])) AND !empty($pl['opt']['mk']['if'])) {
$annots .= ' /IF <<';
$if_sw = array('A', 'B', 'S', 'N');
@@ -6318,12 +6318,12 @@ protected function _putfonts() {
$font = file_get_contents($fontfile);
$compressed = (substr($file, -2) == '.z');
if ((!$compressed) AND (isset($info['length2']))) {
- $header = (ord($font{0}) == 128);
+ $header = (ord($font[0]) == 128);
if ($header) {
//Strip first binary header
$font = substr($font, 6);
}
- if ($header AND (ord($font{$info['length1']}) == 128)) {
+ if ($header AND (ord($font[$info['length1']]) == 128)) {
//Strip second binary header
$font = substr($font, 0, $info['length1']).substr($font, ($info['length1'] + 6));
}
@@ -6417,7 +6417,7 @@ protected function _putfonts() {
$this->font_obj_ids[$k] = $obj_id;
}
}
-
+
/**
* Outputs font widths
* @parameter array $font font data
@@ -6515,7 +6515,7 @@ protected function _putfontwidths($font, $cidoffset=0) {
}
$this->_out('/W ['.$w.' ]');
}
-
+
/**
* Adds unicode fonts.
* Based on PDF Reference 1.3 (section 5)
@@ -6554,7 +6554,7 @@ protected function _puttruetypeunicode($font) {
$this->_putfontwidths($font, 0);
$this->_out('/CIDToGIDMap '.($this->n + 2).' 0 R');
$this->_out('>>');
- $this->_out('endobj');
+ $this->_out('endobj');
// Font descriptor
// A font descriptor describing the CIDFont default metrics other than its glyph widths
$this->_newobj();
@@ -6593,8 +6593,8 @@ protected function _puttruetypeunicode($font) {
$size = filesize($fontfile);
$this->_out('<_out('/Filter /FlateDecode');
}
@@ -6604,7 +6604,7 @@ protected function _puttruetypeunicode($font) {
$this->_out('endobj');
return $obj_id;
}
-
+
/**
* Output CID-0 fonts.
* A Type 0 CIDFont contains glyph descriptions based on the Adobe Type 1 font format
@@ -6798,7 +6798,7 @@ protected function _putresourcedict() {
$this->_out('>>');
}
}
-
+
/**
* Output Resources.
* @access protected
@@ -6831,7 +6831,7 @@ protected function _putresources() {
$this->_out('endobj');
}
}
-
+
/**
* Adds some Metadata information
* (see Chapter 10.2 of PDF Reference)
@@ -6864,9 +6864,9 @@ protected function _putinfo() {
$this->_out('/Producer '.$this->_textstring('TCPDF'));
}
$this->_out('/CreationDate '.$this->_datestring());
- $this->_out('/ModDate '.$this->_datestring());
+ $this->_out('/ModDate '.$this->_datestring());
}
-
+
/**
* Output Catalog.
* @access protected
@@ -6882,7 +6882,7 @@ protected function _putcatalog() {
$this->_out('/OpenAction [3 0 R /XYZ null null 1]');
} elseif (!is_string($this->ZoomMode)) {
$this->_out('/OpenAction [3 0 R /XYZ null null '.($this->ZoomMode / 100).']');
- }
+ }
if (isset($this->LayoutMode) AND (!$this->empty_string($this->LayoutMode))) {
$this->_out('/PageLayout /'.$this->LayoutMode.'');
}
@@ -6896,7 +6896,7 @@ protected function _putcatalog() {
if ((!empty($this->javascript)) OR (!empty($this->js_objects))) {
$this->_out('/JavaScript '.($this->n_js).' 0 R');
}
- $this->_out('>>');
+ $this->_out('>>');
if (count($this->outlines) > 0) {
$this->_out('/Outlines '.$this->OutlineRoot.' 0 R');
$this->_out('/PageMode /UseOutlines');
@@ -6947,7 +6947,7 @@ protected function _putcatalog() {
}
}
}
-
+
/**
* Output viewer preferences.
* @author Nicola asuni
@@ -7019,7 +7019,7 @@ protected function _putviewerpreferences() {
}
$this->_out('>>');
}
-
+
/**
* Output trailer.
* @access protected
@@ -7048,7 +7048,7 @@ protected function _putheader() {
*/
protected function _enddoc() {
$this->state = 1;
- $this->_putheader();
+ $this->_putheader();
$this->_putpages();
$this->_putresources();
// Signature
@@ -7080,7 +7080,7 @@ protected function _enddoc() {
$this->_out('/V '.($this->sig_obj_id + 1).' 0 R');
$this->_out('>>');
$this->_out('endobj');
- // signature
+ // signature
$this->_newobj();
$this->_out('<<');
$this->_putsignature();
@@ -7230,7 +7230,7 @@ protected function _dounderline($x, $y, $txt) {
$w = $this->GetStringWidth($txt);
return $this->_dounderlinew($x, $y, $w);
}
-
+
/**
* Line through text.
* @param int $x X coordinate
@@ -7256,7 +7256,7 @@ protected function _dounderlinew($x, $y, $w) {
$ut = $this->CurrentFont['ut'];
return sprintf('%.2F %.2F %.2F %.2F re f', $x * $this->k, ($this->h - ($y - $up / 1000 * $this->FontSize)) * $this->k, $w * $this->k, -$ut / 1000 * $this->FontSizePt);
}
-
+
/**
* Line through for rectangular text area.
* @param int $x X coordinate
@@ -7270,7 +7270,7 @@ protected function _dolinethroughw($x, $y, $w) {
$ut = $this->CurrentFont['ut'];
return sprintf('%.2F %.2F %.2F %.2F re f', $x * $this->k, ($this->h - ($y - ($this->FontSize/2) - $up / 1000 * $this->FontSize)) * $this->k, $w * $this->k, -$ut / 1000 * $this->FontSizePt);
}
-
+
/**
* Read a 4-byte integer from file.
* @param string $f file name.
@@ -7281,7 +7281,7 @@ protected function _freadint($f) {
$a = unpack('Ni', fread($f, 4));
return $a['i'];
}
-
+
/**
* Add "\" before "\", "(" and ")"
* @param string $s string to escape.
@@ -7292,7 +7292,7 @@ protected function _escape($s) {
// the chr(13) substitution fixes the Bugs item #1421290.
return strtr($s, array(')' => '\\)', '(' => '\\(', '\\' => '\\\\', chr(13) => '\r'));
}
-
+
/**
* Format a data string for meta information
* @param string $s date string to escape.
@@ -7330,7 +7330,7 @@ protected function _textstring($s) {
}
return $this->_datastring($s);
}
-
+
/**
* Format a text string
* @param string $s string to escape.
@@ -7348,7 +7348,7 @@ protected function _escapetext($s) {
}
return $this->_escape($s);
}
-
+
/**
* Output a stream.
* @param string $s string to output.
@@ -7362,7 +7362,7 @@ protected function _putstream($s) {
$this->_out($s);
$this->_out('endstream');
}
-
+
/**
* Output a string to the document.
* @param string $s string to output.
@@ -7377,7 +7377,7 @@ protected function _out($s) {
$footer = substr($pagebuff, -$this->footerlen[$this->page]);
$this->setPageBuffer($this->page, $page.$s."\n".$footer);
// update footer position
- $this->footerpos[$this->page] += strlen($s."\n");
+ $this->footerpos[$this->page] += strlen($s."\n");
} else {
$this->setPageBuffer($this->page, $s."\n", true);
}
@@ -7385,7 +7385,7 @@ protected function _out($s) {
$this->setBuffer($s."\n");
}
}
-
+
/**
* Converts UTF-8 strings to codepoints array.
* Invalid byte sequences will be replaced with 0xFFFD (replacement character)
@@ -7436,7 +7436,7 @@ protected function UTF8StringToArray($str) {
$strarr = array();
$strlen = strlen($str);
for ($i=0; $i < $strlen; ++$i) {
- $strarr[] = ord($str{$i});
+ $strarr[] = ord($str[$i]);
}
// insert new value on cache
$this->cache_UTF8StringToArray['_'.$str] = $strarr;
@@ -7448,19 +7448,19 @@ protected function UTF8StringToArray($str) {
$str .= ''; // force $str to be a string
$length = strlen($str);
for ($i = 0; $i < $length; ++$i) {
- $char = ord($str{$i}); // get one string character at time
+ $char = ord($str[$i]); // get one string character at time
if (count($bytes) == 0) { // get starting octect
if ($char <= 0x7F) {
$unicode[] = $char; // use the character "as is" because is ASCII
$numbytes = 1;
} elseif (($char >> 0x05) == 0x06) { // 2 bytes character (0x06 = 110 BIN)
- $bytes[] = ($char - 0xC0) << 0x06;
+ $bytes[] = ($char - 0xC0) << 0x06;
$numbytes = 2;
} elseif (($char >> 0x04) == 0x0E) { // 3 bytes character (0x0E = 1110 BIN)
- $bytes[] = ($char - 0xE0) << 0x0C;
+ $bytes[] = ($char - 0xE0) << 0x0C;
$numbytes = 3;
} elseif (($char >> 0x03) == 0x1E) { // 4 bytes character (0x1E = 11110 BIN)
- $bytes[] = ($char - 0xF0) << 0x12;
+ $bytes[] = ($char - 0xF0) << 0x12;
$numbytes = 4;
} else {
// use replacement character for other invalid sequences
@@ -7486,7 +7486,7 @@ protected function UTF8StringToArray($str) {
$unicode[] = $char; // add char to array
}
// reset data for next char
- $bytes = array();
+ $bytes = array();
$numbytes = 1;
}
} else {
@@ -7500,7 +7500,7 @@ protected function UTF8StringToArray($str) {
$this->cache_UTF8StringToArray['_'.$str] = $unicode;
return $unicode;
}
-
+
/**
* Converts UTF-8 strings to UTF16-BE.
* @param string $str string to process.
@@ -7518,7 +7518,7 @@ protected function UTF8ToUTF16BE($str, $setbom=true) {
$unicode = $this->UTF8StringToArray($str); // array containing UTF-8 unicode values
return $this->arrUTF8ToUTF16BE($unicode, $setbom);
}
-
+
/**
* Converts UTF-8 strings to Latin1 when using the standard 14 core fonts.
* @param string $str string to process.
@@ -7554,26 +7554,26 @@ protected function UTF8ToLatin1($str) {
* Based on: http://www.faqs.org/rfcs/rfc2781.html
*
* Encoding UTF-16:
- *
+ *
* Encoding of a single character from an ISO 10646 character value to
* UTF-16 proceeds as follows. Let U be the character number, no greater
* than 0x10FFFF.
- *
+ *
* 1) If U < 0x10000, encode U as a 16-bit unsigned integer and
* terminate.
- *
+ *
* 2) Let U' = U - 0x10000. Because U is less than or equal to 0x10FFFF,
* U' must be less than or equal to 0xFFFFF. That is, U' can be
* represented in 20 bits.
- *
+ *
* 3) Initialize two 16-bit unsigned integers, W1 and W2, to 0xD800 and
* 0xDC00, respectively. These integers each have 10 bits free to
* encode the character value, for a total of 20 bits.
- *
+ *
* 4) Assign the 10 high-order bits of the 20-bit U' to the 10 low-order
* bits of W1 and the 10 low-order bits of U' to the 10 low-order
* bits of W2. Terminate.
- *
+ *
* Graphically, steps 2 through 4 look like:
* U' = yyyyyyyyyyxxxxxxxxxx
* W1 = 110110yyyyyyyyyy
@@ -7601,7 +7601,7 @@ protected function arrUTF8ToUTF16BE($unicode, $setbom=true) {
} else {
$char -= 0x10000;
$w1 = 0xD800 | ($char >> 0x10);
- $w2 = 0xDC00 | ($char & 0x3FF);
+ $w2 = 0xDC00 | ($char & 0x3FF);
$outstr .= chr($w1 >> 0x08);
$outstr .= chr($w1 & 0xFF);
$outstr .= chr($w2 >> 0x08);
@@ -7611,7 +7611,7 @@ protected function arrUTF8ToUTF16BE($unicode, $setbom=true) {
return $outstr;
}
// ====================================================
-
+
/**
* Set header font.
* @param array $font font
@@ -7621,7 +7621,7 @@ protected function arrUTF8ToUTF16BE($unicode, $setbom=true) {
public function setHeaderFont($font) {
$this->header_font = $font;
}
-
+
/**
* Get header font.
* @return array()
@@ -7631,7 +7631,7 @@ public function setHeaderFont($font) {
public function getHeaderFont() {
return $this->header_font;
}
-
+
/**
* Set footer font.
* @param array $font font
@@ -7641,7 +7641,7 @@ public function getHeaderFont() {
public function setFooterFont($font) {
$this->footer_font = $font;
}
-
+
/**
* Get Footer font.
* @return array()
@@ -7651,7 +7651,7 @@ public function setFooterFont($font) {
public function getFooterFont() {
return $this->footer_font;
}
-
+
/**
* Set language array.
* @param array $language
@@ -7666,7 +7666,7 @@ public function setLanguageArray($language) {
$this->rtl = false;
}
}
-
+
/**
* Returns the PDF data.
* @access public
@@ -7677,7 +7677,7 @@ public function getPDFData() {
}
return $this->buffer;
}
-
+
/**
* Output anchor link.
* @param string $url link URL or internal link (i.e.: <a href="#23">link to page 23</a>)
@@ -7690,7 +7690,7 @@ public function getPDFData() {
* @access public
*/
public function addHtmlLink($url, $name, $fill=0, $firstline=false, $color='', $style=-1) {
- if (!$this->empty_string($url) AND ($url{0} == '#')) {
+ if (!$this->empty_string($url) AND ($url[0] == '#')) {
// convert url to internal link
$page = intval(substr($url, 1));
$url = $this->AddLink();
@@ -7715,13 +7715,13 @@ public function addHtmlLink($url, $name, $fill=0, $firstline=false, $color='', $
$this->SetTextColorArray($prevcolor);
return $ret;
}
-
+
/**
* Returns an associative array (keys: R,G,B) from an html color name or a six-digit or three-digit hexadecimal color representation (i.e. #3FE5AA or #7FF).
- * @param string $color html color
+ * @param string $color html color
* @return array RGB color or false in case of error.
* @access public
- */
+ */
public function convertHTMLColorToDec($color='#FFFFFF') {
global $webcolor;
$returncolor = false;
@@ -7771,7 +7771,7 @@ public function convertHTMLColorToDec($color='#FFFFFF') {
}
return $returncolor;
}
-
+
/**
* Converts pixels to User's Units.
* @param int $px pixels
@@ -7782,9 +7782,9 @@ public function convertHTMLColorToDec($color='#FFFFFF') {
public function pixelsToUnits($px) {
return ($px / ($this->imgscale * $this->k));
}
-
+
/**
- * Reverse function for htmlentities.
+ * Reverse function for htmlentities.
* Convert entities in UTF-8.
* @param $text_to_convert Text to convert.
* @return string converted
@@ -7793,10 +7793,10 @@ public function pixelsToUnits($px) {
public function unhtmlentities($text_to_convert) {
return html_entity_decode($text_to_convert, ENT_QUOTES, $this->encoding);
}
-
+
// ENCRYPTION METHODS ----------------------------------
// SINCE 2.0.000 (2008-01-02)
-
+
/**
* Compute encryption key depending on object number where the encrypted data is stored
* @param int $n object number
@@ -7806,7 +7806,7 @@ public function unhtmlentities($text_to_convert) {
protected function _objectkey($n) {
return substr($this->_md5_16($this->encryption_key.pack('VXxx', $n)), 0, 10);
}
-
+
/**
* Put encryption on PDF document.
* @access protected
@@ -7820,7 +7820,7 @@ protected function _putencryption() {
$this->_out('/U ('.$this->_escape($this->Uvalue).')');
$this->_out('/P '.$this->Pvalue);
}
-
+
/**
* Returns the input text exrypted using RC4 algorithm and the specified key.
* RC4 is the standard encryption algorithm used in PDF format
@@ -7838,7 +7838,7 @@ protected function _RC4($key, $text) {
$j = 0;
for ($i = 0; $i < 256; ++$i) {
$t = $rc4[$i];
- $j = ($j + $t + ord($k{$i})) % 256;
+ $j = ($j + $t + ord($k[$i])) % 256;
$rc4[$i] = $rc4[$j];
$rc4[$j] = $t;
}
@@ -7858,11 +7858,11 @@ protected function _RC4($key, $text) {
$rc4[$a] = $rc4[$b];
$rc4[$b] = $t;
$k = $rc4[($rc4[$a] + $rc4[$b]) % 256];
- $out .= chr(ord($text{$i}) ^ $k);
+ $out .= chr(ord($text[$i]) ^ $k);
}
return $out;
}
-
+
/**
* Encrypts a string using MD5 and returns it's value as a binary string.
* @param string $str input string
@@ -7874,7 +7874,7 @@ protected function _RC4($key, $text) {
protected function _md5_16($str) {
return pack('H*', md5($str));
}
-
+
/**
* Compute O value (used for RC4 encryption)
* @param String $user_pass user password
@@ -7889,7 +7889,7 @@ protected function _Ovalue($user_pass, $owner_pass) {
$owner_RC4_key = substr($tmp, 0, 5);
return $this->_RC4($owner_RC4_key, $user_pass);
}
-
+
/**
* Compute U value (used for RC4 encryption)
* @return String U value
@@ -7900,7 +7900,7 @@ protected function _Ovalue($user_pass, $owner_pass) {
protected function _Uvalue() {
return $this->_RC4($this->encryption_key, $this->padding);
}
-
+
/**
* Compute encryption key
* @param String $user_pass user password
@@ -7924,14 +7924,14 @@ protected function _generateencryptionkey($user_pass, $owner_pass, $protection)
// Compute P value
$this->Pvalue = -(($protection^255) + 1);
}
-
+
/**
* Set document protection
* The permission array is composed of values taken from the following ones:
* - copy: copy text and images to the clipboard
* - print: print the document
* - modify: modify it (except for annotations and forms)
- * - annot-forms: add annotations and forms
+ * - annot-forms: add annotations and forms
* Remark: the protection against modification is for people who have the full Acrobat product.
* If you don't set any password, the document will open as usual. If you set a user password, the PDF viewer will ask for it before displaying the document. The master password, if different from the user one, can be used to get full access.
* Note: protecting a document requires to encrypt it, which increases the processing time a lot. This can cause a PHP time-out in some cases, especially if the document contains images or fonts.
@@ -7957,11 +7957,11 @@ public function SetProtection($permissions=array(), $user_pass='', $owner_pass=n
$this->encrypted = true;
$this->_generateencryptionkey($user_pass, $owner_pass, $protection);
}
-
+
// END OF ENCRYPTION FUNCTIONS -------------------------
-
+
// START TRANSFORMATIONS SECTION -----------------------
-
+
/**
* Starts a 2D tranformation saving current graphic state.
* This function must be called before scaling, mirroring, translation, rotation and skewing.
@@ -7976,7 +7976,7 @@ public function StartTransform() {
++$this->transfmatrix_key;
$this->transfmatrix[$this->transfmatrix_key] = array();
}
-
+
/**
* Stops a 2D tranformation restoring previous graphic state.
* This function must be called after scaling, mirroring, translation, rotation and skewing.
@@ -8005,7 +8005,7 @@ public function StopTransform() {
public function ScaleX($s_x, $x='', $y='') {
$this->Scale($s_x, 100, $x, $y);
}
-
+
/**
* Vertical Scaling.
* @param float $s_y scaling factor for height as percent. 0 is not allowed.
@@ -8018,7 +8018,7 @@ public function ScaleX($s_x, $x='', $y='') {
public function ScaleY($s_y, $x='', $y='') {
$this->Scale(100, $s_y, $x, $y);
}
-
+
/**
* Vertical and horizontal proportional Scaling.
* @param float $s scaling factor for width and height as percent. 0 is not allowed.
@@ -8031,7 +8031,7 @@ public function ScaleY($s_y, $x='', $y='') {
public function ScaleXY($s, $x='', $y='') {
$this->Scale($s, $s, $x, $y);
}
-
+
/**
* Vertical and horizontal non-proportional Scaling.
* @param float $s_x scaling factor for width as percent. 0 is not allowed.
@@ -8069,7 +8069,7 @@ public function Scale($s_x, $s_y, $x='', $y='') {
//scale the coordinate system
$this->Transform($tm);
}
-
+
/**
* Horizontal Mirroring.
* @param int $x abscissa of the point. Default is current x position
@@ -8080,7 +8080,7 @@ public function Scale($s_x, $s_y, $x='', $y='') {
public function MirrorH($x='') {
$this->Scale(-100, 100, $x);
}
-
+
/**
* Verical Mirroring.
* @param int $y ordinate of the point. Default is current y position
@@ -8091,7 +8091,7 @@ public function MirrorH($x='') {
public function MirrorV($y='') {
$this->Scale(100, -100, '', $y);
}
-
+
/**
* Point reflection mirroring.
* @param int $x abscissa of the point. Default is current x position
@@ -8103,7 +8103,7 @@ public function MirrorV($y='') {
public function MirrorP($x='',$y='') {
$this->Scale(-100, -100, $x, $y);
}
-
+
/**
* Reflection against a straight line through point (x, y) with the gradient angle (angle).
* @param float $angle gradient angle of the straight line. Default is 0 (horizontal line).
@@ -8117,7 +8117,7 @@ public function MirrorL($angle=0, $x='',$y='') {
$this->Scale(-100, 100, $x, $y);
$this->Rotate(-2*($angle-90), $x, $y);
}
-
+
/**
* Translate graphic object horizontally.
* @param int $t_x movement to the right (or left for RTL)
@@ -8128,7 +8128,7 @@ public function MirrorL($angle=0, $x='',$y='') {
public function TranslateX($t_x) {
$this->Translate($t_x, 0);
}
-
+
/**
* Translate graphic object vertically.
* @param int $t_y movement to the bottom
@@ -8139,7 +8139,7 @@ public function TranslateX($t_x) {
public function TranslateY($t_y) {
$this->Translate(0, $t_y);
}
-
+
/**
* Translate graphic object horizontally and vertically.
* @param int $t_x movement to the right
@@ -8162,7 +8162,7 @@ public function Translate($t_x, $t_y) {
//translate the coordinate system
$this->Transform($tm);
}
-
+
/**
* Rotate object.
* @param float $angle angle in degrees for counter-clockwise rotation
@@ -8195,7 +8195,7 @@ public function Rotate($angle, $x='', $y='') {
//rotate the coordinate system around ($x,$y)
$this->Transform($tm);
}
-
+
/**
* Skew horizontally.
* @param float $angle_x angle in degrees between -90 (skew to the left) and 90 (skew to the right)
@@ -8208,7 +8208,7 @@ public function Rotate($angle, $x='', $y='') {
public function SkewX($angle_x, $x='', $y='') {
$this->Skew($angle_x, 0, $x, $y);
}
-
+
/**
* Skew vertically.
* @param float $angle_y angle in degrees between -90 (skew to the bottom) and 90 (skew to the top)
@@ -8221,7 +8221,7 @@ public function SkewX($angle_x, $x='', $y='') {
public function SkewY($angle_y, $x='', $y='') {
$this->Skew(0, $angle_y, $x, $y);
}
-
+
/**
* Skew.
* @param float $angle_x angle in degrees between -90 (skew to the left) and 90 (skew to the right)
@@ -8258,7 +8258,7 @@ public function Skew($angle_x, $angle_y, $x='', $y='') {
//skew the coordinate system
$this->Transform($tm);
}
-
+
/**
* Apply graphic transformations.
* @access protected
@@ -8275,13 +8275,13 @@ protected function Transform($tm) {
$this->transfmrk[$this->page][$key] = $this->pagelen[$this->page];
}
}
-
+
// END TRANSFORMATIONS SECTION -------------------------
-
-
+
+
// START GRAPHIC FUNCTIONS SECTION ---------------------
// The following section is based on the code provided by David Hernandez Sanz
-
+
/**
* Defines the line width. By default, the value equals 0.2 mm. The method can be called before the first page is created and the value is retained from page to page.
* @param float $width The width.
@@ -8297,10 +8297,10 @@ public function SetLineWidth($width) {
$this->_out($this->linestyleWidth);
}
}
-
+
/**
* Returns the current the line width.
- * @return int Line width
+ * @return int Line width
* @access public
* @since 2.1.000 (2008-01-07)
* @see Line(), SetLineWidth()
@@ -8308,7 +8308,7 @@ public function SetLineWidth($width) {
public function GetLineWidth() {
return $this->LineWidth;
}
-
+
/**
* Set line style.
* @param array $style Line style. Array with keys among the following:
@@ -8380,7 +8380,7 @@ public function SetLineStyle($style) {
$this->SetDrawColorArray($color);
}
}
-
+
/*
* Set a draw point.
* @param float $x Abscissa of point.
@@ -8394,7 +8394,7 @@ protected function _outPoint($x, $y) {
}
$this->_out(sprintf("%.2F %.2F m", $x * $this->k, ($this->h - $y) * $this->k));
}
-
+
/*
* Draws a line from last draw point.
* @param float $x Abscissa of end point.
@@ -8408,7 +8408,7 @@ protected function _outLine($x, $y) {
}
$this->_out(sprintf("%.2F %.2F l", $x * $this->k, ($this->h - $y) * $this->k));
}
-
+
/**
* Draws a rectangle.
* @param float $x Abscissa of upper-left corner (or upper-right corner for RTL language).
@@ -8425,7 +8425,7 @@ protected function _outRect($x, $y, $w, $h, $op) {
}
$this->_out(sprintf('%.2F %.2F %.2F %.2F re %s', $x*$this->k, ($this->h-$y)*$this->k, $w*$this->k, -$h*$this->k, $op));
}
-
+
/*
* Draws a Bezier curve from last draw point.
* The Bezier curve is a tangent to the line between the control points at either end of the curve.
@@ -8446,7 +8446,7 @@ protected function _outCurve($x1, $y1, $x2, $y2, $x3, $y3) {
}
$this->_out(sprintf("%.2F %.2F %.2F %.2F %.2F %.2F c", $x1 * $this->k, ($this->h - $y1) * $this->k, $x2 * $this->k, ($this->h - $y2) * $this->k, $x3 * $this->k, ($this->h - $y3) * $this->k));
}
-
+
/**
* Draws a line between two points.
* @param float $x1 Abscissa of first point.
@@ -8466,7 +8466,7 @@ public function Line($x1, $y1, $x2, $y2, $style=array()) {
$this->_outLine($x2, $y2);
$this->_out(' S');
}
-
+
/**
* Draws a rectangle.
* @param float $x Abscissa of upper-left corner (or upper-right corner for RTL language).
@@ -8563,8 +8563,8 @@ public function Rect($x, $y, $w, $h, $style='', $border_style=array(), $fill_col
}
}
}
-
-
+
+
/**
* Draws a Bezier curve.
* The Bezier curve is a tangent to the line between the control points at
@@ -8601,7 +8601,7 @@ public function Curve($x0, $y0, $x1, $y1, $x2, $y2, $x3, $y3, $style='', $line_s
$line_style = array();
break;
}
- case 'FD':
+ case 'FD':
case 'DF': {
$op = 'B';
break;
@@ -8626,7 +8626,7 @@ public function Curve($x0, $y0, $x1, $y1, $x2, $y2, $x3, $y3, $style='', $line_s
$this->_outCurve($x1, $y1, $x2, $y2, $x3, $y3);
$this->_out($op);
}
-
+
/**
* Draws a poly-Bezier curve.
* Each Bezier curve segment is a tangent to the line between the control points at
@@ -8683,10 +8683,10 @@ public function Polycurve($x0, $y0, $segments, $style='', $line_style=array(), $
foreach ($segments as $segment) {
list($x1, $y1, $x2, $y2, $x3, $y3) = $segment;
$this->_outCurve($x1, $y1, $x2, $y2, $x3, $y3);
- }
+ }
$this->_out($op);
}
-
+
/**
* Draws an ellipse.
* An ellipse is formed from n Bezier curves.
@@ -8730,7 +8730,7 @@ public function Ellipse($x0, $y0, $rx, $ry=0, $angle=0, $astart=0, $afinish=360,
$line_style = array();
break;
}
- case 'FD':
+ case 'FD':
case 'DF': {
$op = 'B';
break;
@@ -8792,7 +8792,7 @@ public function Ellipse($x0, $y0, $rx, $ry=0, $angle=0, $astart=0, $afinish=360,
$this->_out($op);
}
}
-
+
/**
* Draws a circle.
* A circle is formed from n Bezier curves.
@@ -8879,7 +8879,7 @@ public function Polygon($p, $style='', $line_style=array(), $fill_color=array(),
// copy style for the last added line
if (isset($line_style[0])) {
$line_style[$np] = $line_style[0];
- }
+ }
$nc += 4;
}
if (!(false === strpos($style, 'F')) AND isset($fill_color)) {
@@ -8891,7 +8891,7 @@ public function Polygon($p, $style='', $line_style=array(), $fill_color=array(),
$op = 'f';
break;
}
- case 'FD':
+ case 'FD':
case 'DF': {
$op = 'B';
break;
@@ -8903,7 +8903,7 @@ public function Polygon($p, $style='', $line_style=array(), $fill_color=array(),
case 'CEO': {
$op = 'W* n';
break;
- }
+ }
default: {
$op = 'S';
break;
@@ -8956,7 +8956,7 @@ public function Polygon($p, $style='', $line_style=array(), $fill_color=array(),
$this->_out($op);
}
}
-
+
/**
* Draws a regular polygon.
* @param float $x0 Abscissa of center point.
@@ -9009,7 +9009,7 @@ public function RegularPolygon($x0, $y0, $r, $ns, $angle=0, $draw_circle=false,
}
$this->Polygon($p, $style, $line_style, $fill_color);
}
-
+
/**
* Draws a star polygon
* @param float $x0 Abscissa of center point.
@@ -9075,7 +9075,7 @@ public function StarPolygon($x0, $y0, $r, $nv, $ng, $angle=0, $draw_circle=false
} while (!$visited[$i]);
$this->Polygon($p, $style, $line_style, $fill_color);
}
-
+
/**
* Draws a rounded rectangle.
* @param float $x Abscissa of upper-left corner.
@@ -9110,7 +9110,7 @@ public function RoundedRect($x, $y, $w, $h, $r, $round_corner='1111', $style='',
$op = 'f';
break;
}
- case 'FD':
+ case 'FD':
case 'DF': {
$op = 'B';
break;
@@ -9169,7 +9169,7 @@ public function RoundedRect($x, $y, $w, $h, $r, $round_corner='1111', $style='',
$this->_out($op);
}
}
-
+
/**
* Draws a grahic arrow.
* @parameter float $x0 Abscissa of first point.
@@ -9192,7 +9192,7 @@ public function Arrow($x0, $y0, $x1, $y1, $head_style=0, $arm_size=5, $arm_angle
// calculate the stopping point for the arrow shaft
$sx1 = $x1 + (($arm_size - $this->LineWidth) * cos(deg2rad($dir_angle)));
$sy1 = $y1 + (($arm_size - $this->LineWidth) * sin(deg2rad($dir_angle)));
- }
+ }
// main arrow line / shaft
$this->Line($x0, $y0, $sx1, $sy1);
// left arrowhead arm tip
@@ -9228,9 +9228,9 @@ public function Arrow($x0, $y0, $x1, $y1, $head_style=0, $arm_size=5, $arm_angle
}
$this->Polygon(array($x2L, $y2L, $x1, $y1, $x2R, $y2R), $mode, $style, array());
}
-
+
// END GRAPHIC FUNCTIONS SECTION -----------------------
-
+
// BIDIRECTIONAL TEXT SECTION --------------------------
/**
* Reverse the RLT substrings using the Bidirectional Algorithm (http://unicode.org/reports/tr9/).
@@ -9244,7 +9244,7 @@ public function Arrow($x0, $y0, $x1, $y1, $head_style=0, $arm_size=5, $arm_angle
protected function utf8StrRev($str, $setbom=false, $forcertl=false) {
return $this->arrUTF8ToUTF16BE($this->utf8Bidi($this->UTF8StringToArray($str), $str, $forcertl), $setbom);
}
-
+
/**
* Reverse the RLT substrings using the Bidirectional Algorithm (http://unicode.org/reports/tr9/).
* @param array $ta array of characters composing the string.
@@ -9275,10 +9275,10 @@ protected function utf8Bidi($ta, $str='', $forcertl=false) {
if (!($forcertl OR $arabic OR preg_match(K_RE_PATTERN_RTL, $str))) {
return $ta;
}
-
+
// get number of chars
$numchars = count($ta);
-
+
if ($forcertl == 'R') {
$pel = 1;
} elseif ($forcertl == 'L') {
@@ -9297,7 +9297,7 @@ protected function utf8Bidi($ta, $str='', $forcertl=false) {
}
}
}
-
+
// Current Embedding Level
$cel = $pel;
// directional override status
@@ -9306,10 +9306,10 @@ protected function utf8Bidi($ta, $str='', $forcertl=false) {
// start-of-level-run
$sor = $pel % 2 ? 'R' : 'L';
$eor = $sor;
-
+
// Array of characters data
$chardata = Array();
-
+
// X1. Begin by setting the current embedding level to the paragraph embedding level. Set the directional override status to neutral. Process each character iteratively, applying rules X2 through X9. Only embedding levels from 0 to 61 are valid in this phase.
// In the resolution of levels in rules I1 and I2, the maximum embedding level of 62 can be reached.
for ($i=0; $i < $numchars; ++$i) {
@@ -9365,9 +9365,9 @@ protected function utf8Bidi($ta, $str='', $forcertl=false) {
// X7. With each PDF, determine the matching embedding or override code. If there was a valid matching code, restore (pop) the last remembered (pushed) embedding level and directional override.
if (count($remember)) {
$last = count($remember ) - 1;
- if (($remember[$last]['num'] == K_RLE) OR
- ($remember[$last]['num'] == K_LRE) OR
- ($remember[$last]['num'] == K_RLO) OR
+ if (($remember[$last]['num'] == K_RLE) OR
+ ($remember[$last]['num'] == K_LRE) OR
+ ($remember[$last]['num'] == K_RLO) OR
($remember[$last]['num'] == K_LRO)) {
$match = array_pop($remember);
$cel = $match['cel'];
@@ -9397,16 +9397,16 @@ protected function utf8Bidi($ta, $str='', $forcertl=false) {
$chardata[] = array('char' => $ta[$i], 'level' => $cel, 'type' => $chardir, 'sor' => $sor, 'eor' => $eor);
}
} // end for each char
-
+
// X8. All explicit directional embeddings and overrides are completely terminated at the end of each paragraph. Paragraph separators are not included in the embedding.
// X9. Remove all RLE, LRE, RLO, LRO, PDF, and BN codes.
// X10. The remaining rules are applied to each run of characters at the same level. For each run, determine the start-of-level-run (sor) and end-of-level-run (eor) type, either L or R. This depends on the higher of the two levels on either side of the boundary (at the start or end of the paragraph, the level of the 'other' run is the base embedding level). If the higher level is odd, the type is R; otherwise, it is L.
-
+
// 3.3.3 Resolving Weak Types
// Weak types are now resolved one level run at a time. At level run boundaries where the type of the character on the other side of the boundary is required, the type assigned to sor or eor is used.
// Nonspacing marks are now resolved based on the previous characters.
$numchars = count($chardata);
-
+
// W1. Examine each nonspacing mark (NSM) in the level run, and change the type of the NSM to the type of the previous character. If the NSM is at the start of the level run, it will get the type of sor.
$prevlevel = -1; // track level changes
$levcount = 0; // counts consecutive chars at the same level
@@ -9425,7 +9425,7 @@ protected function utf8Bidi($ta, $str='', $forcertl=false) {
}
$prevlevel = $chardata[$i]['level'];
}
-
+
// W2. Search backward from each instance of a European number until the first strong type (R, L, AL, or sor) is found. If an AL is found, change the type of the European number to Arabic number.
$prevlevel = -1;
$levcount = 0;
@@ -9446,14 +9446,14 @@ protected function utf8Bidi($ta, $str='', $forcertl=false) {
}
$prevlevel = $chardata[$i]['level'];
}
-
+
// W3. Change all ALs to R.
for ($i=0; $i < $numchars; ++$i) {
if ($chardata[$i]['type'] == 'AL') {
$chardata[$i]['type'] = 'R';
- }
+ }
}
-
+
// W4. A single European separator between two European numbers changes to a European number. A single common separator between two numbers of the same type changes to that type.
$prevlevel = -1;
$levcount = 0;
@@ -9474,7 +9474,7 @@ protected function utf8Bidi($ta, $str='', $forcertl=false) {
}
$prevlevel = $chardata[$i]['level'];
}
-
+
// W5. A sequence of European terminators adjacent to European numbers changes to all European numbers.
$prevlevel = -1;
$levcount = 0;
@@ -9502,7 +9502,7 @@ protected function utf8Bidi($ta, $str='', $forcertl=false) {
}
$prevlevel = $chardata[$i]['level'];
}
-
+
// W6. Otherwise, separators and terminators change to Other Neutral.
$prevlevel = -1;
$levcount = 0;
@@ -9517,7 +9517,7 @@ protected function utf8Bidi($ta, $str='', $forcertl=false) {
}
$prevlevel = $chardata[$i]['level'];
}
-
+
//W7. Search backward from each instance of a European number until the first strong type (R, L, or sor) is found. If an L is found, then change the type of the European number to L.
$prevlevel = -1;
$levcount = 0;
@@ -9538,7 +9538,7 @@ protected function utf8Bidi($ta, $str='', $forcertl=false) {
}
$prevlevel = $chardata[$i]['level'];
}
-
+
// N1. A sequence of neutrals takes the direction of the surrounding strong text if the text on both sides has the same direction. European and Arabic numbers act as if they were R in terms of their influence on neutrals. Start-of-level-run (sor) and end-of-level-run (eor) are used at level run boundaries.
$prevlevel = -1;
$levcount = 0;
@@ -9589,7 +9589,7 @@ protected function utf8Bidi($ta, $str='', $forcertl=false) {
}
$prevlevel = $chardata[$i]['level'];
}
-
+
// I1. For all characters with an even (left-to-right) embedding direction, those of type R go up one level and those of type AN or EN go up two levels.
// I2. For all characters with an odd (right-to-left) embedding direction, those of type L, EN or AN go up one level.
for ($i=0; $i < $numchars; ++$i) {
@@ -9607,7 +9607,7 @@ protected function utf8Bidi($ta, $str='', $forcertl=false) {
}
$maxlevel = max($chardata[$i]['level'],$maxlevel);
}
-
+
// L1. On each line, reset the embedding level of the following characters to the paragraph embedding level:
// 1. Segment separators,
// 2. Paragraph separators,
@@ -9630,9 +9630,9 @@ protected function utf8Bidi($ta, $str='', $forcertl=false) {
}
}
}
-
+
// Arabic Shaping
- // Cursively connected scripts, such as Arabic or Syriac, require the selection of positional character shapes that depend on adjacent characters. Shaping is logically applied after the Bidirectional Algorithm is used and is limited to characters within the same directional run.
+ // Cursively connected scripts, such as Arabic or Syriac, require the selection of positional character shapes that depend on adjacent characters. Shaping is logically applied after the Bidirectional Algorithm is used and is limited to characters within the same directional run.
if ($arabic) {
$endedletter = array(1569,1570,1571,1572,1573,1575,1577,1583,1584,1585,1586,1608,1688);
$alfletter = array(1570,1571,1573,1575);
@@ -9722,7 +9722,7 @@ protected function utf8Bidi($ta, $str='', $forcertl=false) {
//Allah Word
// mark characters to delete with false
$chardata2[$i-2]['char'] = false;
- $chardata2[$i-1]['char'] = false;
+ $chardata2[$i-1]['char'] = false;
$chardata2[$i]['char'] = 65010;
} else {
if (($prevchar !== false) AND in_array($prevchar['char'], $endedletter)) {
@@ -9748,8 +9748,8 @@ protected function utf8Bidi($ta, $str='', $forcertl=false) {
}
} // end if AL (Arabic Letter)
} // end for each char
- /*
- * Combining characters that can occur with Shadda (0651 HEX, 1617 DEC) are placed in UE586-UE594.
+ /*
+ * Combining characters that can occur with Shadda (0651 HEX, 1617 DEC) are placed in UE586-UE594.
* Putting the combining mark and shadda in the same glyph allows us to avoid the two marks overlapping each other in an illegible manner.
*/
$cw = &$this->CurrentFont['cw'];
@@ -9775,7 +9775,7 @@ protected function utf8Bidi($ta, $str='', $forcertl=false) {
unset($laaletter);
unset($charAL);
}
-
+
// L2. From the highest level found in the text to the lowest odd level on each line, including intermediate levels not actually present in the text, reverse any contiguous sequence of characters that are at that level or higher.
for ($j=$maxlevel; $j > 0; $j--) {
$ordarray = Array();
@@ -9805,17 +9805,17 @@ protected function utf8Bidi($ta, $str='', $forcertl=false) {
}
$chardata = $ordarray;
}
-
+
$ordarray = array();
for ($i=0; $i < $numchars; ++$i) {
$ordarray[] = $chardata[$i]['char'];
}
-
+
return $ordarray;
}
-
+
// END OF BIDIRECTIONAL TEXT SECTION -------------------
-
+
/*
* Adds a bookmark.
* @param string $txt bookmark description.
@@ -9847,7 +9847,7 @@ public function Bookmark($txt, $level=0, $y=-1, $page='') {
}
$this->outlines[] = array('t' => $txt, 'l' => $level, 'y' => $y, 'p' => $page);
}
-
+
/*
* Create a bookmark PDF string.
* @access protected
@@ -9908,10 +9908,10 @@ protected function _putbookmarks() {
$this->_out('/Last '.($n + $lru[0]).' 0 R>>');
$this->_out('endobj');
}
-
-
+
+
// --- JAVASCRIPT ------------------------------------------------------
-
+
/*
* Adds a javascript
* @param string $script Javascript code
@@ -9994,9 +9994,9 @@ protected function _putjavascript() {
$this->_out('>>');
$this->_out('endobj');
}
- }
+ }
}
-
+
/*
* Convert color to javascript color.
* @param string $color color name or #RRGGBB
@@ -10014,7 +10014,7 @@ protected function _JScolor($color) {
}
return 'color.'.$color;
}
-
+
/*
* Adds a javascript form field.
* @param string $type field type
@@ -10153,7 +10153,7 @@ protected function getAnnotOptFromJSProp($prop) {
// buttonFitBounds: If true, the extent to which the icon may be scaled is set to the bounds of the button field.
if (isset($prop['buttonFitBounds']) AND ($prop['buttonFitBounds'] == 'true')) {
$opt['mk']['if']['fb'] = true;
- }
+ }
// buttonScaleHow: Controls how the icon is scaled (if necessary) to fit inside the button face.
if (isset($prop['buttonScaleHow'])) {
switch ($prop['buttonScaleHow']) {
@@ -10226,7 +10226,7 @@ protected function getAnnotOptFromJSProp($prop) {
$opt['mk']['tp'] = 6;
break;
}
- }
+ }
}
// fillColor: Specifies the background color for a field.
if (isset($prop['fillColor'])) {
@@ -10409,7 +10409,7 @@ protected function getAnnotOptFromJSProp($prop) {
$opt['h'] = 'O';
break;
}
- }
+ }
}
// Unsupported options:
// - calcOrderIndex: Changes the calculation order of fields in the document.
@@ -10419,7 +10419,7 @@ protected function getAnnotOptFromJSProp($prop) {
// - textColor, textFont, textSize
return $opt;
}
-
+
/*
* Set default properties for form fields.
* @param array $prop javascript field properties. Possible values are described on official Javascript for Acrobat API reference.
@@ -10430,7 +10430,7 @@ protected function getAnnotOptFromJSProp($prop) {
public function setFormDefaultProp($prop=array()) {
$this->default_form_prop = $prop;
}
-
+
/*
* Return the default properties for form fields.
* @return array $prop javascript field properties. Possible values are described on official Javascript for Acrobat API reference.
@@ -10441,7 +10441,7 @@ public function setFormDefaultProp($prop=array()) {
public function getFormDefaultProp() {
return $this->default_form_prop;
}
-
+
/*
* Creates a text field
* @param string $name field name
@@ -10619,7 +10619,7 @@ public function RadioButton($name, $w, $prop=array(), $opt=array(), $onvalue='On
$this->x += $w;
}
}
-
+
/*
* Creates a List-box field
* @param string $name field name
@@ -10679,7 +10679,7 @@ public function ListBox($name, $w, $h, $values, $prop=array(), $opt=array(), $x=
$this->x += $w;
}
}
-
+
/*
* Creates a Combo-box field
* @param string $name field name
@@ -10740,7 +10740,7 @@ public function ComboBox($name, $w, $h, $values, $prop=array(), $opt=array(), $x
$this->x += $w;
}
}
-
+
/*
* Creates a CheckBox field
* @param string $name field name
@@ -10809,7 +10809,7 @@ public function CheckBox($name, $w, $checked=false, $prop=array(), $opt=array(),
$this->x += $w;
}
}
-
+
/*
* Creates a button field
* @param string $name field name
@@ -10966,9 +10966,9 @@ public function Button($name, $w, $h, $caption, $action, $prop=array(), $opt=arr
$this->x += $w;
}
}
-
+
// --- END FORMS FIELDS ------------------------------------------------
-
+
/*
* Add certification signature (DocMDP or UR3)
* You can set only one signature type
@@ -11032,23 +11032,23 @@ protected function _putsignature() {
}
$this->_out('/M '.$this->_datestring());
}
-
+
/*
* Set User's Rights for PDF Reader
* WARNING: This works only using the Adobe private key with the setSignature() method!.
- * Check the PDF Reference 8.7.1 Transform Methods,
+ * Check the PDF Reference 8.7.1 Transform Methods,
* Table 8.105 Entries in the UR transform parameters dictionary
* @param boolean $enable if true enable user's rights on PDF reader
* @param string $document Names specifying additional document-wide usage rights for the document. The only defined value is "/FullSave", which permits a user to save the document along with modified form and/or annotation data.
* @param string $annots Names specifying additional annotation-related usage rights for the document. Valid names in PDF 1.5 and later are /Create/Delete/Modify/Copy/Import/Export, which permit the user to perform the named operation on annotations.
- * @param string $form Names specifying additional form-field-related usage rights for the document. Valid names are: /Add/Delete/FillIn/Import/Export/SubmitStandalone/SpawnTemplate
+ * @param string $form Names specifying additional form-field-related usage rights for the document. Valid names are: /Add/Delete/FillIn/Import/Export/SubmitStandalone/SpawnTemplate
* @param string $signature Names specifying additional signature-related usage rights for the document. The only defined value is /Modify, which permits a user to apply a digital signature to an existing signature form field or clear a signed signature form field.
* @access public
* @author Nicola Asuni
* @since 2.9.000 (2008-03-26)
*/
public function setUserRights(
- $enable=true,
+ $enable=true,
$document='/FullSave',
$annots='/Create/Delete/Modify/Copy/Import/Export',
$form='/Add/Delete/FillIn/Import/Export/SubmitStandalone/SpawnTemplate',
@@ -11063,7 +11063,7 @@ public function setUserRights(
$this->setSignature('', '', '', '', 0, array());
}
}
-
+
/*
* Enable document signature (requires the OpenSSL Library).
* The digital signature improve document authenticity and integrity and allows o enable extra features on Acrobat Reader.
@@ -11097,7 +11097,7 @@ public function setSignature($signing_cert='', $private_key='', $private_key_pas
$this->signature_data['cert_type'] = $cert_type;
$this->signature_data['info'] = $info;
}
-
+
/*
* Create a new page group.
* NOTE: call this function before calling AddPage()
@@ -11123,7 +11123,7 @@ public function startPageGroup($page='') {
public function AliasNbPages($alias='{nb}') {
$this->AliasNbPages = $alias;
}
-
+
/**
* Returns the string alias used for the total number of pages.
* If the current font is unicode type, the returned string is surrounded by additional curly braces.
@@ -11151,7 +11151,7 @@ public function AliasNumPage($alias='{pnb}') {
//Define an alias for total number of pages
$this->AliasNumPage = $alias;
}
-
+
/**
* Returns the string alias used for the page number.
* If the current font is unicode type, the returned string is surrounded by additional curly braces.
@@ -11166,7 +11166,7 @@ public function getAliasNumPage() {
}
return $this->AliasNumPage;
}
-
+
/*
* Return the current page in the group.
* @return current page in the group
@@ -11186,7 +11186,7 @@ public function getGroupPageNo() {
public function getGroupPageNoFormatted() {
return $this->formatPageNumber($this->getGroupPageNo());
}
-
+
/*
* Return the alias of the current page group
* If the current font is unicode type, the returned string is surrounded by additional curly braces.
@@ -11201,7 +11201,7 @@ public function getPageGroupAlias() {
}
return $this->currpagegroup;
}
-
+
/*
* Return the alias for the page number on the current page group
* If the current font is unicode type, the returned string is surrounded by additional curly braces.
@@ -11267,10 +11267,10 @@ protected function _putocg() {
$this->_out('/Usage <> /View <>>>>>');
$this->_out('endobj');
}
-
+
/*
* Set the visibility of the successive elements.
- * This can be useful, for instance, to put a background
+ * This can be useful, for instance, to put a background
* image or color that will show on screen but won't print.
* @param string $v visibility mode. Legal values are: all, print, screen.
* @access public
@@ -11304,7 +11304,7 @@ public function setVisibility($v) {
}
$this->visibility = $v;
}
-
+
/*
* Add transparency parameters to the current extgstate
* @param array $params parameters
@@ -11317,7 +11317,7 @@ protected function addExtGState($parms) {
$this->extgstates[$n]['parms'] = $parms;
return $n;
}
-
+
/*
* Add an extgstate
* @param array $gs extgstate
@@ -11327,7 +11327,7 @@ protected function addExtGState($parms) {
protected function setExtGState($gs) {
$this->_out(sprintf('/GS%d gs', $gs));
}
-
+
/*
* Put extgstates for object transparency
* @param array $gs extgstate
@@ -11347,7 +11347,7 @@ protected function _putextgstates() {
$this->_out('endobj');
}
}
-
+
/*
* Set alpha for stroking (CA) and non-stroking (ca) operations.
* @param float $alpha real value from 0 (transparent) to 1 (opaque)
@@ -11372,46 +11372,46 @@ public function setJPEGQuality($quality) {
}
$this->jpeg_quality = intval($quality);
}
-
+
/*
* Set the default number of columns in a row for HTML tables.
* @param int $cols number of columns
* @access public
* @since 3.0.014 (2008-06-04)
*/
- public function setDefaultTableColumns($cols=4) {
- $this->default_table_columns = intval($cols);
+ public function setDefaultTableColumns($cols=4) {
+ $this->default_table_columns = intval($cols);
}
-
+
/*
* Set the height of the cell (line height) respect the font height.
* @param int $h cell proportion respect font height (typical value = 1.25).
* @access public
* @since 3.0.014 (2008-06-04)
*/
- public function setCellHeightRatio($h) {
- $this->cell_height_ratio = $h;
+ public function setCellHeightRatio($h) {
+ $this->cell_height_ratio = $h;
}
-
+
/*
* return the height of cell repect font height.
* @access public
* @since 4.0.012 (2008-07-24)
*/
- public function getCellHeightRatio() {
- return $this->cell_height_ratio;
+ public function getCellHeightRatio() {
+ return $this->cell_height_ratio;
}
-
+
/*
* Set the PDF version (check PDF reference for valid values).
* Default value is 1.t
* @access public
* @since 3.1.000 (2008-06-09)
*/
- public function setPDFVersion($version='1.7') {
+ public function setPDFVersion($version='1.7') {
$this->PDFVersion = $version;
}
-
+
/*
* Set the viewer preferences dictionary controlling the way the document is to be presented on the screen or in print.
* (see Section 8.1 of PDF reference, "Viewer Preferences").
@@ -11438,10 +11438,10 @@ public function setPDFVersion($version='1.7') {
* @access public
* @since 3.1.000 (2008-06-09)
*/
- public function setViewerPreferences($preferences) {
+ public function setViewerPreferences($preferences) {
$this->viewer_preferences = $preferences;
}
-
+
/**
* Paints a linear colour gradient.
* @param float $x abscissa of the top left corner of the rectangle.
@@ -11459,7 +11459,7 @@ public function LinearGradient($x, $y, $w, $h, $col1=array(), $col2=array(), $co
$this->Clip($x, $y, $w, $h);
$this->Gradient(2, $col1, $col2, $coords);
}
-
+
/**
* Paints a radial colour gradient.
* @param float $x abscissa of the top left corner of the rectangle.
@@ -11477,7 +11477,7 @@ public function RadialGradient($x, $y, $w, $h, $col1=array(), $col2=array(), $co
$this->Clip($x, $y, $w, $h);
$this->Gradient(3, $col1, $col2, $coords);
}
-
+
/**
* Paints a coons patch mesh.
* @param float $x abscissa of the top left corner of the rectangle.
@@ -11496,7 +11496,7 @@ public function RadialGradient($x, $y, $w, $h, $col1=array(), $col2=array(), $co
* @access public
*/
public function CoonsPatchMesh($x, $y, $w, $h, $col1=array(), $col2=array(), $col3=array(), $col4=array(), $coords=array(0.00,0.0,0.33,0.00,0.67,0.00,1.00,0.00,1.00,0.33,1.00,0.67,1.00,1.00,0.67,1.00,0.33,1.00,0.00,1.00,0.00,0.67,0.00,0.33), $coords_min=0, $coords_max=1) {
- $this->Clip($x, $y, $w, $h);
+ $this->Clip($x, $y, $w, $h);
$n = count($this->gradients) + 1;
$this->gradients[$n]['type'] = 6; //coons patch mesh
//check the coords array if it is the simple array or the multi patch array
@@ -11564,7 +11564,7 @@ public function CoonsPatchMesh($x, $y, $w, $h, $col1=array(), $col2=array(), $co
//restore previous Graphic State
$this->_out('Q');
}
-
+
/**
* Set a rectangular clipping area.
* @param float $x abscissa of the top left corner of the rectangle (or top right corner for RTL mode).
@@ -11587,7 +11587,7 @@ protected function Clip($x, $y, $w, $h) {
$s .= sprintf(' %.3F 0 0 %.3F %.3F %.3F cm', $w*$this->k, $h*$this->k, $x*$this->k, ($this->h-($y+$h))*$this->k);
$this->_out($s);
}
-
+
/**
* Output gradient.
* @param int $type type of gradient.
@@ -11615,7 +11615,7 @@ protected function Gradient($type, $col1, $col2, $coords) {
//restore previous Graphic State
$this->_out('Q');
}
-
+
/**
* Output shaders.
* @author Andreas Würmser, Nicola Asuni
@@ -11623,7 +11623,7 @@ protected function Gradient($type, $col1, $col2, $coords) {
* @access protected
*/
function _putshaders() {
- foreach ($this->gradients as $id => $grad) {
+ foreach ($this->gradients as $id => $grad) {
if (($grad['type'] == 2) OR ($grad['type'] == 3)) {
$this->_newobj();
$this->_out('<<');
@@ -11676,7 +11676,7 @@ protected function _outarc($x1, $y1, $x2, $y2, $x3, $y3 ) {
$h = $this->h;
$this->_out(sprintf('%.2F %.2F %.2F %.2F %.2F %.2F c', $x1*$this->k, ($h-$y1)*$this->k, $x2*$this->k, ($h-$y2)*$this->k, $x3*$this->k, ($h-$y3)*$this->k));
}
-
+
/**
* Draw the sector of a circle.
* It can be used for instance to render pie charts.
@@ -11751,10 +11751,10 @@ public function PieSector($xc, $yc, $r, $a, $b, $style='FD', $cw=true, $o=90) {
//terminate drawing
$this->_out($op);
}
-
+
/**
* Embed vector-based Adobe Illustrator (AI) or AI-compatible EPS files.
- * Only vector drawing is supported, not text or bitmap.
+ * Only vector drawing is supported, not text or bitmap.
* Although the script was successfully tested with various AI format versions, best results are probably achieved with files that were exported in the AI3 format (tested with Illustrator CS2, Freehand MX and Photoshop CS2).
* @param string $file Name of the file containing the image.
* @param float $x Abscissa of the upper-left corner.
@@ -11898,7 +11898,7 @@ public function ImageEps($file, $x='', $y='', $w=0, $h=0, $link='', $useBounding
$cnt = count($lines);
for ($i=0; $i < $cnt; ++$i) {
$line = $lines[$i];
- if (($line == '') OR ($line{0} == '%')) {
+ if (($line == '') OR ($line[0] == '%')) {
continue;
}
$len = strlen($line);
@@ -11906,8 +11906,8 @@ public function ImageEps($file, $x='', $y='', $w=0, $h=0, $link='', $useBounding
$cmd = array_pop($chunks);
// RGB
if (($cmd == 'Xa') OR ($cmd == 'XA')) {
- $b = array_pop($chunks);
- $g = array_pop($chunks);
+ $b = array_pop($chunks);
+ $g = array_pop($chunks);
$r = array_pop($chunks);
$this->_out(''.$r.' '.$g.' '.$b.' '.($cmd=='Xa'?'rg':'RG')); //substr($line, 0, -2).'rg' -> in EPS (AI8): c m y k r g b rg!
continue;
@@ -11949,7 +11949,7 @@ public function ImageEps($file, $x='', $y='', $w=0, $h=0, $link='', $useBounding
case 'V':
case 'L':
case 'C': {
- $line{$len-1} = strtolower($cmd);
+ $line[$len-1] = strtolower($cmd);
$this->_out($line);
break;
}
@@ -12024,7 +12024,7 @@ public function ImageEps($file, $x='', $y='', $w=0, $h=0, $link='', $useBounding
}
$this->endlinex = $this->img_rb_x;
}
-
+
/**
* Set document barcode.
* @param string $bc barcode
@@ -12033,7 +12033,7 @@ public function ImageEps($file, $x='', $y='', $w=0, $h=0, $link='', $useBounding
public function setBarcode($bc='') {
$this->barcode = $bc;
}
-
+
/**
* Get current barcode.
* @return string
@@ -12043,7 +12043,7 @@ public function setBarcode($bc='') {
public function getBarcode() {
return $this->barcode;
}
-
+
/**
* Print a Linear Barcode.
* @param string $code code to print
@@ -12202,7 +12202,7 @@ public function write1DBarcode($code, $type, $x='', $y='', $w='', $h='', $xres=0
if ($style['text']) {
// print text
$this->x = $xpos_text;
- $this->y = $y + $style['padding'] + $barh;
+ $this->y = $y + $style['padding'] + $barh;
$this->Cell(($arrcode['maxw'] * $xres), ($this->cell_height_ratio * $fontsize / $this->k), $code, 0, 0, 'C', 0, '', $style['stretchtext']);
}
// restore original direction
@@ -12244,7 +12244,7 @@ public function write1DBarcode($code, $type, $x='', $y='', $w='', $h='', $xres=0
}
}
}
-
+
/**
* This function is DEPRECATED, please use the new write1DBarcode() function.
* @param int $x x position in user units
@@ -12295,7 +12295,7 @@ public function writeBarcode($x, $y, $w, $h, $type, $style, $font, $xres, $code)
}
$this->write1DBarcode($code, $type, $x, $y, $w, $h, $xres, $newstyle, '');
}
-
+
/**
* Print 2D Barcode.
* @param string $code code to print
@@ -12441,7 +12441,7 @@ public function write2DBarcode($code, $type, $x='', $y='', $w='', $h='', $style=
}
}
}
-
+
/**
* Returns an array containing current margins:
*
@@ -12453,7 +12453,7 @@ public function write2DBarcode($code, $type, $x='', $y='', $w='', $h='', $style=
- $ret['footer'] = footer margin
- $ret['cell'] = cell margin
*
- * @return array containing all margins measures
+ * @return array containing all margins measures
* @access public
* @since 3.2.000 (2008-06-23)
*/
@@ -12469,14 +12469,14 @@ public function getMargins() {
);
return $ret;
}
-
+
/**
* Returns an array containing original margins:
*
- $ret['left'] = left margin
- $ret['right'] = right margin
*
- * @return array containing all margins measures
+ * @return array containing all margins measures
* @access public
* @since 4.0.012 (2008-07-24)
*/
@@ -12487,7 +12487,7 @@ public function getOriginalMargins() {
);
return $ret;
}
-
+
/**
* Returns the current font size.
* @return current font size
@@ -12497,7 +12497,7 @@ public function getOriginalMargins() {
public function getFontSize() {
return $this->FontSize;
}
-
+
/**
* Returns the current font size in points unit.
* @return current font size in points unit
@@ -12527,9 +12527,9 @@ public function getFontFamily() {
public function getFontStyle() {
return $this->FontStyle;
}
-
+
/**
- * Prints a cell (rectangular area) with optional borders, background color and html text string.
+ * Prints a cell (rectangular area) with optional borders, background color and html text string.
* The upper-left corner of the cell corresponds to the current position. After the call, the current position moves to the right or to the next line.
* If automatic page breaking is enabled and the cell goes beyond the limit, a page break is done before outputting.
* @param float $w Cell width. If 0, the cell extends up to the right margin.
@@ -12551,7 +12551,7 @@ public function getFontStyle() {
public function writeHTMLCell($w, $h, $x, $y, $html='', $border=0, $ln=0, $fill=0, $reseth=true, $align='', $autopadding=true) {
return $this->MultiCell($w, $h, $html, $border, $align, $fill, $ln, $x, $y, $reseth, 0, true, $autopadding, 0);
}
-
+
/**
* Returns the HTML DOM array.
* - $dom[$key]['tag'] = true if tag, false otherwise;
- $dom[$key]['value'] = tag name or text;
- $dom[$key]['opening'] = true if opening tag, false otherwise;
- $dom[$key]['attribute'] = array of attributes (attribute name is the key);
- $dom[$key]['style'] = array of style attributes (attribute name is the key);
- $dom[$key]['parent'] = id of parent element;
- $dom[$key]['fontname'] = font family name;
- $dom[$key]['fontstyle'] = font style;
- $dom[$key]['fontsize'] = font size in points;
- $dom[$key]['bgcolor'] = RGB array of background color;
- $dom[$key]['fgcolor'] = RGB array of foreground color;
- $dom[$key]['width'] = width in pixels;
- $dom[$key]['height'] = height in pixels;
- $dom[$key]['align'] = text alignment;
- $dom[$key]['cols'] = number of colums in table;
- $dom[$key]['rows'] = number of rows in table;
@@ -12663,7 +12663,7 @@ protected function getHtmlDomArray($html) {
$tagname = strtolower($tag[1]);
// check if we are inside a table header
if ($tagname == 'thead') {
- if ($element{0} == '/') {
+ if ($element[0] == '/') {
$thead = false;
} else {
$thead = true;
@@ -12673,7 +12673,7 @@ protected function getHtmlDomArray($html) {
}
$dom[$key]['tag'] = true;
$dom[$key]['value'] = $tagname;
- if ($element{0} == '/') {
+ if ($element[0] == '/') {
// closing html tag
$dom[$key]['opening'] = false;
$dom[$key]['parent'] = end($level);
@@ -12824,10 +12824,10 @@ protected function getHtmlDomArray($html) {
}
}
// font style
- if (isset($dom[$key]['style']['font-weight']) AND (strtolower($dom[$key]['style']['font-weight']{0}) == 'b')) {
+ if (isset($dom[$key]['style']['font-weight']) AND (strtolower($dom[$key]['style']['font-weight'][0]) == 'b')) {
$dom[$key]['fontstyle'] .= 'B';
}
- if (isset($dom[$key]['style']['font-style']) AND (strtolower($dom[$key]['style']['font-style']{0}) == 'i')) {
+ if (isset($dom[$key]['style']['font-style']) AND (strtolower($dom[$key]['style']['font-style'][0]) == 'i')) {
$dom[$key]['fontstyle'] .= '"I';
}
// font color
@@ -12844,9 +12844,9 @@ protected function getHtmlDomArray($html) {
foreach ($decors as $dec) {
$dec = trim($dec);
if (!$this->empty_string($dec)) {
- if ($dec{0} == 'u') {
+ if ($dec[0] == 'u') {
$dom[$key]['fontstyle'] .= 'U';
- } elseif ($dec{0} == 'l') {
+ } elseif ($dec[0] == 'l') {
$dom[$key]['fontstyle'] .= 'D';
}
}
@@ -12862,7 +12862,7 @@ protected function getHtmlDomArray($html) {
}
// check for text alignment
if (isset($dom[$key]['style']['text-align'])) {
- $dom[$key]['align'] = strtoupper($dom[$key]['style']['text-align']{0});
+ $dom[$key]['align'] = strtoupper($dom[$key]['style']['text-align'][0]);
}
// check for border attribute
if (isset($dom[$key]['style']['border'])) {
@@ -12885,9 +12885,9 @@ protected function getHtmlDomArray($html) {
// font size
if (isset($dom[$key]['attribute']['size'])) {
if ($key > 0) {
- if ($dom[$key]['attribute']['size']{0} == '+') {
+ if ($dom[$key]['attribute']['size'][0] == '+') {
$dom[$key]['fontsize'] = $dom[($dom[$key]['parent'])]['fontsize'] + intval(substr($dom[$key]['attribute']['size'], 1));
- } elseif ($dom[$key]['attribute']['size']{0} == '-') {
+ } elseif ($dom[$key]['attribute']['size'][0] == '-') {
$dom[$key]['fontsize'] = $dom[($dom[$key]['parent'])]['fontsize'] - intval(substr($dom[$key]['attribute']['size'], 1));
} else {
$dom[$key]['fontsize'] = intval($dom[$key]['attribute']['size']);
@@ -12924,8 +12924,8 @@ protected function getHtmlDomArray($html) {
if (($dom[$key]['value'] == 'pre') OR ($dom[$key]['value'] == 'tt')) {
$dom[$key]['fontname'] = $this->default_monospaced_font;
}
- if (($dom[$key]['value']{0} == 'h') AND (intval($dom[$key]['value']{1}) > 0) AND (intval($dom[$key]['value']{1}) < 7)) {
- $headsize = (4 - intval($dom[$key]['value']{1})) * 2;
+ if (($dom[$key]['value'][0] == 'h') AND (intval($dom[$key]['value'][1]) > 0) AND (intval($dom[$key]['value'][1]) < 7)) {
+ $headsize = (4 - intval($dom[$key]['value'][1])) * 2;
$dom[$key]['fontsize'] = $dom[0]['fontsize'] + $headsize;
$dom[$key]['fontstyle'] .= 'B';
}
@@ -12973,7 +12973,7 @@ protected function getHtmlDomArray($html) {
}
// check for text alignment
if (isset($dom[$key]['attribute']['align']) AND (!$this->empty_string($dom[$key]['attribute']['align'])) AND ($dom[$key]['value'] !== 'img')) {
- $dom[$key]['align'] = strtoupper($dom[$key]['attribute']['align']{0});
+ $dom[$key]['align'] = strtoupper($dom[$key]['attribute']['align'][0]);
}
} // end opening tag
} else {
@@ -12987,7 +12987,7 @@ protected function getHtmlDomArray($html) {
}
return $dom;
}
-
+
/**
* Allows to preserve some HTML formatting (limited support).
* IMPORTANT: The HTML must be well formatted - try to clean-up it using an application like HTML-Tidy before submitting.
@@ -13008,7 +13008,7 @@ public function writeHTML($html, $ln=true, $fill=false, $reseth=false, $cell=fal
$prevrMargin = $this->rMargin;
$curfontname = $this->FontFamily;
$curfontstyle = $this->FontStyle;
- $curfontsize = $this->FontSizePt;
+ $curfontsize = $this->FontSizePt;
$this->newline = true;
$startlinepage = $this->page;
$minstartliney = $this->y;
@@ -13064,7 +13064,7 @@ public function writeHTML($html, $ln=true, $fill=false, $reseth=false, $cell=fal
$this->lispacer = '';
if (($this->empty_string($this->lasth)) OR ($reseth)) {
//set row height
- $this->lasth = $this->FontSize * $this->cell_height_ratio;
+ $this->lasth = $this->FontSize * $this->cell_height_ratio;
}
$dom = $this->getHtmlDomArray($html);
$maxel = count($dom);
@@ -13120,7 +13120,7 @@ public function writeHTML($html, $ln=true, $fill=false, $reseth=false, $cell=fal
AND ($dom[$key]['value'] == 'img')
AND (isset($dom[$key]['attribute']['height']))
AND ($dom[$key]['attribute']['height'] > 0)) {
-
+
// get image height
$imgh = $this->getHTMLUnitToUnits($dom[$key]['attribute']['height'], $this->lasth, 'px');
if (!$this->InFooter) {
@@ -13158,10 +13158,10 @@ public function writeHTML($html, $ln=true, $fill=false, $reseth=false, $cell=fal
$this->PageAnnots[$this->page][] = $pac;
unset($this->PageAnnots[$startlinepage][$pak]);
$npak = count($this->PageAnnots[$this->page]) - 1;
- $this->PageAnnots[$this->page][$npak]['y'] -= $yshift;
+ $this->PageAnnots[$this->page][$npak]['y'] -= $yshift;
}
}
-
+
}
$pask = $next_pask;
$startlinepos = $this->cntmrk[$this->page];
@@ -13169,7 +13169,7 @@ public function writeHTML($html, $ln=true, $fill=false, $reseth=false, $cell=fal
$startliney = $this->y;
}
$this->y += (($curfontsize / $this->k) - $imgh);
- $minstartliney = min($this->y, $minstartliney);
+ $minstartliney = min($this->y, $minstartliney);
} elseif (isset($dom[$key]['fontname']) OR isset($dom[$key]['fontstyle']) OR isset($dom[$key]['fontsize'])) {
// account for different font size
$pfontname = $curfontname;
@@ -13303,7 +13303,7 @@ public function writeHTML($html, $ln=true, $fill=false, $reseth=false, $cell=fal
}
} elseif (($plalign == 'R') AND (!$this->rtl)) {
// right alignment on LTR document
- $t_x = $mdiff;
+ $t_x = $mdiff;
} elseif (($plalign == 'L') AND ($this->rtl)) {
// left alignment on RTL document
$t_x = -$mdiff;
@@ -13356,9 +13356,9 @@ public function writeHTML($html, $ln=true, $fill=false, $reseth=false, $cell=fal
// check if we are inside a string section '[( ... )]'
$stroffset = strpos($pmid, '[(', $offset);
if (($stroffset !== false) AND ($stroffset <= $strpiece[2][1])) {
- // set offset to the end of string section
+ // set offset to the end of string section
$offset = strpos($pmid, ')]', $stroffset);
- while (($offset !== false) AND ($pmid{($offset - 1)} == '\\')) {
+ while (($offset !== false) AND ($pmid[($offset - 1)] == '\\')) {
$offset = strpos($pmid, ')]', ($offset + 1));
}
if ($offset === false) {
@@ -13561,7 +13561,7 @@ public function writeHTML($html, $ln=true, $fill=false, $reseth=false, $cell=fal
if (isset($dom[($dom[$trid]['parent'])]['attribute']['cellpadding'])) {
$currentcmargin = $this->getHTMLUnitToUnits($dom[($dom[$trid]['parent'])]['attribute']['cellpadding'], 1, 'px');
} else {
- $currentcmargin = 0;
+ $currentcmargin = 0;
}
$this->cMargin = $currentcmargin;
if (isset($dom[($dom[$trid]['parent'])]['attribute']['cellspacing'])) {
@@ -13612,7 +13612,7 @@ public function writeHTML($html, $ln=true, $fill=false, $reseth=false, $cell=fal
if (!isset($dom[$trid]['startx'])) {
$dom[$trid]['startx'] = $this->x;
}
- $this->x += ($cellspacingx / 2);
+ $this->x += ($cellspacingx / 2);
if (isset($dom[$parentid]['attribute']['rowspan'])) {
$rowspan = intval($dom[$parentid]['attribute']['rowspan']);
} else {
@@ -13697,7 +13697,7 @@ public function writeHTML($html, $ln=true, $fill=false, $reseth=false, $cell=fal
$dom[$trid]['endpage'] = max($this->page, $dom[$trid]['endpage']);
} else {
$dom[$trid]['endpage'] = $this->page;
- }
+ }
} else {
// account for row-spanned cells
$dom[$table_el]['rowspans'][($trsid - 1)]['endx'] = $this->x;
@@ -13869,7 +13869,7 @@ public function writeHTML($html, $ln=true, $fill=false, $reseth=false, $cell=fal
} else {
$pmid = substr($this->getPageBuffer($startlinepage), $startlinepos);
$pend = '';
- }
+ }
// calculate shifting amount
$tw = $w;
if ($this->lMargin != $prevlMargin) {
@@ -13928,10 +13928,10 @@ public function writeHTML($html, $ln=true, $fill=false, $reseth=false, $cell=fal
$this->lispacer = $prev_lispacer;
unset($dom);
}
-
+
/**
* Process opening tags.
- * @param array $dom html dom array
+ * @param array $dom html dom array
* @param int $key current element id
* @param boolean $cell if true add the default cMargin space to each new line (default false).
* @access protected
@@ -14016,15 +14016,15 @@ protected function openHTMLTagHandler(&$dom, $key, $cell=false) {
foreach ($decors as $dec) {
$dec = trim($dec);
if (!$this->empty_string($dec)) {
- if ($dec{0} == 'u') {
+ if ($dec[0] == 'u') {
$this->HREF['style'] .= 'U';
- } elseif ($dec{0} == 'l') {
+ } elseif ($dec[0] == 'l') {
$this->HREF['style'] .= 'D';
}
}
}
}
- }
+ }
break;
}
case 'img': {
@@ -14045,7 +14045,7 @@ protected function openHTMLTagHandler(&$dom, $key, $cell=false) {
// the only alignment supported is "bottom"
// further development is required for other modes.
$tag['attribute']['align'] = 'bottom';
- //}
+ //}
switch($tag['attribute']['align']) {
case 'top': {
$align = 'T';
@@ -14080,7 +14080,7 @@ protected function openHTMLTagHandler(&$dom, $key, $cell=false) {
$imglink = '';
if (isset($this->HREF['url']) AND !$this->empty_string($this->HREF['url'])) {
$imglink = $this->HREF['url'];
- if ($imglink{0} == '#') {
+ if ($imglink[0] == '#') {
// convert url to internal link
$page = intval(substr($imglink, 1));
$imglink = $this->AddLink();
@@ -14229,11 +14229,11 @@ protected function openHTMLTagHandler(&$dom, $key, $cell=false) {
$this->SetXY($this->GetX(), $this->GetY() + ((0.3 * $this->FontSizePt) / $this->k));
break;
}
- case 'h1':
- case 'h2':
- case 'h3':
- case 'h4':
- case 'h5':
+ case 'h1':
+ case 'h2':
+ case 'h3':
+ case 'h4':
+ case 'h5':
case 'h6': {
$this->addHTMLVertSpace(1, $cell, ($tag['fontsize'] * 1.5) / $this->k, $firstorlast, $tag['value'], false);
break;
@@ -14465,10 +14465,10 @@ protected function openHTMLTagHandler(&$dom, $key, $cell=false) {
}
}
}
-
+
/**
* Process closing tags.
- * @param array $dom html dom array
+ * @param array $dom html dom array
* @param int $key current element id
* @param boolean $cell if true add the default cMargin space to each new line (default false).
* @access protected
@@ -14525,7 +14525,7 @@ protected function closeHTMLTagHandler(&$dom, $key, $cell=false) {
if (isset($dom[$table_el]['attribute']['cellspacing'])) {
$cellspacing = $this->getHTMLUnitToUnits($dom[$table_el]['attribute']['cellspacing'], 1, 'px');
$this->y += $cellspacing;
- }
+ }
$this->Ln(0, $cell);
$this->x = $parent['startx'];
// account for booklet mode
@@ -14544,7 +14544,7 @@ protected function closeHTMLTagHandler(&$dom, $key, $cell=false) {
case 'table': {
// draw borders
$table_el = $parent;
- if ((isset($table_el['attribute']['border']) AND ($table_el['attribute']['border'] > 0))
+ if ((isset($table_el['attribute']['border']) AND ($table_el['attribute']['border'] > 0))
OR (isset($table_el['style']['border']) AND ($table_el['style']['border'] > 0))) {
$border = 1;
} else {
@@ -14666,13 +14666,13 @@ protected function closeHTMLTagHandler(&$dom, $key, $cell=false) {
$pend = substr($pagebuff, $pagemark);
$this->setPageBuffer($this->page, $pstart.$ccode."\n".$pend);
$pagemark += strlen($ccode."\n");
- }
+ }
}
- }
+ }
if (isset($table_el['attribute']['cellspacing'])) {
$cellspacing = $this->getHTMLUnitToUnits($table_el['attribute']['cellspacing'], 1, 'px');
$this->y += $cellspacing;
- }
+ }
$this->Ln(0, $cell);
$this->x = $parent['startx'];
if ($endpage > $startpage) {
@@ -14778,11 +14778,11 @@ protected function closeHTMLTagHandler(&$dom, $key, $cell=false) {
$this->addHTMLVertSpace(0, $cell, '', $firstorlast, $tag['value'], true);
break;
}
- case 'h1':
- case 'h2':
- case 'h3':
- case 'h4':
- case 'h5':
+ case 'h1':
+ case 'h2':
+ case 'h3':
+ case 'h4':
+ case 'h5':
case 'h6': {
$this->addHTMLVertSpace(1, $cell, ($parent['fontsize'] * 1.5) / $this->k, $firstorlast, $tag['value'], true);
break;
@@ -14799,7 +14799,7 @@ protected function closeHTMLTagHandler(&$dom, $key, $cell=false) {
}
$this->tmprtl = false;
}
-
+
/**
* Add vertical spaces if needed.
* @param int $n number of spaces to add
@@ -14832,7 +14832,7 @@ protected function addHTMLVertSpace($n, $cell=false, $h='', $firstorlast=false,
$this->htmlvspace = $vsize;
}
}
-
+
/**
* Set the default bullet to be used as LI bullet symbol
* @param string $symbol character or string to be used (legal values are: '' = automatic, '!' = auto bullet, '#' = auto numbering, 'disc', 'disc', 'circle', 'square', '1', 'decimal', 'decimal-leading-zero', 'i', 'lower-roman', 'I', 'upper-roman', 'a', 'lower-alpha', 'lower-latin', 'A', 'upper-alpha', 'upper-latin', 'lower-greek')
@@ -14870,7 +14870,7 @@ public function setLIsymbol($symbol='!') {
}
}
}
-
+
/**
* Set the booklet mode for double-sided pages.
* @param boolean $booklet true set the booklet mode on, fals eotherwise.
@@ -14888,7 +14888,7 @@ public function SetBooklet($booklet=true, $inner=-1, $outer=-1) {
$this->rMargin = $outer;
}
}
-
+
/**
* Swap the left and right margins.
* @param boolean $reverse if true swap left and right margins.
@@ -15110,7 +15110,7 @@ protected function putHtmlListBullet($listdepth, $listtype='', $size=10) {
$color = $this->fgcolor;
$width = 0;
$textitem = '';
- $tmpx = $this->x;
+ $tmpx = $this->x;
$lspace = $this->GetStringWidth(' ');
if ($listtype == '!') {
// set default list type for unordered list
@@ -16048,7 +16048,7 @@ public function objclone($object) {
public function empty_string($str) {
return (is_null($str) OR (is_string($str) AND (strlen($str) == 0)));
}
-
+
} // END OF TCPDF CLASS
}
//============================================================+
diff --git a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Shared/String.php b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Shared/String.php
index 5f23758d..efddb808 100644
--- a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Shared/String.php
+++ b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Shared/String.php
@@ -491,7 +491,7 @@ public static function ConvertEncoding($value, $to, $from)
// else, no conversion
return $value;
}
-
+
/**
* Decode UTF-16 encoded strings.
*
@@ -509,15 +509,15 @@ public static function ConvertEncoding($value, $to, $from)
*/
function utf16_decode( $str, $bom_be=true ) {
if( strlen($str) < 2 ) return $str;
- $c0 = ord($str{0});
- $c1 = ord($str{1});
+ $c0 = ord($str[0]);
+ $c1 = ord($str[1]);
if( $c0 == 0xfe && $c1 == 0xff ) { $str = substr($str,2); }
elseif( $c0 == 0xff && $c1 == 0xfe ) { $str = substr($str,2); $bom_be = false; }
$len = strlen($str);
$newstr = '';
for($i=0;$i<$len;$i+=2) {
- if( $bom_be ) { $val = ord($str{$i}) << 4; $val += ord($str{$i+1}); }
- else { $val = ord($str{$i+1}) << 4; $val += ord($str{$i}); }
+ if( $bom_be ) { $val = ord($str[$i]) << 4; $val += ord($str[$i+1]); }
+ else { $val = ord($str[$i+1]) << 4; $val += ord($str[$i]); }
$newstr .= ($val == 0x228) ? "\n" : chr($val);
}
return $newstr;
@@ -602,7 +602,7 @@ public static function getDecimalSeparator()
$localeconv = localeconv();
self::$_decimalSeparator = $localeconv['decimal_point'] != ''
? $localeconv['decimal_point'] : $localeconv['mon_decimal_point'];
-
+
if (self::$_decimalSeparator == '')
{
// Default to .
diff --git a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Shared/ZipStreamWrapper.php b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Shared/ZipStreamWrapper.php
index 559927b7..f5b8063f 100644
--- a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Shared/ZipStreamWrapper.php
+++ b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Shared/ZipStreamWrapper.php
@@ -75,7 +75,7 @@ public static function register() {
*/
public function stream_open($path, $mode, $options, &$opened_path) {
// Check for mode
- if ($mode{0} != 'r') {
+ if ($mode[0] != 'r') {
throw new Exception('Mode ' . $mode . ' is not supported. Only read mode is supported.');
}
diff --git a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Writer/Excel5/Parser.php b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Writer/Excel5/Parser.php
index e1aeddcc..9bcb6f4c 100644
--- a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Writer/Excel5/Parser.php
+++ b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Writer/Excel5/Parser.php
@@ -1030,7 +1030,7 @@ function _cellToRowcol($cell)
$col = 0;
$col_ref_length = strlen($col_ref);
for ($i = 0; $i < $col_ref_length; ++$i) {
- $col += (ord($col_ref{$i}) - ord('A') + 1) * pow(26, $expn);
+ $col += (ord($col_ref[$i]) - ord('A') + 1) * pow(26, $expn);
--$expn;
}
@@ -1052,27 +1052,27 @@ function _advance()
$formula_length = strlen($this->_formula);
// eat up white spaces
if ($i < $formula_length) {
- while ($this->_formula{$i} == " ") {
+ while ($this->_formula[$i] == " ") {
++$i;
}
if ($i < ($formula_length - 1)) {
- $this->_lookahead = $this->_formula{$i+1};
+ $this->_lookahead = $this->_formula[$i+1];
}
$token = '';
}
while ($i < $formula_length) {
- $token .= $this->_formula{$i};
+ $token .= $this->_formula[$i];
if ($i < ($formula_length - 1)) {
- $this->_lookahead = $this->_formula{$i+1};
+ $this->_lookahead = $this->_formula[$i+1];
} else {
$this->_lookahead = '';
}
if ($this->_match($token) != '') {
//if ($i < strlen($this->_formula) - 1) {
- // $this->_lookahead = $this->_formula{$i+1};
+ // $this->_lookahead = $this->_formula[$i+1];
//}
$this->_current_char = $i + 1;
$this->_current_token = $token;
@@ -1080,7 +1080,7 @@ function _advance()
}
if ($i < ($formula_length - 2)) {
- $this->_lookahead = $this->_formula{$i+2};
+ $this->_lookahead = $this->_formula[$i+2];
} else { // if we run out of characters _lookahead becomes empty
$this->_lookahead = '';
}
@@ -1222,7 +1222,7 @@ function parse($formula)
{
$this->_current_char = 0;
$this->_formula = $formula;
- $this->_lookahead = isset($formula{1}) ? $formula{1} : '';
+ $this->_lookahead = isset($formula[1]) ? $formula[1] : '';
$this->_advance();
$this->_parse_tree = $this->_condition();
return true;
diff --git a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Writer/Excel5/Workbook.php b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Writer/Excel5/Workbook.php
index 5f289307..7ad77710 100644
--- a/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Writer/Excel5/Workbook.php
+++ b/includes/PHPExcel-1.7.3c/Classes/PHPExcel/Writer/Excel5/Workbook.php
@@ -686,7 +686,7 @@ private function _writeAllDefinedNamesBiff8()
$formulaData = $this->_parser->toReversePolish();
// make sure tRef3d is of type tRef3dR (0x3A)
- if (isset($formulaData{0}) and ($formulaData{0} == "\x7A" or $formulaData{0} == "\x5A")) {
+ if (isset($formulaData[0]) and ($formulaData[0] == "\x7A" or $formulaData[0] == "\x5A")) {
$formulaData = "\x3A" . substr($formulaData, 1);
}
diff --git a/includes/PHPExcel-1.7.5/Classes/PHPExcel/Calculation.php b/includes/PHPExcel-1.7.5/Classes/PHPExcel/Calculation.php
index 74cdc74a..f0e57281 100644
--- a/includes/PHPExcel-1.7.5/Classes/PHPExcel/Calculation.php
+++ b/includes/PHPExcel-1.7.5/Classes/PHPExcel/Calculation.php
@@ -2041,7 +2041,7 @@ public static function _wrapResult($value) {
*/
public static function _unwrapResult($value) {
if (is_string($value)) {
- if ((isset($value{0})) && ($value{0} == '"') && (substr($value,-1) == '"')) {
+ if ((isset($value[0])) && ($value[0] == '"') && (substr($value,-1) == '"')) {
return substr($value,1,-1);
}
// Convert numeric errors to NaN error
@@ -2149,7 +2149,7 @@ public function parseFormula($formula) {
// Basic validation that this is indeed a formula
// We return an empty array if not
$formula = trim($formula);
- if ((!isset($formula{0})) || ($formula{0} != '=')) return array();
+ if ((!isset($formula[0])) || ($formula[0] != '=')) return array();
$formula = ltrim(substr($formula,1));
if (!isset($formula{0})) return array();
@@ -2204,9 +2204,9 @@ public function _calculateFormulaValue($formula, $cellID=null, PHPExcel_Cell $pC
// Basic validation that this is indeed a formula
// We simply return the "cell value" (formula) if not
$formula = trim($formula);
- if ($formula{0} != '=') return self::_wrapResult($formula);
+ if ($formula[0] != '=') return self::_wrapResult($formula);
$formula = ltrim(substr($formula,1));
- if (!isset($formula{0})) return self::_wrapResult($formula);
+ if (!isset($formula[0])) return self::_wrapResult($formula);
$wsTitle = "\x00Wrk";
if (!is_null($pCell)) {
@@ -2486,7 +2486,7 @@ private function _showTypeDetails($value) {
} else {
if ($value == '') {
return 'an empty string';
- } elseif ($value{0} == '#') {
+ } elseif ($value[0] == '#') {
return 'a '.$value.' error';
} else {
$typeString = 'a string';
@@ -2611,10 +2611,10 @@ private function _parseFormula($formula, PHPExcel_Cell $pCell = null) {
// Loop through the formula extracting each operator and operand in turn
while(true) {
// echo 'Assessing Expression '.substr($formula, $index).'
';
- $opCharacter = $formula{$index}; // Get the first character of the value at the current index position
+ $opCharacter = $formula[$index]; // Get the first character of the value at the current index position
// echo 'Initial character of expression block is '.$opCharacter.'
';
- if ((isset($comparisonOperators[$opCharacter])) && (strlen($formula) > $index) && (isset($comparisonOperators[$formula{$index+1}]))) {
- $opCharacter .= $formula{++$index};
+ if ((isset($comparisonOperators[$opCharacter])) && (strlen($formula) > $index) && (isset($comparisonOperators[$formula[$index+1]]))) {
+ $opCharacter .= $formula[++$index];
// echo 'Initial character of expression block is comparison operator '.$opCharacter.'
';
}
@@ -2888,11 +2888,11 @@ private function _parseFormula($formula, PHPExcel_Cell $pCell = null) {
}
}
// Ignore white space
- while (($formula{$index} == "\n") || ($formula{$index} == "\r")) {
+ while (($formula[$index] == "\n") || ($formula[$index] == "\r")) {
++$index;
}
- if ($formula{$index} == ' ') {
- while ($formula{$index} == ' ') {
+ if ($formula[$index] == ' ') {
+ while ($formula[$index] == ' ') {
++$index;
}
// If we're expecting an operator, but only have a space between the previous and next operands (and both are
@@ -3278,7 +3278,7 @@ private function _processTokenStack($tokens, $cellID = null, PHPExcel_Cell $pCel
// echo 'Token is a PHPExcel constant: '.$excelConstant.'
';
$stack->push('Constant Value',self::$_ExcelConstants[$excelConstant]);
$this->_writeDebug('Evaluating Constant '.$excelConstant.' as '.$this->_showTypeDetails(self::$_ExcelConstants[$excelConstant]));
- } elseif ((is_numeric($token)) || (is_null($token)) || (is_bool($token)) || ($token == '') || ($token{0} == '"') || ($token{0} == '#')) {
+ } elseif ((is_numeric($token)) || (is_null($token)) || (is_bool($token)) || ($token == '') || ($token[0] == '"') || ($token[0] == '#')) {
// echo 'Token is a number, boolean, string, null or an Excel error
';
$stack->push('Value',$token);
// if the token is a named range, push the named range name onto the stack
@@ -3313,11 +3313,11 @@ private function _validateBinaryOperand($cellID,&$operand,&$stack) {
if (is_string($operand)) {
// We only need special validations for the operand if it is a string
// Start by stripping off the quotation marks we use to identify true excel string values internally
- if ($operand > '' && $operand{0} == '"') { $operand = self::_unwrapResult($operand); }
+ if ($operand > '' && $operand[0] == '"') { $operand = self::_unwrapResult($operand); }
// If the string is a numeric value, we treat it as a numeric, so no further testing
if (!is_numeric($operand)) {
// If not a numeric, test to see if the value is an Excel error, and so can't be used in normal binary operations
- if ($operand > '' && $operand{0} == '#') {
+ if ($operand > '' && $operand[0] == '#') {
$stack->push('Value', $operand);
$this->_writeDebug('Evaluation Result is '.$this->_showTypeDetails($operand));
return false;
@@ -3370,8 +3370,8 @@ private function _executeBinaryComparisonOperation($cellID,$operand1,$operand2,$
}
// Simple validate the two operands if they are string values
- if (is_string($operand1) && $operand1 > '' && $operand1{0} == '"') { $operand1 = self::_unwrapResult($operand1); }
- if (is_string($operand2) && $operand2 > '' && $operand2{0} == '"') { $operand2 = self::_unwrapResult($operand2); }
+ if (is_string($operand1) && $operand1 > '' && $operand1[0] == '"') { $operand1 = self::_unwrapResult($operand1); }
+ if (is_string($operand2) && $operand2 > '' && $operand2[0] == '"') { $operand2 = self::_unwrapResult($operand2); }
// execute the necessary operation
switch ($operation) {
diff --git a/includes/PHPExcel-1.7.5/Classes/PHPExcel/Calculation/Engineering.php b/includes/PHPExcel-1.7.5/Classes/PHPExcel/Calculation/Engineering.php
index e24f76ec..2be67912 100644
--- a/includes/PHPExcel-1.7.5/Classes/PHPExcel/Calculation/Engineering.php
+++ b/includes/PHPExcel-1.7.5/Classes/PHPExcel/Calculation/Engineering.php
@@ -685,7 +685,7 @@ public static function _parseComplex($complexNumber) {
// Split the input into its Real and Imaginary components
$leadingSign = 0;
if (strlen($workString) > 0) {
- $leadingSign = (($workString{0} == '+') || ($workString{0} == '-')) ? 1 : 0;
+ $leadingSign = (($workString[0] == '+') || ($workString[0] == '-')) ? 1 : 0;
}
$power = '';
$realNumber = strtok($workString, '+-');
@@ -718,10 +718,10 @@ public static function _parseComplex($complexNumber) {
private static function _cleanComplex($complexNumber) {
- if ($complexNumber{0} == '+') $complexNumber = substr($complexNumber,1);
- if ($complexNumber{0} == '0') $complexNumber = substr($complexNumber,1);
- if ($complexNumber{0} == '.') $complexNumber = '0'.$complexNumber;
- if ($complexNumber{0} == '+') $complexNumber = substr($complexNumber,1);
+ if ($complexNumber[0] == '+') $complexNumber = substr($complexNumber,1);
+ if ($complexNumber[0] == '0') $complexNumber = substr($complexNumber,1);
+ if ($complexNumber[0] == '.') $complexNumber = '0'.$complexNumber;
+ if ($complexNumber[0] == '+') $complexNumber = substr($complexNumber,1);
return $complexNumber;
}
diff --git a/includes/PHPExcel-1.7.5/Classes/PHPExcel/Calculation/FormulaParser.php b/includes/PHPExcel-1.7.5/Classes/PHPExcel/Calculation/FormulaParser.php
index 26dfdee1..8c196aff 100644
--- a/includes/PHPExcel-1.7.5/Classes/PHPExcel/Calculation/FormulaParser.php
+++ b/includes/PHPExcel-1.7.5/Classes/PHPExcel/Calculation/FormulaParser.php
@@ -159,7 +159,7 @@ private function _parseToTokens() {
// Check if the formula has a valid starting =
$formulaLength = strlen($this->_formula);
- if ($formulaLength < 2 || $this->_formula{0} != '=') return;
+ if ($formulaLength < 2 || $this->_formula[0] != '=') return;
// Helper variables
$tokens1 = $tokens2 = $stack = array();
@@ -179,8 +179,8 @@ private function _parseToTokens() {
// embeds are doubled
// end marks token
if ($inString) {
- if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE) {
- if ((($index + 2) <= $formulaLength) && ($this->_formula{$index + 1} == PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE)) {
+ if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE) {
+ if ((($index + 2) <= $formulaLength) && ($this->_formula[$index + 1] == PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE)) {
$value .= PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE;
++$index;
} else {
@@ -189,7 +189,7 @@ private function _parseToTokens() {
$value = "";
}
} else {
- $value .= $this->_formula{$index};
+ $value .= $this->_formula[$index];
}
++$index;
continue;
@@ -199,15 +199,15 @@ private function _parseToTokens() {
// embeds are double
// end does not mark a token
if ($inPath) {
- if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE) {
- if ((($index + 2) <= $formulaLength) && ($this->_formula{$index + 1} == PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE)) {
+ if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE) {
+ if ((($index + 2) <= $formulaLength) && ($this->_formula[$index + 1] == PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE)) {
$value .= PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE;
++$index;
} else {
$inPath = false;
}
} else {
- $value .= $this->_formula{$index};
+ $value .= $this->_formula[$index];
}
++$index;
continue;
@@ -217,10 +217,10 @@ private function _parseToTokens() {
// no embeds (changed to "()" by Excel)
// end does not mark a token
if ($inRange) {
- if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::BRACKET_CLOSE) {
+ if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::BRACKET_CLOSE) {
$inRange = false;
}
- $value .= $this->_formula{$index};
+ $value .= $this->_formula[$index];
++$index;
continue;
}
@@ -228,7 +228,7 @@ private function _parseToTokens() {
// error values
// end marks a token, determined from absolute list of values
if ($inError) {
- $value .= $this->_formula{$index};
+ $value .= $this->_formula[$index];
++$index;
if (in_array($value, $ERRORS)) {
$inError = false;
@@ -239,10 +239,10 @@ private function _parseToTokens() {
}
// scientific notation check
- if (strpos(PHPExcel_Calculation_FormulaParser::OPERATORS_SN, $this->_formula{$index}) !== false) {
+ if (strpos(PHPExcel_Calculation_FormulaParser::OPERATORS_SN, $this->_formula[$index]) !== false) {
if (strlen($value) > 1) {
- if (preg_match("/^[1-9]{1}(\.[0-9]+)?E{1}$/", $this->_formula{$index}) != 0) {
- $value .= $this->_formula{$index};
+ if (preg_match("/^[1-9]{1}(\.[0-9]+)?E{1}$/", $this->_formula[$index]) != 0) {
+ $value .= $this->_formula[$index];
++$index;
continue;
}
@@ -252,7 +252,7 @@ private function _parseToTokens() {
// independent character evaluation (order not important)
// establish state-dependent character evaluations
- if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE) {
+ if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE) {
if (strlen($value > 0)) { // unexpected
$tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_UNKNOWN);
$value = "";
@@ -262,7 +262,7 @@ private function _parseToTokens() {
continue;
}
- if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE) {
+ if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE) {
if (strlen($value) > 0) { // unexpected
$tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_UNKNOWN);
$value = "";
@@ -272,14 +272,14 @@ private function _parseToTokens() {
continue;
}
- if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::BRACKET_OPEN) {
+ if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::BRACKET_OPEN) {
$inRange = true;
$value .= PHPExcel_Calculation_FormulaParser::BRACKET_OPEN;
++$index;
continue;
}
- if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::ERROR_START) {
+ if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::ERROR_START) {
if (strlen($value) > 0) { // unexpected
$tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_UNKNOWN);
$value = "";
@@ -291,7 +291,7 @@ private function _parseToTokens() {
}
// mark start and end of arrays and array rows
- if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::BRACE_OPEN) {
+ if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::BRACE_OPEN) {
if (strlen($value) > 0) { // unexpected
$tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_UNKNOWN);
$value = "";
@@ -309,7 +309,7 @@ private function _parseToTokens() {
continue;
}
- if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::SEMICOLON) {
+ if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::SEMICOLON) {
if (strlen($value) > 0) {
$tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND);
$value = "";
@@ -331,7 +331,7 @@ private function _parseToTokens() {
continue;
}
- if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::BRACE_CLOSE) {
+ if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::BRACE_CLOSE) {
if (strlen($value) > 0) {
$tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND);
$value = "";
@@ -352,14 +352,14 @@ private function _parseToTokens() {
}
// trim white-space
- if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::WHITESPACE) {
+ if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::WHITESPACE) {
if (strlen($value) > 0) {
$tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND);
$value = "";
}
$tokens1[] = new PHPExcel_Calculation_FormulaToken("", PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_WHITESPACE);
++$index;
- while (($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::WHITESPACE) && ($index < $formulaLength)) {
+ while (($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::WHITESPACE) && ($index < $formulaLength)) {
++$index;
}
continue;
@@ -379,29 +379,29 @@ private function _parseToTokens() {
}
// standard infix operators
- if (strpos(PHPExcel_Calculation_FormulaParser::OPERATORS_INFIX, $this->_formula{$index}) !== false) {
+ if (strpos(PHPExcel_Calculation_FormulaParser::OPERATORS_INFIX, $this->_formula[$index]) !== false) {
if (strlen($value) > 0) {
$tokens1[] =new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND);
$value = "";
}
- $tokens1[] = new PHPExcel_Calculation_FormulaToken($this->_formula{$index}, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERATORINFIX);
+ $tokens1[] = new PHPExcel_Calculation_FormulaToken($this->_formula[$index], PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERATORINFIX);
++$index;
continue;
}
// standard postfix operators (only one)
- if (strpos(PHPExcel_Calculation_FormulaParser::OPERATORS_POSTFIX, $this->_formula{$index}) !== false) {
+ if (strpos(PHPExcel_Calculation_FormulaParser::OPERATORS_POSTFIX, $this->_formula[$index]) !== false) {
if (strlen($value) > 0) {
$tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND);
$value = "";
}
- $tokens1[] = new PHPExcel_Calculation_FormulaToken($this->_formula{$index}, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERATORPOSTFIX);
+ $tokens1[] = new PHPExcel_Calculation_FormulaToken($this->_formula[$index], PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERATORPOSTFIX);
++$index;
continue;
}
// start subexpression or function
- if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::PAREN_OPEN) {
+ if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::PAREN_OPEN) {
if (strlen($value) > 0) {
$tmp = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_FUNCTION, PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_START);
$tokens1[] = $tmp;
@@ -417,7 +417,7 @@ private function _parseToTokens() {
}
// function, subexpression, or array parameters, or operand unions
- if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::COMMA) {
+ if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::COMMA) {
if (strlen($value) > 0) {
$tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND);
$value = "";
@@ -438,7 +438,7 @@ private function _parseToTokens() {
}
// stop subexpression
- if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::PAREN_CLOSE) {
+ if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::PAREN_CLOSE) {
if (strlen($value) > 0) {
$tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND);
$value = "";
@@ -454,7 +454,7 @@ private function _parseToTokens() {
}
// token accumulation
- $value .= $this->_formula{$index};
+ $value .= $this->_formula[$index];
++$index;
}
diff --git a/includes/PHPExcel-1.7.5/Classes/PHPExcel/Calculation/Functions.php b/includes/PHPExcel-1.7.5/Classes/PHPExcel/Calculation/Functions.php
index d24b4ab9..30da41dd 100644
--- a/includes/PHPExcel-1.7.5/Classes/PHPExcel/Calculation/Functions.php
+++ b/includes/PHPExcel-1.7.5/Classes/PHPExcel/Calculation/Functions.php
@@ -314,7 +314,7 @@ public static function isCellValue($idx) {
public static function _ifCondition($condition) {
$condition = PHPExcel_Calculation_Functions::flattenSingleValue($condition);
- if (!in_array($condition{0},array('>', '<', '='))) {
+ if (!in_array($condition[0],array('>', '<', '='))) {
if (!is_numeric($condition)) { $condition = PHPExcel_Calculation::_wrapResult(strtoupper($condition)); }
return '='.$condition;
} else {
@@ -526,7 +526,7 @@ public static function N($value) {
break;
case 'string' :
// Errors
- if ((strlen($value) > 0) && ($value{0} == '#')) {
+ if ((strlen($value) > 0) && ($value[0] == '#')) {
return $value;
}
break;
@@ -573,10 +573,9 @@ public static function TYPE($value) {
return 4;
} elseif(is_array($value)) {
return 64;
- break;
} elseif(is_string($value)) {
// Errors
- if ((strlen($value) > 0) && ($value{0} == '#')) {
+ if ((strlen($value) > 0) && ($value[0] == '#')) {
return 16;
}
return 2;
diff --git a/includes/PHPExcel-1.7.5/Classes/PHPExcel/Calculation/TextData.php b/includes/PHPExcel-1.7.5/Classes/PHPExcel/Calculation/TextData.php
index 1d296882..e2e3f9fe 100644
--- a/includes/PHPExcel-1.7.5/Classes/PHPExcel/Calculation/TextData.php
+++ b/includes/PHPExcel-1.7.5/Classes/PHPExcel/Calculation/TextData.php
@@ -48,19 +48,19 @@ class PHPExcel_Calculation_TextData {
private static $_invalidChars = Null;
private static function _uniord($c) {
- if (ord($c{0}) >=0 && ord($c{0}) <= 127)
- return ord($c{0});
- if (ord($c{0}) >= 192 && ord($c{0}) <= 223)
- return (ord($c{0})-192)*64 + (ord($c{1})-128);
- if (ord($c{0}) >= 224 && ord($c{0}) <= 239)
- return (ord($c{0})-224)*4096 + (ord($c{1})-128)*64 + (ord($c{2})-128);
- if (ord($c{0}) >= 240 && ord($c{0}) <= 247)
- return (ord($c{0})-240)*262144 + (ord($c{1})-128)*4096 + (ord($c{2})-128)*64 + (ord($c{3})-128);
- if (ord($c{0}) >= 248 && ord($c{0}) <= 251)
- return (ord($c{0})-248)*16777216 + (ord($c{1})-128)*262144 + (ord($c{2})-128)*4096 + (ord($c{3})-128)*64 + (ord($c{4})-128);
- if (ord($c{0}) >= 252 && ord($c{0}) <= 253)
- return (ord($c{0})-252)*1073741824 + (ord($c{1})-128)*16777216 + (ord($c{2})-128)*262144 + (ord($c{3})-128)*4096 + (ord($c{4})-128)*64 + (ord($c{5})-128);
- if (ord($c{0}) >= 254 && ord($c{0}) <= 255) //error
+ if (ord($c[0]) >=0 && ord($c[0]) <= 127)
+ return ord($c[0]);
+ if (ord($c[0]) >= 192 && ord($c[0]) <= 223)
+ return (ord($c[0])-192)*64 + (ord($c[1])-128);
+ if (ord($c[0]) >= 224 && ord($c[0]) <= 239)
+ return (ord($c[0])-224)*4096 + (ord($c[1])-128)*64 + (ord($c[2])-128);
+ if (ord($c[0]) >= 240 && ord($c[0]) <= 247)
+ return (ord($c[0])-240)*262144 + (ord($c[1])-128)*4096 + (ord($c[2])-128)*64 + (ord($c[3])-128);
+ if (ord($c[0]) >= 248 && ord($c[0]) <= 251)
+ return (ord($c[0])-248)*16777216 + (ord($c[1])-128)*262144 + (ord($c[2])-128)*4096 + (ord($c[3])-128)*64 + (ord($c[4])-128);
+ if (ord($c[0]) >= 252 && ord($c[0]) <= 253)
+ return (ord($c[0])-252)*1073741824 + (ord($c[1])-128)*16777216 + (ord($c[2])-128)*262144 + (ord($c[3])-128)*4096 + (ord($c[4])-128)*64 + (ord($c[5])-128);
+ if (ord($c[0]) >= 254 && ord($c[0]) <= 255) //error
return PHPExcel_Calculation_Functions::VALUE();
return 0;
} // function _uniord()
diff --git a/includes/PHPExcel-1.7.5/Classes/PHPExcel/Cell.php b/includes/PHPExcel-1.7.5/Classes/PHPExcel/Cell.php
index a5f83ebe..d322d9de 100644
--- a/includes/PHPExcel-1.7.5/Classes/PHPExcel/Cell.php
+++ b/includes/PHPExcel-1.7.5/Classes/PHPExcel/Cell.php
@@ -653,12 +653,12 @@ public static function columnIndexFromString($pString = 'A')
if (!isset($pString{1})) {
return $_columnLookup[$pString];
} elseif(!isset($pString{2})) {
- return $_columnLookup[$pString{0}] * 26 + $_columnLookup[$pString{1}];
+ return $_columnLookup[$pString[0]] * 26 + $_columnLookup[$pString[1]];
} elseif(!isset($pString{3})) {
- return $_columnLookup[$pString{0}] * 676 + $_columnLookup[$pString{1}] * 26 + $_columnLookup[$pString{2}];
+ return $_columnLookup[$pString[0]] * 676 + $_columnLookup[$pString[1]] * 26 + $_columnLookup[$pString[2]];
}
}
- throw new Exception("Column string index can not be " . ((isset($pString{0})) ? "longer than 3 characters" : "empty") . ".");
+ throw new Exception("Column string index can not be " . ((isset($pString[0])) ? "longer than 3 characters" : "empty") . ".");
}
/**
diff --git a/includes/PHPExcel-1.7.5/Classes/PHPExcel/Cell/DefaultValueBinder.php b/includes/PHPExcel-1.7.5/Classes/PHPExcel/Cell/DefaultValueBinder.php
index 5d4ac3e3..199a34c1 100644
--- a/includes/PHPExcel-1.7.5/Classes/PHPExcel/Cell/DefaultValueBinder.php
+++ b/includes/PHPExcel-1.7.5/Classes/PHPExcel/Cell/DefaultValueBinder.php
@@ -83,7 +83,7 @@ public static function dataTypeForValue($pValue = null) {
} elseif ($pValue instanceof PHPExcel_RichText) {
return PHPExcel_Cell_DataType::TYPE_STRING;
- } elseif ($pValue{0} === '=' && strlen($pValue) > 1) {
+ } elseif ($pValue[0] === '=' && strlen($pValue) > 1) {
return PHPExcel_Cell_DataType::TYPE_FORMULA;
} elseif (is_bool($pValue)) {
diff --git a/includes/PHPExcel-1.7.5/Classes/PHPExcel/Reader/Excel2003XML.php b/includes/PHPExcel-1.7.5/Classes/PHPExcel/Reader/Excel2003XML.php
index 687a48c1..d18c8e00 100644
--- a/includes/PHPExcel-1.7.5/Classes/PHPExcel/Reader/Excel2003XML.php
+++ b/includes/PHPExcel-1.7.5/Classes/PHPExcel/Reader/Excel2003XML.php
@@ -661,12 +661,12 @@ public function loadIntoExisting($pFilename, PHPExcel $objPHPExcel)
// Empty R reference is the current row
if ($rowReference == '') $rowReference = $rowID;
// Bracketed R references are relative to the current row
- if ($rowReference{0} == '[') $rowReference = $rowID + trim($rowReference,'[]');
+ if ($rowReference[0] == '[') $rowReference = $rowID + trim($rowReference,'[]');
$columnReference = $cellReference[4][0];
// Empty C reference is the current column
if ($columnReference == '') $columnReference = $columnNumber;
// Bracketed C references are relative to the current column
- if ($columnReference{0} == '[') $columnReference = $columnNumber + trim($columnReference,'[]');
+ if ($columnReference[0] == '[') $columnReference = $columnNumber + trim($columnReference,'[]');
$A1CellReference = PHPExcel_Cell::stringFromColumnIndex($columnReference-1).$rowReference;
$value = substr_replace($value,$A1CellReference,$cellReference[0][1],strlen($cellReference[0][0]));
}
diff --git a/includes/PHPExcel-1.7.5/Classes/PHPExcel/Reader/Excel5.php b/includes/PHPExcel-1.7.5/Classes/PHPExcel/Reader/Excel5.php
index 26e2181c..b755f535 100644
--- a/includes/PHPExcel-1.7.5/Classes/PHPExcel/Reader/Excel5.php
+++ b/includes/PHPExcel-1.7.5/Classes/PHPExcel/Reader/Excel5.php
@@ -1415,7 +1415,7 @@ private function _readDateMode()
// offset: 0; size: 2; 0 = base 1900, 1 = base 1904
PHPExcel_Shared_Date::setExcelCalendar(PHPExcel_Shared_Date::CALENDAR_WINDOWS_1900);
- if (ord($recordData{0}) == 1) {
+ if (ord($recordData[0]) == 1) {
PHPExcel_Shared_Date::setExcelCalendar(PHPExcel_Shared_Date::CALENDAR_MAC_1904);
}
}
@@ -1473,7 +1473,7 @@ private function _readFont()
}
// offset: 10; size: 1; underline type
- $underlineType = ord($recordData{10});
+ $underlineType = ord($recordData[10]);
switch ($underlineType) {
case 0x00:
break; // no underline
@@ -1610,7 +1610,7 @@ private function _readXf()
// offset: 6; size: 1; Alignment and text break
// bit 2-0, mask 0x07; horizontal alignment
- $horAlign = (0x07 & ord($recordData{6})) >> 0;
+ $horAlign = (0x07 & ord($recordData[6])) >> 0;
switch ($horAlign) {
case 0:
$objStyle->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_GENERAL);
@@ -1632,7 +1632,7 @@ private function _readXf()
break;
}
// bit 3, mask 0x08; wrap text
- $wrapText = (0x08 & ord($recordData{6})) >> 3;
+ $wrapText = (0x08 & ord($recordData[6])) >> 3;
switch ($wrapText) {
case 0:
$objStyle->getAlignment()->setWrapText(false);
@@ -1642,7 +1642,7 @@ private function _readXf()
break;
}
// bit 6-4, mask 0x70; vertical alignment
- $vertAlign = (0x70 & ord($recordData{6})) >> 4;
+ $vertAlign = (0x70 & ord($recordData[6])) >> 4;
switch ($vertAlign) {
case 0:
$objStyle->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_TOP);
@@ -1660,7 +1660,7 @@ private function _readXf()
if ($this->_version == self::XLS_BIFF8) {
// offset: 7; size: 1; XF_ROTATION: Text rotation angle
- $angle = ord($recordData{7});
+ $angle = ord($recordData[7]);
$rotation = 0;
if ($angle <= 90) {
$rotation = $angle;
@@ -1673,11 +1673,11 @@ private function _readXf()
// offset: 8; size: 1; Indentation, shrink to cell size, and text direction
// bit: 3-0; mask: 0x0F; indent level
- $indent = (0x0F & ord($recordData{8})) >> 0;
+ $indent = (0x0F & ord($recordData[8])) >> 0;
$objStyle->getAlignment()->setIndent($indent);
// bit: 4; mask: 0x10; 1 = shrink content to fit into cell
- $shrinkToFit = (0x10 & ord($recordData{8})) >> 4;
+ $shrinkToFit = (0x10 & ord($recordData[8])) >> 4;
switch ($shrinkToFit) {
case 0:
$objStyle->getAlignment()->setShrinkToFit(false);
@@ -1759,7 +1759,7 @@ private function _readXf()
// BIFF5
// offset: 7; size: 1; Text orientation and flags
- $orientationAndFlags = ord($recordData{7});
+ $orientationAndFlags = ord($recordData[7]);
// bit: 1-0; mask: 0x03; XF_ORIENTATION: Text orientation
$xfOrientation = (0x03 & $orientationAndFlags) >> 0;
@@ -1882,7 +1882,7 @@ private function _readXfExt()
$xclrValue = substr($extData, 4, 4); // color value (value based on color type)
if ($xclfType == 2) {
- $rgb = sprintf('%02X%02X%02X', ord($xclrValue{0}), ord($xclrValue{1}), ord($xclrValue{2}));
+ $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2]));
// modify the relevant style property
if ( isset($this->_mapCellXfIndex[$ixfe]) ) {
@@ -1898,7 +1898,7 @@ private function _readXfExt()
$xclrValue = substr($extData, 4, 4); // color value (value based on color type)
if ($xclfType == 2) {
- $rgb = sprintf('%02X%02X%02X', ord($xclrValue{0}), ord($xclrValue{1}), ord($xclrValue{2}));
+ $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2]));
// modify the relevant style property
if ( isset($this->_mapCellXfIndex[$ixfe]) ) {
@@ -1914,7 +1914,7 @@ private function _readXfExt()
$xclrValue = substr($extData, 4, 4); // color value (value based on color type)
if ($xclfType == 2) {
- $rgb = sprintf('%02X%02X%02X', ord($xclrValue{0}), ord($xclrValue{1}), ord($xclrValue{2}));
+ $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2]));
// modify the relevant style property
if ( isset($this->_mapCellXfIndex[$ixfe]) ) {
@@ -1930,7 +1930,7 @@ private function _readXfExt()
$xclrValue = substr($extData, 4, 4); // color value (value based on color type)
if ($xclfType == 2) {
- $rgb = sprintf('%02X%02X%02X', ord($xclrValue{0}), ord($xclrValue{1}), ord($xclrValue{2}));
+ $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2]));
// modify the relevant style property
if ( isset($this->_mapCellXfIndex[$ixfe]) ) {
@@ -1946,7 +1946,7 @@ private function _readXfExt()
$xclrValue = substr($extData, 4, 4); // color value (value based on color type)
if ($xclfType == 2) {
- $rgb = sprintf('%02X%02X%02X', ord($xclrValue{0}), ord($xclrValue{1}), ord($xclrValue{2}));
+ $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2]));
// modify the relevant style property
if ( isset($this->_mapCellXfIndex[$ixfe]) ) {
@@ -1962,7 +1962,7 @@ private function _readXfExt()
$xclrValue = substr($extData, 4, 4); // color value (value based on color type)
if ($xclfType == 2) {
- $rgb = sprintf('%02X%02X%02X', ord($xclrValue{0}), ord($xclrValue{1}), ord($xclrValue{2}));
+ $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2]));
// modify the relevant style property
if ( isset($this->_mapCellXfIndex[$ixfe]) ) {
@@ -1978,7 +1978,7 @@ private function _readXfExt()
$xclrValue = substr($extData, 4, 4); // color value (value based on color type)
if ($xclfType == 2) {
- $rgb = sprintf('%02X%02X%02X', ord($xclrValue{0}), ord($xclrValue{1}), ord($xclrValue{2}));
+ $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2]));
// modify the relevant style property
if ( isset($this->_mapCellXfIndex[$ixfe]) ) {
@@ -1994,7 +1994,7 @@ private function _readXfExt()
$xclrValue = substr($extData, 4, 4); // color value (value based on color type)
if ($xclfType == 2) {
- $rgb = sprintf('%02X%02X%02X', ord($xclrValue{0}), ord($xclrValue{1}), ord($xclrValue{2}));
+ $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2]));
// modify the relevant style property
if ( isset($this->_mapCellXfIndex[$ixfe]) ) {
@@ -2035,7 +2035,7 @@ private function _readStyle()
if ($isBuiltIn) {
// offset: 2; size: 1; identifier for built-in style
- $builtInId = ord($recordData{2});
+ $builtInId = ord($recordData[2]);
switch ($builtInId) {
case 0x00:
@@ -2099,7 +2099,7 @@ private function _readSheet()
$rec_offset = self::_GetInt4d($recordData, 0);
// offset: 4; size: 1; sheet state
- switch (ord($recordData{4})) {
+ switch (ord($recordData[4])) {
case 0x00: $sheetState = PHPExcel_Worksheet::SHEETSTATE_VISIBLE; break;
case 0x01: $sheetState = PHPExcel_Worksheet::SHEETSTATE_HIDDEN; break;
case 0x02: $sheetState = PHPExcel_Worksheet::SHEETSTATE_VERYHIDDEN; break;
@@ -2107,7 +2107,7 @@ private function _readSheet()
}
// offset: 5; size: 1; sheet type
- $sheetType = ord($recordData{5});
+ $sheetType = ord($recordData[5]);
// offset: 6; size: var; sheet name
if ($this->_version == self::XLS_BIFF8) {
@@ -2282,7 +2282,7 @@ private function _readDefinedName()
// offset: 2; size: 1; keyboard shortcut
// offset: 3; size: 1; length of the name (character count)
- $nlen = ord($recordData{3});
+ $nlen = ord($recordData[3]);
// offset: 4; size: 2; size of the formula data (it can happen that this is zero)
// note: there can also be additional data, this is not included in $flen
@@ -2364,7 +2364,7 @@ private function _readSst()
$pos += 2;
// option flags
- $optionFlags = ord($recordData{$pos});
+ $optionFlags = ord($recordData[$pos]);
++$pos;
// bit: 0; mask: 0x01; 0 = compressed; 1 = uncompressed
@@ -2433,7 +2433,7 @@ private function _readSst()
// repeated option flags
// OpenOffice.org documentation 5.21
- $option = ord($recordData{$pos});
+ $option = ord($recordData[$pos]);
++$pos;
if ($isCompressed && ($option == 0)) {
@@ -2457,7 +2457,7 @@ private function _readSst()
// this fragment compressed
$len = min($charsLeft, $limitpos - $pos);
for ($j = 0; $j < $len; ++$j) {
- $retstr .= $recordData{$pos + $j} . chr(0);
+ $retstr .= $recordData[$pos + $j] . chr(0);
}
$charsLeft -= $len;
$isCompressed = false;
@@ -3330,7 +3330,7 @@ private function _readFormula()
// We can apparently not rely on $isPartOfSharedFormula. Even when $isPartOfSharedFormula = true
// the formula data may be ordinary formula data, therefore we need to check
// explicitly for the tExp token (0x01)
- $isPartOfSharedFormula = $isPartOfSharedFormula && ord($formulaStructure{2}) == 0x01;
+ $isPartOfSharedFormula = $isPartOfSharedFormula && ord($formulaStructure[2]) == 0x01;
if ($isPartOfSharedFormula) {
// part of shared formula which means there will be a formula with a tExp token and nothing else
@@ -3354,9 +3354,9 @@ private function _readFormula()
$xfIndex = self::_GetInt2d($recordData, 4);
// offset: 6; size: 8; result of the formula
- if ( (ord($recordData{6}) == 0)
- && (ord($recordData{12}) == 255)
- && (ord($recordData{13}) == 255) ) {
+ if ( (ord($recordData[6]) == 0)
+ && (ord($recordData[12]) == 255)
+ && (ord($recordData[13]) == 255) ) {
// String formula. Result follows in appended STRING record
$dataType = PHPExcel_Cell_DataType::TYPE_STRING;
@@ -3370,25 +3370,25 @@ private function _readFormula()
// read STRING record
$value = $this->_readString();
- } elseif ((ord($recordData{6}) == 1)
- && (ord($recordData{12}) == 255)
- && (ord($recordData{13}) == 255)) {
+ } elseif ((ord($recordData[6]) == 1)
+ && (ord($recordData[12]) == 255)
+ && (ord($recordData[13]) == 255)) {
// Boolean formula. Result is in +2; 0=false, 1=true
$dataType = PHPExcel_Cell_DataType::TYPE_BOOL;
- $value = (bool) ord($recordData{8});
+ $value = (bool) ord($recordData[8]);
- } elseif ((ord($recordData{6}) == 2)
- && (ord($recordData{12}) == 255)
- && (ord($recordData{13}) == 255)) {
+ } elseif ((ord($recordData[6]) == 2)
+ && (ord($recordData[12]) == 255)
+ && (ord($recordData[13]) == 255)) {
// Error formula. Error code is in +2
$dataType = PHPExcel_Cell_DataType::TYPE_ERROR;
- $value = self::_mapErrorCode(ord($recordData{8}));
+ $value = self::_mapErrorCode(ord($recordData[8]));
- } elseif ((ord($recordData{6}) == 3)
- && (ord($recordData{12}) == 255)
- && (ord($recordData{13}) == 255)) {
+ } elseif ((ord($recordData[6]) == 3)
+ && (ord($recordData[12]) == 255)
+ && (ord($recordData[13]) == 255)) {
// Formula result is a null string
$dataType = PHPExcel_Cell_DataType::TYPE_NULL;
@@ -3455,7 +3455,7 @@ private function _readSharedFmla()
// offset: 6, size: 1; not used
// offset: 7, size: 1; number of existing FORMULA records for this shared formula
- $no = ord($recordData{7});
+ $no = ord($recordData[7]);
// offset: 8, size: var; Binary token array of the shared formula
$formula = substr($recordData, 8);
@@ -3520,10 +3520,10 @@ private function _readBoolErr()
$xfIndex = self::_GetInt2d($recordData, 4);
// offset: 6; size: 1; the boolean value or error value
- $boolErr = ord($recordData{6});
+ $boolErr = ord($recordData[6]);
// offset: 7; size: 1; 0=boolean; 1=error
- $isError = ord($recordData{7});
+ $isError = ord($recordData[7]);
$cell = $this->_phpSheet->getCell($columnString . ($row + 1));
switch ($isError) {
@@ -3806,7 +3806,7 @@ private function _readSelection()
if (!$this->_readDataOnly) {
// offset: 0; size: 1; pane identifier
- $paneId = ord($recordData{0});
+ $paneId = ord($recordData[0]);
// offset: 1; size: 2; index to row of the active cell
$r = self::_GetInt2d($recordData, 1);
@@ -3953,9 +3953,9 @@ private function _readHyperLink()
$hyperlinkType = 'UNC';
} else if (!$isFileLinkOrUrl) {
$hyperlinkType = 'workbook';
- } else if (ord($recordData{$offset}) == 0x03) {
+ } else if (ord($recordData[$offset]) == 0x03) {
$hyperlinkType = 'local';
- } else if (ord($recordData{$offset}) == 0xE0) {
+ } else if (ord($recordData[$offset]) == 0xE0) {
$hyperlinkType = 'URL';
}
@@ -5485,10 +5485,10 @@ private function _readBIFF5CellRangeAddressFixed($subData)
$lr = self::_GetInt2d($subData, 2) + 1;
// offset: 4; size: 1; index to first column
- $fc = ord($subData{4});
+ $fc = ord($subData[4]);
// offset: 5; size: 1; index to last column
- $lc = ord($subData{5});
+ $lc = ord($subData[5]);
// check values
if ($fr > $lr || $fc > $lc) {
@@ -5886,13 +5886,13 @@ private static function _readBIFF8Constant($valueData)
private static function _readRGB($rgb)
{
// offset: 0; size 1; Red component
- $r = ord($rgb{0});
+ $r = ord($rgb[0]);
// offset: 1; size: 1; Green component
- $g = ord($rgb{1});
+ $g = ord($rgb[1]);
// offset: 2; size: 1; Blue component
- $b = ord($rgb{2});
+ $b = ord($rgb[2]);
// HEX notation, e.g. 'FF00FC'
$rgb = sprintf('%02X%02X%02X', $r, $g, $b);
diff --git a/includes/PHPExcel-1.7.5/Classes/PHPExcel/Reader/Excel5/Escher.php b/includes/PHPExcel-1.7.5/Classes/PHPExcel/Reader/Excel5/Escher.php
index 4dc04b3e..946fb2b6 100644
--- a/includes/PHPExcel-1.7.5/Classes/PHPExcel/Reader/Excel5/Escher.php
+++ b/includes/PHPExcel-1.7.5/Classes/PHPExcel/Reader/Excel5/Escher.php
@@ -250,16 +250,16 @@ private function _readBSE()
$foDelay = PHPExcel_Reader_Excel5::_GetInt4d($recordData, 28);
// offset: 32; size: 1; unused1
- $unused1 = ord($recordData{32});
+ $unused1 = ord($recordData[32]);
// offset: 33; size: 1; size of nameData in bytes (including null terminator)
- $cbName = ord($recordData{33});
+ $cbName = ord($recordData[33]);
// offset: 34; size: 1; unused2
- $unused2 = ord($recordData{34});
+ $unused2 = ord($recordData[34]);
// offset: 35; size: 1; unused3
- $unused3 = ord($recordData{35});
+ $unused3 = ord($recordData[35]);
// offset: 36; size: $cbName; nameData
$nameData = substr($recordData, 36, $cbName);
@@ -301,7 +301,7 @@ private function _readBlipJPEG()
}
// offset: var; size: 1; tag
- $tag = ord($recordData{$pos});
+ $tag = ord($recordData[$pos]);
$pos += 1;
// offset: var; size: var; the raw image data
@@ -342,7 +342,7 @@ private function _readBlipPNG()
}
// offset: var; size: 1; tag
- $tag = ord($recordData{$pos});
+ $tag = ord($recordData[$pos]);
$pos += 1;
// offset: var; size: var; the raw image data
diff --git a/includes/PHPExcel-1.7.5/Classes/PHPExcel/Reader/SYLK.php b/includes/PHPExcel-1.7.5/Classes/PHPExcel/Reader/SYLK.php
index 3c758c7d..64944a71 100644
--- a/includes/PHPExcel-1.7.5/Classes/PHPExcel/Reader/SYLK.php
+++ b/includes/PHPExcel-1.7.5/Classes/PHPExcel/Reader/SYLK.php
@@ -224,7 +224,7 @@ public function loadIntoExisting($pFilename, PHPExcel $objPHPExcel)
if ($dataType == 'P') {
$formatArray = array();
foreach($rowData as $rowDatum) {
- switch($rowDatum{0}) {
+ switch($rowDatum[0]) {
case 'P' : $formatArray['numberformat']['code'] = str_replace($fromFormats,$toFormats,substr($rowDatum,1));
break;
case 'E' :
@@ -234,7 +234,7 @@ public function loadIntoExisting($pFilename, PHPExcel $objPHPExcel)
break;
case 'S' : $styleSettings = substr($rowDatum,1);
for ($i=0;$i= PHPExcel_Cell::columnIndexFromString($beforeColumn));
- $updateRow = (($newRow{0} != '$') && ($beforeRow{0} != '$') &&
+ $updateRow = (($newRow[0] != '$') && ($beforeRow[0] != '$') &&
$newRow >= $beforeRow);
// Create new column reference
diff --git a/includes/PHPExcel-1.7.5/Classes/PHPExcel/Shared/OLE.php b/includes/PHPExcel-1.7.5/Classes/PHPExcel/Shared/OLE.php
index 70233001..c3f6b06e 100644
--- a/includes/PHPExcel-1.7.5/Classes/PHPExcel/Shared/OLE.php
+++ b/includes/PHPExcel-1.7.5/Classes/PHPExcel/Shared/OLE.php
@@ -447,7 +447,7 @@ public static function Asc2Ucs($ascii)
{
$rawname = '';
for ($i = 0; $i < strlen($ascii); ++$i) {
- $rawname .= $ascii{$i} . "\x00";
+ $rawname .= $ascii[$i] . "\x00";
}
return $rawname;
}
diff --git a/includes/PHPExcel-1.7.5/Classes/PHPExcel/Shared/PDF/barcodes.php b/includes/PHPExcel-1.7.5/Classes/PHPExcel/Shared/PDF/barcodes.php
index 4efb7a47..7078f1df 100644
--- a/includes/PHPExcel-1.7.5/Classes/PHPExcel/Shared/PDF/barcodes.php
+++ b/includes/PHPExcel-1.7.5/Classes/PHPExcel/Shared/PDF/barcodes.php
@@ -292,7 +292,7 @@ protected function barcode_code39($code, $extended=false, $checksum=false) {
$k = 0;
$clen = strlen($code);
for ($i = 0; $i < $clen; ++$i) {
- $char = $code{$i};
+ $char = $code[$i];
if(!isset($chr[$char])) {
// invalid character
return false;
@@ -303,7 +303,7 @@ protected function barcode_code39($code, $extended=false, $checksum=false) {
} else {
$t = false; // space
}
- $w = $chr[$char]{$j};
+ $w = $chr[$char][$j];
$bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);
$bararray['maxw'] += $w;
++$k;
@@ -358,10 +358,10 @@ protected function encode_code39_ext($code) {
$code_ext = '';
$clen = strlen($code);
for ($i = 0 ; $i < $clen; ++$i) {
- if (ord($code{$i}) > 127) {
+ if (ord($code[$i]) > 127) {
return false;
}
- $code_ext .= $encode[$code{$i}];
+ $code_ext .= $encode[$code[$i]];
}
return $code_ext;
}
@@ -381,7 +381,7 @@ protected function checksum_code39($code) {
$sum = 0;
$clen = strlen($code);
for ($i = 0 ; $i < $clen; ++$i) {
- $k = array_keys($chars, $code{$i});
+ $k = array_keys($chars, $code[$i]);
$sum += $k[0];
}
$j = ($sum % 43);
@@ -482,10 +482,10 @@ protected function barcode_code93($code) {
$code_ext = '';
$clen = strlen($code);
for ($i = 0 ; $i < $clen; ++$i) {
- if (ord($code{$i}) > 127) {
+ if (ord($code[$i]) > 127) {
return false;
}
- $code_ext .= $encode[$code{$i}];
+ $code_ext .= $encode[$code[$i]];
}
// checksum
$code .= $this->checksum_code93($code);
@@ -495,7 +495,7 @@ protected function barcode_code93($code) {
$k = 0;
$clen = strlen($code);
for ($i = 0; $i < $clen; ++$i) {
- $char = $code{$i};
+ $char = $code[$i];
if(!isset($chr[$char])) {
// invalid character
return false;
@@ -506,7 +506,7 @@ protected function barcode_code93($code) {
} else {
$t = false; // space
}
- $w = $chr[$char]{$j};
+ $w = $chr[$char][$j];
$bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);
$bararray['maxw'] += $w;
++$k;
@@ -537,7 +537,7 @@ protected function checksum_code93($code) {
$p = 1;
$check = 0;
for ($i = ($len - 1); $i >= 0; --$i) {
- $k = array_keys($chars, $code{$i});
+ $k = array_keys($chars, $code[$i]);
$check += ($k[0] * $p);
++$p;
if ($p > 20) {
@@ -551,7 +551,7 @@ protected function checksum_code93($code) {
$p = 1;
$check = 0;
for ($i = $len; $i >= 0; --$i) {
- $k = array_keys($chars, $code{$i});
+ $k = array_keys($chars, $code[$i]);
$check += ($k[0] * $p);
++$p;
if ($p > 15) {
@@ -573,11 +573,11 @@ protected function checksum_s25($code) {
$len = strlen($code);
$sum = 0;
for ($i = 0; $i < $len; $i+=2) {
- $sum += $code{$i};
+ $sum += $code[$i];
}
$sum *= 3;
for ($i = 1; $i < $len; $i+=2) {
- $sum += ($code{$i});
+ $sum += ($code[$i]);
}
$r = $sum % 10;
if($r > 0) {
@@ -618,7 +618,7 @@ protected function barcode_msi($code, $checksum=false) {
$p = 2;
$check = 0;
for ($i = ($clen - 1); $i >= 0; --$i) {
- $check += (hexdec($code{$i}) * $p);
+ $check += (hexdec($code[$i]) * $p);
++$p;
if ($p > 7) {
$p = 2;
@@ -633,7 +633,7 @@ protected function barcode_msi($code, $checksum=false) {
$seq = '110'; // left guard
$clen = strlen($code);
for ($i = 0; $i < $clen; ++$i) {
- $digit = $code{$i};
+ $digit = $code[$i];
if (!isset($chr[$digit])) {
// invalid character
return false;
@@ -676,7 +676,7 @@ protected function barcode_s25($code, $checksum=false) {
$seq = '11011010';
$clen = strlen($code);
for ($i = 0; $i < $clen; ++$i) {
- $digit = $code{$i};
+ $digit = $code[$i];
if (!isset($chr[$digit])) {
// invalid character
return false;
@@ -701,8 +701,8 @@ protected function binseq_to_array($seq, $bararray) {
$k = 0;
for ($i = 0; $i < $len; ++$i) {
$w += 1;
- if (($i == ($len - 1)) OR (($i < ($len - 1)) AND ($seq{$i} != $seq{($i+1)}))) {
- if ($seq{$i} == '1') {
+ if (($i == ($len - 1)) OR (($i < ($len - 1)) AND ($seq[$i] != $seq[($i+1)]))) {
+ if ($seq[$i] == '1') {
$t = true; // bar
} else {
$t = false; // space
@@ -753,8 +753,8 @@ protected function barcode_i25($code, $checksum=false) {
$k = 0;
$clen = strlen($code);
for ($i = 0; $i < $clen; $i = ($i + 2)) {
- $char_bar = $code{$i};
- $char_space = $code{$i+1};
+ $char_bar = $code[$i];
+ $char_space = $code[$i+1];
if((!isset($chr[$char_bar])) OR (!isset($chr[$char_space]))) {
// invalid character
return false;
@@ -763,7 +763,7 @@ protected function barcode_i25($code, $checksum=false) {
$seq = '';
$chrlen = strlen($chr[$char_bar]);
for ($s = 0; $s < $chrlen; $s++){
- $seq .= $chr[$char_bar]{$s} . $chr[$char_space]{$s};
+ $seq .= $chr[$char_bar][$s] . $chr[$char_space][$s];
}
$seqlen = strlen($seq);
for ($j = 0; $j < $seqlen; ++$j) {
@@ -772,7 +772,7 @@ protected function barcode_i25($code, $checksum=false) {
} else {
$t = false; // space
}
- $w = $seq{$j};
+ $w = $seq[$j];
$bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);
$bararray['maxw'] += $w;
++$k;
@@ -928,7 +928,7 @@ protected function barcode_c128($code, $type='B') {
$new_code = '';
$hclen = (strlen($code) / 2);
for ($i = 0; $i < $hclen; ++$i) {
- $new_code .= chr(intval($code{(2 * $i)}.$code{(2 * $i + 1)}));
+ $new_code .= chr(intval($code[(2 * $i)].$code[(2 * $i + 1)]));
}
$code = $new_code;
break;
@@ -941,7 +941,7 @@ protected function barcode_c128($code, $type='B') {
$sum = $startid;
$clen = strlen($code);
for ($i = 0; $i < $clen; ++$i) {
- $sum += (strpos($keys, $code{$i}) * ($i+1));
+ $sum += (strpos($keys, $code[$i]) * ($i+1));
}
$check = ($sum % 103);
// add start, check and stop codes
@@ -950,9 +950,9 @@ protected function barcode_c128($code, $type='B') {
$k = 0;
$len = strlen($code);
for ($i = 0; $i < $len; ++$i) {
- $ck = strpos($keys, $code{$i});
+ $ck = strpos($keys, $code[$i]);
if (($i == 0) OR ($i > ($len-4))) {
- $char_num = ord($code{$i});
+ $char_num = ord($code[$i]);
$seq = $chr[$char_num];
} elseif(($ck >= 0) AND isset($chr[$ck])) {
$seq = $chr[$ck];
@@ -966,7 +966,7 @@ protected function barcode_c128($code, $type='B') {
} else {
$t = false; // space
}
- $w = $seq{$j};
+ $w = $seq[$j];
$bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);
$bararray['maxw'] += $w;
++$k;
@@ -998,14 +998,14 @@ protected function barcode_eanupc($code, $len=13) {
// calculate check digit
$sum_a = 0;
for ($i = 1; $i < $data_len; $i+=2) {
- $sum_a += $code{$i};
+ $sum_a += $code[$i];
}
if ($len > 12) {
$sum_a *= 3;
}
$sum_b = 0;
for ($i = 0; $i < $data_len; $i+=2) {
- $sum_b += ($code{$i});
+ $sum_b += ($code[$i]);
}
if ($len < 13) {
$sum_b *= 3;
@@ -1017,7 +1017,7 @@ protected function barcode_eanupc($code, $len=13) {
if ($code_len == $data_len) {
// add check digit
$code .= $r;
- } elseif ($r !== intval($code{$data_len})) {
+ } elseif ($r !== intval($code[$data_len])) {
// wrong checkdigit
return false;
}
@@ -1126,9 +1126,9 @@ protected function barcode_eanupc($code, $len=13) {
$seq = '101'; // left guard bar
if ($upce) {
$bararray = array('code' => $upce_code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array());
- $p = $upce_parities[$code{1}][$r];
+ $p = $upce_parities[$code[1]][$r];
for ($i = 0; $i < 6; ++$i) {
- $seq .= $codes[$p[$i]][$upce_code{$i}];
+ $seq .= $codes[$p[$i]][$upce_code[$i]];
}
$seq .= '010101'; // right guard bar
} else {
@@ -1136,17 +1136,17 @@ protected function barcode_eanupc($code, $len=13) {
$half_len = ceil($len / 2);
if ($len == 8) {
for ($i = 0; $i < $half_len; ++$i) {
- $seq .= $codes['A'][$code{$i}];
+ $seq .= $codes['A'][$code[$i]];
}
} else {
- $p = $parities[$code{0}];
+ $p = $parities[$code[0]];
for ($i = 1; $i < $half_len; ++$i) {
- $seq .= $codes[$p[$i-1]][$code{$i}];
+ $seq .= $codes[$p[$i-1]][$code[$i]];
}
}
$seq .= '01010'; // center guard bar
for ($i = $half_len; $i < $len; ++$i) {
- $seq .= $codes['C'][$code{$i}];
+ $seq .= $codes['C'][$code[$i]];
}
$seq .= '101'; // right guard bar
}
@@ -1154,8 +1154,8 @@ protected function barcode_eanupc($code, $len=13) {
$w = 0;
for ($i = 0; $i < $clen; ++$i) {
$w += 1;
- if (($i == ($clen - 1)) OR (($i < ($clen - 1)) AND ($seq{$i} != $seq{($i+1)}))) {
- if ($seq{$i} == '1') {
+ if (($i == ($clen - 1)) OR (($i < ($clen - 1)) AND ($seq[$i] != $seq[($i+1)]))) {
+ if ($seq[$i] == '1') {
$t = true; // bar
} else {
$t = false; // space
@@ -1185,7 +1185,7 @@ protected function barcode_eanext($code, $len=5) {
if ($len == 2) {
$r = $code % 4;
} elseif ($len == 5) {
- $r = (3 * ($code{0} + $code{2} + $code{4})) + (9 * ($code{1} + $code{3}));
+ $r = (3 * ($code[0]+ $code[2] + $code[4])) + (9 * ($code[1] + $code[3]));
$r %= 10;
} else {
return false;
@@ -1236,10 +1236,10 @@ protected function barcode_eanext($code, $len=5) {
);
$p = $parities[$len][$r];
$seq = '1011'; // left guard bar
- $seq .= $codes[$p[0]][$code{0}];
+ $seq .= $codes[$p[0]][$code[0]];
for ($i = 1; $i < $len; ++$i) {
$seq .= '01'; // separator
- $seq .= $codes[$p[$i]][$code{$i}];
+ $seq .= $codes[$p[$i]][$code[$i]];
}
$bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array());
return $this->binseq_to_array($seq, $bararray);
@@ -1290,7 +1290,7 @@ protected function barcode_postnet($code, $planet=false) {
// calculate checksum
$sum = 0;
for ($i = 0; $i < $len; ++$i) {
- $sum += intval($code{$i});
+ $sum += intval($code[$i]);
}
$chkd = ($sum % 10);
if($chkd > 0) {
@@ -1304,7 +1304,7 @@ protected function barcode_postnet($code, $planet=false) {
$bararray['maxw'] += 2;
for ($i = 0; $i < $len; ++$i) {
for ($j = 0; $j < 5; ++$j) {
- $h = $barlen[$code{$i}][$j];
+ $h = $barlen[$code[$i]][$j];
$p = floor(1 / $h);
$bararray['bcode'][$k++] = array('t' => 1, 'w' => 1, 'h' => $h, 'p' => $p);
$bararray['bcode'][$k++] = array('t' => 0, 'w' => 1, 'h' => 2, 'p' => 0);
@@ -1417,8 +1417,8 @@ protected function barcode_rms4cc($code, $kix=false) {
$row = 0;
$col = 0;
for ($i = 0; $i < $len; ++$i) {
- $row += $checktable[$code{$i}][0];
- $col += $checktable[$code{$i}][1];
+ $row += $checktable[$code[$i]][0];
+ $col += $checktable[$code[$i]][1];
}
$row %= 6;
$col %= 6;
@@ -1435,7 +1435,7 @@ protected function barcode_rms4cc($code, $kix=false) {
}
for ($i = 0; $i < $len; ++$i) {
for ($j = 0; $j < 4; ++$j) {
- switch ($barmode[$code{$i}][$j]) {
+ switch ($barmode[$code[$i]][$j]) {
case 1: {
$p = 0;
$h = 2;
@@ -1507,17 +1507,17 @@ protected function barcode_codabar($code) {
$code = 'A'.strtoupper($code).'A';
$len = strlen($code);
for ($i = 0; $i < $len; ++$i) {
- if (!isset($chr[$code{$i}])) {
+ if (!isset($chr[$code[$i]])) {
return false;
}
- $seq = $chr[$code{$i}];
+ $seq = $chr[$code[$i]];
for ($j = 0; $j < 8; ++$j) {
if (($j % 2) == 0) {
$t = true; // bar
} else {
$t = false; // space
}
- $w = $seq{$j};
+ $w = $seq[$j];
$bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);
$bararray['maxw'] += $w;
++$k;
@@ -1558,7 +1558,7 @@ protected function barcode_code11($code) {
$p = 1;
$check = 0;
for ($i = ($len - 1); $i >= 0; --$i) {
- $digit = $code{$i};
+ $digit = $code[$i];
if ($digit == '-') {
$dval = 10;
} else {
@@ -1580,7 +1580,7 @@ protected function barcode_code11($code) {
$p = 1;
$check = 0;
for ($i = $len; $i >= 0; --$i) {
- $digit = $code{$i};
+ $digit = $code[$i];
if ($digit == '-') {
$dval = 10;
} else {
@@ -1599,17 +1599,17 @@ protected function barcode_code11($code) {
$code = 'S'.$code.'S';
$len += 3;
for ($i = 0; $i < $len; ++$i) {
- if (!isset($chr[$code{$i}])) {
+ if (!isset($chr[$code[$i]])) {
return false;
}
- $seq = $chr[$code{$i}];
+ $seq = $chr[$code[$i]];
for ($j = 0; $j < 6; ++$j) {
if (($j % 2) == 0) {
$t = true; // bar
} else {
$t = false; // space
}
- $w = $seq{$j};
+ $w = $seq[$j];
$bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);
$bararray['maxw'] += $w;
++$k;
@@ -1678,7 +1678,7 @@ protected function barcode_pharmacode2t($code) {
$bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 2, 'bcode' => array());
$len = strlen($seq);
for ($i = 0; $i < $len; ++$i) {
- switch ($seq{$i}) {
+ switch ($seq[$i]) {
case '1': {
$p = 1;
$h = 1;
@@ -1750,9 +1750,9 @@ protected function barcode_imb($code) {
}
}
$binary_code = bcmul($binary_code, 10);
- $binary_code = bcadd($binary_code, $tracking_number{0});
+ $binary_code = bcadd($binary_code, $tracking_number[0]);
$binary_code = bcmul($binary_code, 5);
- $binary_code = bcadd($binary_code, $tracking_number{1});
+ $binary_code = bcadd($binary_code, $tracking_number[1]);
$binary_code .= substr($tracking_number, 2, 18);
// convert to hexadecimal
$binary_code = $this->dec_to_hex($binary_code);
@@ -1867,7 +1867,7 @@ public function hex_to_dec($hex) {
$bitval = 1;
$len = strlen($hex);
for($pos = ($len - 1); $pos >= 0; --$pos) {
- $dec = bcadd($dec, bcmul(hexdec($hex{$pos}), $bitval));
+ $dec = bcadd($dec, bcmul(hexdec($hex[$pos]), $bitval));
$bitval = bcmul($bitval, 16);
}
return $dec;
diff --git a/includes/PHPExcel-1.7.5/Classes/PHPExcel/Shared/PDF/fonts/utils/makefont.php b/includes/PHPExcel-1.7.5/Classes/PHPExcel/Shared/PDF/fonts/utils/makefont.php
index 608ec040..3c5ab4fb 100644
--- a/includes/PHPExcel-1.7.5/Classes/PHPExcel/Shared/PDF/fonts/utils/makefont.php
+++ b/includes/PHPExcel-1.7.5/Classes/PHPExcel/Shared/PDF/fonts/utils/makefont.php
@@ -7,7 +7,7 @@
// License : GNU LGPL (http://www.gnu.org/copyleft/lesser.html)
// ----------------------------------------------------------------------------
// Copyright (C) 2008-2010 Nicola Asuni - Tecnick.com S.r.l.
-//
+//
// This file is part of TCPDF software library.
//
// TCPDF is free software: you can redistribute it and/or modify it
@@ -50,7 +50,7 @@
*/
/**
- *
+ *
* @param string $fontfile path to font file (TTF, OTF or PFB).
* @param string $fmfile font metrics file (UFM or AFM).
* @param boolean $embedded Set to false to not embed the font, true otherwise (default).
@@ -146,7 +146,7 @@ function MakeFont($fontfile, $fmfile, $embedded=true, $enc='cp1252', $patch=arra
fclose($f);
if ($type == 'Type1') {
//Find first two sections and discard third one
- $header = (ord($file{0}) == 128);
+ $header = (ord($file[0]) == 128);
if ($header) {
//Strip first binary header
$file = substr($file, 6);
@@ -156,7 +156,7 @@ function MakeFont($fontfile, $fmfile, $embedded=true, $enc='cp1252', $patch=arra
die('Error: font file does not seem to be valid Type1');
}
$size1 = $pos + 6;
- if ($header AND (ord($file{$size1}) == 128)) {
+ if ($header AND (ord($file[$size1]) == 128)) {
//Strip second binary header
$file = substr($file, 0, $size1).substr($file, $size1+6);
}
@@ -219,7 +219,7 @@ function ReadMap($enc) {
}
$cc2gn = array();
foreach ($a as $l) {
- if ($l{0} == '!') {
+ if ($l[0] == '!') {
$e = preg_split('/[ \\t]+/',rtrim($l));
$cc = hexdec(substr($e[0],1));
$gn = $e[2];
@@ -268,8 +268,8 @@ function ReadUFM($file, &$cidtogidmap) {
}
// Set GID
if (($cc >= 0) AND ($cc < 0xFFFF) AND $glyph) {
- $cidtogidmap{($cc * 2)} = chr($glyph >> 8);
- $cidtogidmap{(($cc * 2) + 1)} = chr($glyph & 0xFF);
+ $cidtogidmap[($cc * 2)] = chr($glyph >> 8);
+ $cidtogidmap[(($cc * 2) + 1)] = chr($glyph & 0xFF);
}
}
if((isset($gn) AND ($gn == '.notdef')) AND (!isset($fm['MissingWidth']))) {
@@ -611,5 +611,5 @@ function CheckTTF($file) {
}
//============================================================+
-// END OF FILE
+// END OF FILE
//============================================================+
diff --git a/includes/PHPExcel-1.7.5/Classes/PHPExcel/Shared/PDF/pdf417.php b/includes/PHPExcel-1.7.5/Classes/PHPExcel/Shared/PDF/pdf417.php
index d31163b9..7599af94 100644
--- a/includes/PHPExcel-1.7.5/Classes/PHPExcel/Shared/PDF/pdf417.php
+++ b/includes/PHPExcel-1.7.5/Classes/PHPExcel/Shared/PDF/pdf417.php
@@ -889,7 +889,7 @@ protected function getCompaction($mode, $code, $addmode=true) {
$txtarr = array(); // array of characters and sub-mode switching characters
$codelen = strlen($code);
for ($i = 0; $i < $codelen; ++$i) {
- $chval = ord($code{$i});
+ $chval = ord($code[$i]);
if (($k = array_search($chval, $this->textsubmodes[$submode])) !== false) {
// we are on the same sub-mode
$txtarr[] = $k;
@@ -899,7 +899,7 @@ protected function getCompaction($mode, $code, $addmode=true) {
// search new sub-mode
if (($s != $submode) AND (($k = array_search($chval, $this->textsubmodes[$s])) !== false)) {
// $s is the new submode
- if (((($i + 1) == $codelen) OR ((($i + 1) < $codelen) AND (array_search(ord($code{($i + 1)}), $this->textsubmodes[$submode]) !== false))) AND (($s == 3) OR (($s == 0) AND ($submode == 1)))) {
+ if (((($i + 1) == $codelen) OR ((($i + 1) < $codelen) AND (array_search(ord($code[($i + 1)]), $this->textsubmodes[$submode]) !== false))) AND (($s == 3) OR (($s == 0) AND ($submode == 1)))) {
// shift (temporary change only for this char)
if ($s == 3) {
// shift to puntuaction
@@ -945,12 +945,12 @@ protected function getCompaction($mode, $code, $addmode=true) {
$sublen = strlen($code);
}
if ($sublen == 6) {
- $t = bcmul(''.ord($code{0}), '1099511627776');
- $t = bcadd($t, bcmul(''.ord($code{1}), '4294967296'));
- $t = bcadd($t, bcmul(''.ord($code{2}), '16777216'));
- $t = bcadd($t, bcmul(''.ord($code{3}), '65536'));
- $t = bcadd($t, bcmul(''.ord($code{4}), '256'));
- $t = bcadd($t, ''.ord($code{5}));
+ $t = bcmul(''.ord($code[0]), '1099511627776');
+ $t = bcadd($t, bcmul(''.ord($code[1]), '4294967296'));
+ $t = bcadd($t, bcmul(''.ord($code[2]), '16777216'));
+ $t = bcadd($t, bcmul(''.ord($code[3]), '65536'));
+ $t = bcadd($t, bcmul(''.ord($code[4]), '256'));
+ $t = bcadd($t, ''.ord($code[5]));
do {
$d = bcmod($t, '900');
$t = bcdiv($t, '900');
@@ -958,7 +958,7 @@ protected function getCompaction($mode, $code, $addmode=true) {
} while ($t != '0');
} else {
for ($i = 0; $i < $sublen; ++$i) {
- $cw[] = ord($code{$i});
+ $cw[] = ord($code[$i]);
}
}
$code = $rest;
diff --git a/includes/PHPExcel-1.7.5/Classes/PHPExcel/Shared/PDF/tcpdf.php b/includes/PHPExcel-1.7.5/Classes/PHPExcel/Shared/PDF/tcpdf.php
index 65852f23..0fdec3db 100644
--- a/includes/PHPExcel-1.7.5/Classes/PHPExcel/Shared/PDF/tcpdf.php
+++ b/includes/PHPExcel-1.7.5/Classes/PHPExcel/Shared/PDF/tcpdf.php
@@ -73,7 +73,7 @@
// dullus for text Justification.
// Bob Vincent (pillarsdotnet@users.sourceforge.net) for value attribute.
// Patrick Benny for text stretch suggestion on Cell().
-// Johannes Güntert for JavaScript support.
+// Johannes G�ntert for JavaScript support.
// Denis Van Nuffelen for Dynamic Form.
// Jacek Czekaj for multibyte justification
// Anthony Ferrara for the reintroduction of legacy image methods.
@@ -84,7 +84,7 @@
// Mohamad Ali Golkar, Saleh AlMatrafe, Charles Abbott for Arabic and Persian support.
// Moritz Wagner and Andreas Wurmser for graphic functions.
// Andrew Whitehead for core fonts support.
-// Esteban Joël Marín for OpenType font conversion.
+// Esteban Jo�l Mar�n for OpenType font conversion.
// Teus Hagen for several suggestions and fixes.
// Yukihiro Nakadaira for CID-0 CJK fonts fixes.
// Kosmas Papachristos for some CSS improvements.
@@ -2872,7 +2872,7 @@ public function setPageOrientation($orientation, $autopagebreak='', $bottommargi
if (empty($orientation)) {
$orientation = $default_orientation;
} else {
- $orientation = strtoupper($orientation{0});
+ $orientation = strtoupper($orientation[0]);
}
if (in_array($orientation, $valid_orientations) AND ($orientation != $default_orientation)) {
$this->CurOrientation = $orientation;
@@ -3324,7 +3324,7 @@ protected function adjustCellPadding($brd=0) {
$slen = strlen($brd);
$newbrd = array();
for ($i = 0; $i < $slen; ++$i) {
- $newbrd[$brd{$i}] = true;
+ $newbrd[$brd[$i]] = true;
}
$brd = $newbrd;
} elseif (($brd === 1) OR ($brd === true) OR (is_numeric($brd) AND (intval($brd) > 0))) {
@@ -5757,7 +5757,7 @@ protected function getCellBorder($x, $y, $w, $h, $brd) {
$slen = strlen($brd);
$newbrd = array();
for ($i = 0; $i < $slen; ++$i) {
- $newbrd[$brd{$i}] = array('cap' => 'square', 'join' => 'miter');
+ $newbrd[$brd[$i]] = array('cap' => 'square', 'join' => 'miter');
}
$brd = $newbrd;
}
@@ -6260,7 +6260,7 @@ protected function getBorderMode($brd, $position='start') {
$slen = strlen($brd);
$newbrd = array();
for ($i = 0; $i < $slen; ++$i) {
- $newbrd[$brd{$i}] = array('cap' => 'square', 'join' => 'miter');
+ $newbrd[$brd[$i]] = array('cap' => 'square', 'join' => 'miter');
}
$brd = $newbrd;
}
@@ -6322,7 +6322,7 @@ protected function getBorderMode($brd, $position='start') {
* @param float $cellpadding Internal cell padding, if empty uses default cell padding.
* @param mixed $border Indicates if borders must be drawn around the cell. The value can be a number:- 0: no border (default)
- 1: frame
or a string containing some or all of the following characters (in any order):- L: left
- T: top
- R: right
- B: bottom
or an array of line styles for each border group - for example: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)))
* @return float Return the minimal height needed for multicell method for printing the $txt param.
- * @author Alexander Escalona Fernández, Nicola Asuni
+ * @author Alexander Escalona Fern�ndez, Nicola Asuni
* @access public
* @since 4.5.011
*/
@@ -6426,7 +6426,7 @@ public function getNumLines($txt, $w=0, $reseth=false, $autopadding=true, $cellp
* @param float $cellpadding Internal cell padding, if empty uses default cell padding.
* @param mixed $border Indicates if borders must be drawn around the cell. The value can be a number:- 0: no border (default)
- 1: frame
or a string containing some or all of the following characters (in any order):- L: left
- T: top
- R: right
- B: bottom
or an array of line styles for each border group - for example: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)))
* @return float Return the minimal height needed for multicell method for printing the $txt param.
- * @author Nicola Asuni, Alexander Escalona Fernández
+ * @author Nicola Asuni, Alexander Escalona Fern�ndez
* @access public
*/
public function getStringHeight($w, $txt, $reseth=false, $autopadding=true, $cellpadding='', $border=0) {
@@ -7343,7 +7343,7 @@ public function Image($file, $x='', $y='', $w=0, $h=0, $type='', $link='', $alig
public function set_mqr($mqr) {
if(!defined('PHP_VERSION_ID')) {
$version = PHP_VERSION;
- define('PHP_VERSION_ID', (($version{0} * 10000) + ($version{2} * 100) + $version{4}));
+ define('PHP_VERSION_ID', (($version[0] * 10000) + ($version[2] * 100) + $version[4]));
}
if (PHP_VERSION_ID < 50300) {
@set_magic_quotes_runtime($mqr);
@@ -7358,7 +7358,7 @@ public function set_mqr($mqr) {
public function get_mqr() {
if(!defined('PHP_VERSION_ID')) {
$version = PHP_VERSION;
- define('PHP_VERSION_ID', (($version{0} * 10000) + ($version{2} * 100) + $version{4}));
+ define('PHP_VERSION_ID', (($version[0] * 10000) + ($version[2] * 100) + $version[4]));
}
if (PHP_VERSION_ID < 50300) {
return @get_magic_quotes_runtime();
@@ -7834,7 +7834,7 @@ public function Output($name='doc.pdf', $dest='I') {
$dest = $dest ? 'D' : 'F';
}
$dest = strtoupper($dest);
- if ($dest{0} != 'F') {
+ if ($dest[0] != 'F') {
$name = preg_replace('/[\s]+/', '_', $name);
$name = preg_replace('/[^a-zA-Z0-9_\.-]/', '', $name);
}
@@ -9520,12 +9520,12 @@ protected function _putfonts() {
$font = file_get_contents($fontfile);
$compressed = (substr($file, -2) == '.z');
if ((!$compressed) AND (isset($info['length2']))) {
- $header = (ord($font{0}) == 128);
+ $header = (ord($font[0]) == 128);
if ($header) {
//Strip first binary header
$font = substr($font, 6);
}
- if ($header AND (ord($font{$info['length1']}) == 128)) {
+ if ($header AND (ord($font[$info['length1']]) == 128)) {
//Strip second binary header
$font = substr($font, 0, $info['length1']).substr($font, ($info['length1'] + 6));
}
@@ -10990,7 +10990,7 @@ protected function UTF8StringToArray($str) {
$strarr = array();
$strlen = strlen($str);
for ($i=0; $i < $strlen; ++$i) {
- $strarr[] = ord($str{$i});
+ $strarr[] = ord($str[$i]);
}
// insert new value on cache
$this->cache_UTF8StringToArray[$strkey]['s'] = $strarr;
@@ -11004,7 +11004,7 @@ protected function UTF8StringToArray($str) {
$str .= ''; // force $str to be a string
$length = strlen($str);
for ($i = 0; $i < $length; ++$i) {
- $char = ord($str{$i}); // get one string character at time
+ $char = ord($str[$i]); // get one string character at time
if (count($bytes) == 0) { // get starting octect
if ($char <= 0x7F) {
$unichar = $char; // use the character "as is" because is ASCII
@@ -11286,7 +11286,7 @@ public function getPDFData() {
* @access public
*/
public function addHtmlLink($url, $name, $fill=false, $firstline=false, $color='', $style=-1, $firstblock=false) {
- if (!$this->empty_string($url) AND ($url{0} == '#')) {
+ if (!$this->empty_string($url) AND ($url[0] == '#')) {
// convert url to internal link
$lnkdata = explode(',', $url);
if (isset($lnkdata[0])) {
@@ -11645,7 +11645,7 @@ protected function _RC4($key, $text) {
$j = 0;
for ($i = 0; $i < 256; ++$i) {
$t = $rc4[$i];
- $j = ($j + $t + ord($k{$i})) % 256;
+ $j = ($j + $t + ord($k[$i])) % 256;
$rc4[$i] = $rc4[$j];
$rc4[$j] = $t;
}
@@ -11665,7 +11665,7 @@ protected function _RC4($key, $text) {
$rc4[$a] = $rc4[$b];
$rc4[$b] = $t;
$k = $rc4[($rc4[$a] + $rc4[$b]) % 256];
- $out .= chr(ord($text{$i}) ^ $k);
+ $out .= chr(ord($text[$i]) ^ $k);
}
return $out;
}
@@ -11719,7 +11719,7 @@ protected function _Uvalue() {
for ($i = 1; $i <= 19; ++$i) {
$ek = '';
for ($j = 0; $j < $len; ++$j) {
- $ek .= chr(ord($this->encryptdata['key']{$j}) ^ $i);
+ $ek .= chr(ord($this->encryptdata['key'][$j]) ^ $i);
}
$enc = $this->_RC4($ek, $enc);
}
@@ -11770,7 +11770,7 @@ protected function _Ovalue() {
for ($i = 1; $i <= 19; ++$i) {
$ek = '';
for ($j = 0; $j < $len; ++$j) {
- $ek .= chr(ord($owner_key{$j}) ^ $i);
+ $ek .= chr(ord($owner_key[$j]) ^ $i);
}
$enc = $this->_RC4($ek, $enc);
}
@@ -12084,7 +12084,7 @@ protected function convertHexStringToString($bs) {
++$bslenght;
}
for ($i = 0; $i < $bslenght; $i += 2) {
- $string .= chr(hexdec($bs{$i}.$bs{($i + 1)}));
+ $string .= chr(hexdec($bs[$i].$bs[($i + 1)]));
}
return $string;
}
@@ -12597,7 +12597,7 @@ protected function _outRect($x, $y, $w, $h, $op) {
}
/**
- * Append a cubic Bézier curve to the current path. The curve shall extend from the current point to the point (x3, y3), using (x1, y1) and (x2, y2) as the Bézier control points.
+ * Append a cubic B�zier curve to the current path. The curve shall extend from the current point to the point (x3, y3), using (x1, y1) and (x2, y2) as the B�zier control points.
* The new current point shall be (x3, y3).
* @param float $x1 Abscissa of control point 1.
* @param float $y1 Ordinate of control point 1.
@@ -12613,7 +12613,7 @@ protected function _outCurve($x1, $y1, $x2, $y2, $x3, $y3) {
}
/**
- * Append a cubic Bézier curve to the current path. The curve shall extend from the current point to the point (x3, y3), using the current point and (x2, y2) as the Bézier control points.
+ * Append a cubic B�zier curve to the current path. The curve shall extend from the current point to the point (x3, y3), using the current point and (x2, y2) as the B�zier control points.
* The new current point shall be (x3, y3).
* @param float $x2 Abscissa of control point 2.
* @param float $y2 Ordinate of control point 2.
@@ -12627,7 +12627,7 @@ protected function _outCurveV($x2, $y2, $x3, $y3) {
}
/**
- * Append a cubic Bézier curve to the current path. The curve shall extend from the current point to the point (x3, y3), using (x1, y1) and (x3, y3) as the Bézier control points.
+ * Append a cubic B�zier curve to the current path. The curve shall extend from the current point to the point (x3, y3), using (x1, y1) and (x3, y3) as the B�zier control points.
* The new current point shall be (x3, y3).
* @param float $x1 Abscissa of control point 1.
* @param float $y1 Ordinate of control point 1.
@@ -14021,7 +14021,7 @@ protected function _putbookmarks() {
* Adds a javascript
* @param string $script Javascript code
* @access public
- * @author Johannes Güntert, Nicola Asuni
+ * @author Johannes G�ntert, Nicola Asuni
* @since 2.1.002 (2008-02-12)
*/
public function IncludeJS($script) {
@@ -14046,7 +14046,7 @@ public function addJavascriptObject($script, $onload=false) {
/**
* Create a javascript PDF string.
* @access protected
- * @author Johannes Güntert, Nicola Asuni
+ * @author Johannes G�ntert, Nicola Asuni
* @since 2.1.002 (2008-02-12)
*/
protected function _putjavascript() {
@@ -15784,7 +15784,7 @@ public function registrationMark($x, $y, $r, $double=false, $cola=array(0,0,0),
* @param array $col1 first color (Grayscale, RGB or CMYK components).
* @param array $col2 second color (Grayscale, RGB or CMYK components).
* @param array $coords array of the form (x1, y1, x2, y2) which defines the gradient vector (see linear_gradient_coords.jpg). The default value is from left to right (x1=0, y1=0, x2=1, y2=0).
- * @author Andreas Würmser, Nicola Asuni
+ * @author Andreas W�rmser, Nicola Asuni
* @since 3.1.000 (2008-06-09)
* @access public
*/
@@ -15802,7 +15802,7 @@ public function LinearGradient($x, $y, $w, $h, $col1=array(), $col2=array(), $co
* @param array $col1 first color (Grayscale, RGB or CMYK components).
* @param array $col2 second color (Grayscale, RGB or CMYK components).
* @param array $coords array of the form (fx, fy, cx, cy, r) where (fx, fy) is the starting point of the gradient with color1, (cx, cy) is the center of the circle with color2, and r is the radius of the circle (see radial_gradient_coords.jpg). (fx, fy) should be inside the circle, otherwise some areas will not be defined.
- * @author Andreas Würmser, Nicola Asuni
+ * @author Andreas W�rmser, Nicola Asuni
* @since 3.1.000 (2008-06-09)
* @access public
*/
@@ -15825,7 +15825,7 @@ public function RadialGradient($x, $y, $w, $h, $col1=array(), $col2=array(), $co
* @param array $coords_min minimum value used by the coordinates. If a coordinate's value is smaller than this it will be cut to coords_min. default: 0
* @param array $coords_max maximum value used by the coordinates. If a coordinate's value is greater than this it will be cut to coords_max. default: 1
* @param boolean $antialias A flag indicating whether to filter the shading function to prevent aliasing artifacts.
- * @author Andreas Würmser, Nicola Asuni
+ * @author Andreas W�rmser, Nicola Asuni
* @since 3.1.000 (2008-06-09)
* @access public
*/
@@ -15910,7 +15910,7 @@ public function CoonsPatchMesh($x, $y, $w, $h, $col1=array(), $col2=array(), $co
* @param float $y ordinate of the top left corner of the rectangle.
* @param float $w width of the rectangle.
* @param float $h height of the rectangle.
- * @author Andreas Würmser, Nicola Asuni
+ * @author Andreas W�rmser, Nicola Asuni
* @since 3.1.000 (2008-06-09)
* @access protected
*/
@@ -16410,7 +16410,7 @@ public function ImageEps($file, $x='', $y='', $w=0, $h=0, $link='', $useBounding
$cnt = count($lines);
for ($i=0; $i < $cnt; ++$i) {
$line = $lines[$i];
- if (($line == '') OR ($line{0} == '%')) {
+ if (($line == '') OR ($line[0] == '%')) {
continue;
}
$len = strlen($line);
@@ -16460,7 +16460,7 @@ public function ImageEps($file, $x='', $y='', $w=0, $h=0, $link='', $useBounding
case 'V':
case 'L':
case 'C': {
- $line{$len-1} = strtolower($cmd);
+ $line[$len-1] = strtolower($cmd);
$this->_out($line);
break;
}
@@ -17279,19 +17279,19 @@ protected function extractCSSproperties($cssdata) {
// remove empty blocks
$cssdata = preg_replace('/([^\}\{]+)\{\}/', '', $cssdata);
// replace media type parenthesis
- $cssdata = preg_replace('/@media[\s]+([^\{]*)\{/i', '@media \\1§', $cssdata);
- $cssdata = preg_replace('/\}\}/si', '}§', $cssdata);
+ $cssdata = preg_replace('/@media[\s]+([^\{]*)\{/i', '@media \\1�', $cssdata);
+ $cssdata = preg_replace('/\}\}/si', '}�', $cssdata);
// trim string
$cssdata = trim($cssdata);
// find media blocks (all, braille, embossed, handheld, print, projection, screen, speech, tty, tv)
$cssblocks = array();
$matches = array();
- if (preg_match_all('/@media[\s]+([^\§]*)§([^§]*)§/i', $cssdata, $matches) > 0) {
+ if (preg_match_all('/@media[\s]+([^\�]*)�([^�]*)�/i', $cssdata, $matches) > 0) {
foreach ($matches[1] as $key => $type) {
$cssblocks[$type] = $matches[2][$key];
}
// remove media blocks
- $cssdata = preg_replace('/@media[\s]+([^\§]*)§([^§]*)§/i', '', $cssdata);
+ $cssdata = preg_replace('/@media[\s]+([^\�]*)�([^�]*)�/i', '', $cssdata);
}
// keep 'all' and 'print' media, other media types are discarded
if (isset($cssblocks['all']) AND !empty($cssblocks['all'])) {
@@ -17383,7 +17383,7 @@ protected function isValidCSSSelectorForTag($dom, $key, $selector) {
$attrib = strtolower(trim($attrib[0]));
if (!empty($attrib)) {
// check if matches class, id, attribute, pseudo-class or pseudo-element
- switch ($attrib{0}) {
+ switch ($attrib[0]) {
case '.': { // class
if (in_array(substr($attrib, 1), $class)) {
$valid = true;
@@ -17450,7 +17450,7 @@ protected function isValidCSSSelectorForTag($dom, $key, $selector) {
break;
}
case ':': { // pseudo-class or pseudo-element
- if ($attrib{1} == ':') { // pseudo-element
+ if ($attrib[1] == ':') { // pseudo-element
// pseudo-elements are not supported!
// (::first-line, ::first-letter, ::before, ::after)
} else { // pseudo-class
@@ -18039,7 +18039,7 @@ protected function getHtmlDomArray($html) {
$tagname = strtolower($tag[1]);
// check if we are inside a table header
if ($tagname == 'thead') {
- if ($element{0} == '/') {
+ if ($element[0] == '/') {
$thead = false;
} else {
$thead = true;
@@ -18054,7 +18054,7 @@ protected function getHtmlDomArray($html) {
} else {
$dom[$key]['block'] = false;
}
- if ($element{0} == '/') {
+ if ($element[0] == '/') {
// *** closing html tag
$dom[$key]['opening'] = false;
$dom[$key]['parent'] = end($level);
@@ -18269,10 +18269,10 @@ protected function getHtmlDomArray($html) {
}
}
// font style
- if (isset($dom[$key]['style']['font-weight']) AND (strtolower($dom[$key]['style']['font-weight']{0}) == 'b')) {
+ if (isset($dom[$key]['style']['font-weight']) AND (strtolower($dom[$key]['style']['font-weight'][0]) == 'b')) {
$dom[$key]['fontstyle'] .= 'B';
}
- if (isset($dom[$key]['style']['font-style']) AND (strtolower($dom[$key]['style']['font-style']{0}) == 'i')) {
+ if (isset($dom[$key]['style']['font-style']) AND (strtolower($dom[$key]['style']['font-style'][0]) == 'i')) {
$dom[$key]['fontstyle'] .= 'I';
}
// font color
@@ -18291,13 +18291,13 @@ protected function getHtmlDomArray($html) {
foreach ($decors as $dec) {
$dec = trim($dec);
if (!$this->empty_string($dec)) {
- if ($dec{0} == 'u') {
+ if ($dec[0] == 'u') {
// underline
$dom[$key]['fontstyle'] .= 'U';
- } elseif ($dec{0} == 'l') {
+ } elseif ($dec[0] == 'l') {
// line-trough
$dom[$key]['fontstyle'] .= 'D';
- } elseif ($dec{0} == 'o') {
+ } elseif ($dec[0] == 'o') {
// overline
$dom[$key]['fontstyle'] .= 'O';
}
@@ -18316,7 +18316,7 @@ protected function getHtmlDomArray($html) {
}
// check for text alignment
if (isset($dom[$key]['style']['text-align'])) {
- $dom[$key]['align'] = strtoupper($dom[$key]['style']['text-align']{0});
+ $dom[$key]['align'] = strtoupper($dom[$key]['style']['text-align'][0]);
}
// check for CSS border properties
if (isset($dom[$key]['style']['border'])) {
@@ -18473,9 +18473,9 @@ protected function getHtmlDomArray($html) {
// font size
if (isset($dom[$key]['attribute']['size'])) {
if ($key > 0) {
- if ($dom[$key]['attribute']['size']{0} == '+') {
+ if ($dom[$key]['attribute']['size'][0] == '+') {
$dom[$key]['fontsize'] = $dom[($dom[$key]['parent'])]['fontsize'] + intval(substr($dom[$key]['attribute']['size'], 1));
- } elseif ($dom[$key]['attribute']['size']{0} == '-') {
+ } elseif ($dom[$key]['attribute']['size'][0] == '-') {
$dom[$key]['fontsize'] = $dom[($dom[$key]['parent'])]['fontsize'] - intval(substr($dom[$key]['attribute']['size'], 1));
} else {
$dom[$key]['fontsize'] = intval($dom[$key]['attribute']['size']);
@@ -18517,10 +18517,10 @@ protected function getHtmlDomArray($html) {
if (($dom[$key]['value'] == 'pre') OR ($dom[$key]['value'] == 'tt')) {
$dom[$key]['fontname'] = $this->default_monospaced_font;
}
- if (($dom[$key]['value']{0} == 'h') AND (intval($dom[$key]['value']{1}) > 0) AND (intval($dom[$key]['value']{1}) < 7)) {
+ if (($dom[$key]['value'][0] == 'h') AND (intval($dom[$key]['value'][1]) > 0) AND (intval($dom[$key]['value'][1]) < 7)) {
// headings h1, h2, h3, h4, h5, h6
if (!isset($dom[$key]['attribute']['size']) AND !isset($dom[$key]['style']['font-size'])) {
- $headsize = (4 - intval($dom[$key]['value']{1})) * 2;
+ $headsize = (4 - intval($dom[$key]['value'][1])) * 2;
$dom[$key]['fontsize'] = $dom[0]['fontsize'] + $headsize;
}
if (!isset($dom[$key]['style']['font-weight'])) {
@@ -18582,7 +18582,7 @@ protected function getHtmlDomArray($html) {
}
// check for text alignment
if (isset($dom[$key]['attribute']['align']) AND (!$this->empty_string($dom[$key]['attribute']['align'])) AND ($dom[$key]['value'] !== 'img')) {
- $dom[$key]['align'] = strtoupper($dom[$key]['attribute']['align']{0});
+ $dom[$key]['align'] = strtoupper($dom[$key]['attribute']['align'][0]);
}
// check for text rendering mode (the following attributes do not exist in HTML)
if (isset($dom[$key]['attribute']['stroke'])) {
@@ -19235,7 +19235,7 @@ public function writeHTML($html, $ln=true, $fill=false, $reseth=false, $cell=fal
if (($stroffset !== false) AND ($stroffset <= $strpiece[2][1])) {
// set offset to the end of string section
$offset = strpos($pmid, ')]', $stroffset);
- while (($offset !== false) AND ($pmid{($offset - 1)} == '\\')) {
+ while (($offset !== false) AND ($pmid[($offset - 1)] == '\\')) {
$offset = strpos($pmid, ')]', ($offset + 1));
}
if ($offset === false) {
@@ -20286,7 +20286,7 @@ protected function openHTMLTagHandler(&$dom, $key, $cell) {
$imglink = '';
if (isset($this->HREF['url']) AND !$this->empty_string($this->HREF['url'])) {
$imglink = $this->HREF['url'];
- if ($imglink{0} == '#') {
+ if ($imglink[0] == '#') {
// convert url to internal link
$lnkdata = explode(',', $imglink);
if (isset($lnkdata[0])) {
@@ -24908,7 +24908,7 @@ protected function SVGPath($d, $style='') {
}
break;
}
- case 'Q': { // quadratic Bézier curveto
+ case 'Q': { // quadratic B�zier curveto
foreach ($params as $ck => $cp) {
$params[$ck] = $cp;
if ((($ck + 1) % 4) == 0) {
@@ -24934,7 +24934,7 @@ protected function SVGPath($d, $style='') {
}
break;
}
- case 'T': { // shorthand/smooth quadratic Bézier curveto
+ case 'T': { // shorthand/smooth quadratic B�zier curveto
foreach ($params as $ck => $cp) {
$params[$ck] = $cp;
if (($ck % 2) != 0) {
@@ -25457,11 +25457,11 @@ protected function startSVGElementHandler($parser, $name, $attribs, $ctm=array()
$this->SVGTransform($tm);
$obstyle = $this->setSVGStyles($svgstyle, $prev_svgstyle, $x, $y, $w, $h);
// fix image path
- if (!$this->empty_string($this->svgdir) AND (($img{0} == '.') OR (basename($img) == $img))) {
+ if (!$this->empty_string($this->svgdir) AND (($img[0] == '.') OR (basename($img) == $img))) {
// replace relative path with full server path
$img = $this->svgdir.'/'.$img;
}
- if (($img{0} == '/') AND ($_SERVER['DOCUMENT_ROOT'] != '/')) {
+ if (($img[0] == '/') AND ($_SERVER['DOCUMENT_ROOT'] != '/')) {
$findroot = strpos($img, $_SERVER['DOCUMENT_ROOT']);
if (($findroot === false) OR ($findroot > 1)) {
// replace relative path with full server path
diff --git a/includes/PHPExcel-1.7.5/Classes/PHPExcel/Shared/String.php b/includes/PHPExcel-1.7.5/Classes/PHPExcel/Shared/String.php
index 7036a7b5..6a5eb80b 100644
--- a/includes/PHPExcel-1.7.5/Classes/PHPExcel/Shared/String.php
+++ b/includes/PHPExcel-1.7.5/Classes/PHPExcel/Shared/String.php
@@ -510,15 +510,15 @@ public static function ConvertEncoding($value, $to, $from)
*/
public static function utf16_decode( $str, $bom_be=true ) {
if( strlen($str) < 2 ) return $str;
- $c0 = ord($str{0});
- $c1 = ord($str{1});
+ $c0 = ord($str[0]);
+ $c1 = ord($str[1]);
if( $c0 == 0xfe && $c1 == 0xff ) { $str = substr($str,2); }
elseif( $c0 == 0xff && $c1 == 0xfe ) { $str = substr($str,2); $bom_be = false; }
$len = strlen($str);
$newstr = '';
for($i=0;$i<$len;$i+=2) {
- if( $bom_be ) { $val = ord($str{$i}) << 4; $val += ord($str{$i+1}); }
- else { $val = ord($str{$i+1}) << 4; $val += ord($str{$i}); }
+ if( $bom_be ) { $val = ord($str[$i]) << 4; $val += ord($str[$i+1]); }
+ else { $val = ord($str[$i+1]) << 4; $val += ord($str[$i]); }
$newstr .= ($val == 0x228) ? "\n" : chr($val);
}
return $newstr;
diff --git a/includes/PHPExcel-1.7.5/Classes/PHPExcel/Shared/ZipStreamWrapper.php b/includes/PHPExcel-1.7.5/Classes/PHPExcel/Shared/ZipStreamWrapper.php
index 1425f97d..a00e52dc 100644
--- a/includes/PHPExcel-1.7.5/Classes/PHPExcel/Shared/ZipStreamWrapper.php
+++ b/includes/PHPExcel-1.7.5/Classes/PHPExcel/Shared/ZipStreamWrapper.php
@@ -75,7 +75,7 @@ public static function register() {
*/
public function stream_open($path, $mode, $options, &$opened_path) {
// Check for mode
- if ($mode{0} != 'r') {
+ if ($mode[0] != 'r') {
throw new Exception('Mode ' . $mode . ' is not supported. Only read mode is supported.');
}
diff --git a/includes/PHPExcel-1.7.5/Classes/PHPExcel/Writer/Excel5/Parser.php b/includes/PHPExcel-1.7.5/Classes/PHPExcel/Writer/Excel5/Parser.php
index 058b383b..32465db2 100644
--- a/includes/PHPExcel-1.7.5/Classes/PHPExcel/Writer/Excel5/Parser.php
+++ b/includes/PHPExcel-1.7.5/Classes/PHPExcel/Writer/Excel5/Parser.php
@@ -1055,7 +1055,7 @@ function _cellToRowcol($cell)
$col = 0;
$col_ref_length = strlen($col_ref);
for ($i = 0; $i < $col_ref_length; ++$i) {
- $col += (ord($col_ref{$i}) - 64) * pow(26, $expn);
+ $col += (ord($col_ref[$i]) - 64) * pow(26, $expn);
--$expn;
}
@@ -1077,20 +1077,20 @@ function _advance()
$formula_length = strlen($this->_formula);
// eat up white spaces
if ($i < $formula_length) {
- while ($this->_formula{$i} == " ") {
+ while ($this->_formula[$i] == " ") {
++$i;
}
if ($i < ($formula_length - 1)) {
- $this->_lookahead = $this->_formula{$i+1};
+ $this->_lookahead = $this->_formula[$i+1];
}
$token = '';
}
while ($i < $formula_length) {
- $token .= $this->_formula{$i};
+ $token .= $this->_formula[$i];
if ($i < ($formula_length - 1)) {
- $this->_lookahead = $this->_formula{$i+1};
+ $this->_lookahead = $this->_formula[$i+1];
} else {
$this->_lookahead = '';
}
@@ -1105,7 +1105,7 @@ function _advance()
}
if ($i < ($formula_length - 2)) {
- $this->_lookahead = $this->_formula{$i+2};
+ $this->_lookahead = $this->_formula[$i+2];
} else { // if we run out of characters _lookahead becomes empty
$this->_lookahead = '';
}
@@ -1233,7 +1233,7 @@ function parse($formula)
{
$this->_current_char = 0;
$this->_formula = $formula;
- $this->_lookahead = isset($formula{1}) ? $formula{1} : '';
+ $this->_lookahead = isset($formula[1]) ? $formula[1] : '';
$this->_advance();
$this->_parse_tree = $this->_condition();
return true;
diff --git a/includes/PHPExcel-1.7.5/Classes/PHPExcel/Writer/Excel5/Workbook.php b/includes/PHPExcel-1.7.5/Classes/PHPExcel/Writer/Excel5/Workbook.php
index 859ff885..4b4af4c3 100644
--- a/includes/PHPExcel-1.7.5/Classes/PHPExcel/Writer/Excel5/Workbook.php
+++ b/includes/PHPExcel-1.7.5/Classes/PHPExcel/Writer/Excel5/Workbook.php
@@ -693,7 +693,7 @@ private function _writeAllDefinedNamesBiff8()
$formulaData = $this->_parser->toReversePolish();
// make sure tRef3d is of type tRef3dR (0x3A)
- if (isset($formulaData{0}) and ($formulaData{0} == "\x7A" or $formulaData{0} == "\x5A")) {
+ if (isset($formulaData[0]) and ($formulaData[0] == "\x7A" or $formulaData[0] == "\x5A")) {
$formulaData = "\x3A" . substr($formulaData, 1);
}
diff --git a/includes/PHPExcel-1.7.5/Classes/PHPExcel/Writer/Excel5/Worksheet.php b/includes/PHPExcel-1.7.5/Classes/PHPExcel/Writer/Excel5/Worksheet.php
index c02bb437..fbe4fb80 100644
--- a/includes/PHPExcel-1.7.5/Classes/PHPExcel/Writer/Excel5/Worksheet.php
+++ b/includes/PHPExcel-1.7.5/Classes/PHPExcel/Writer/Excel5/Worksheet.php
@@ -847,7 +847,7 @@ private function _writeFormula($row, $col, $formula, $xfIndex, $calculatedValue)
$unknown = 0x0000; // Must be zero
// Strip the '=' or '@' sign at the beginning of the formula string
- if ($formula{0} == '=') {
+ if ($formula[0] == '=') {
$formula = substr($formula,1);
} else {
// Error handling
diff --git a/includes/PHPExcel-1.8.1/Classes/PHPExcel/Calculation.php b/includes/PHPExcel-1.8.1/Classes/PHPExcel/Calculation.php
index 48fb4a42..cb9aa7cd 100644
--- a/includes/PHPExcel-1.8.1/Classes/PHPExcel/Calculation.php
+++ b/includes/PHPExcel-1.8.1/Classes/PHPExcel/Calculation.php
@@ -2186,7 +2186,7 @@ public static function _wrapResult($value) {
*/
public static function _unwrapResult($value) {
if (is_string($value)) {
- if ((isset($value{0})) && ($value{0} == '"') && (substr($value,-1) == '"')) {
+ if ((isset($value[0])) && ($value[0] == '"') && (substr($value,-1) == '"')) {
return substr($value,1,-1);
}
// Convert numeric errors to NaN error
@@ -2302,7 +2302,7 @@ public function parseFormula($formula) {
// Basic validation that this is indeed a formula
// We return an empty array if not
$formula = trim($formula);
- if ((!isset($formula{0})) || ($formula{0} != '=')) return array();
+ if ((!isset($formula[0])) || ($formula[0] != '=')) return array();
$formula = ltrim(substr($formula,1));
if (!isset($formula{0})) return array();
@@ -2378,7 +2378,7 @@ public function _calculateFormulaValue($formula, $cellID=null, PHPExcel_Cell $pC
// Basic validation that this is indeed a formula
// We simply return the cell value if not
$formula = trim($formula);
- if ($formula{0} != '=') return self::_wrapResult($formula);
+ if ($formula[0] != '=') return self::_wrapResult($formula);
$formula = ltrim(substr($formula, 1));
if (!isset($formula{0})) return self::_wrapResult($formula);
@@ -2390,7 +2390,7 @@ public function _calculateFormulaValue($formula, $cellID=null, PHPExcel_Cell $pC
return $cellValue;
}
- if (($wsTitle{0} !== "\x00") && ($this->_cyclicReferenceStack->onStack($wsCellReference))) {
+ if (($wsTitle[0] !== "\x00") && ($this->_cyclicReferenceStack->onStack($wsCellReference))) {
if ($this->cyclicFormulaCount <= 0) {
$this->_cyclicFormulaCell = '';
return $this->_raiseFormulaError('Cyclic Reference in Formula');
@@ -2638,7 +2638,7 @@ private function _showTypeDetails($value) {
} else {
if ($value == '') {
return 'an empty string';
- } elseif ($value{0} == '#') {
+ } elseif ($value[0] == '#') {
return 'a '.$value.' error';
} else {
$typeString = 'a string';
@@ -2767,10 +2767,10 @@ private function _parseFormula($formula, PHPExcel_Cell $pCell = NULL) {
// Loop through the formula extracting each operator and operand in turn
while(TRUE) {
//echo 'Assessing Expression '.substr($formula, $index),PHP_EOL;
- $opCharacter = $formula{$index}; // Get the first character of the value at the current index position
+ $opCharacter = $formula[$index]; // Get the first character of the value at the current index position
//echo 'Initial character of expression block is '.$opCharacter,PHP_EOL;
- if ((isset(self::$_comparisonOperators[$opCharacter])) && (strlen($formula) > $index) && (isset(self::$_comparisonOperators[$formula{$index+1}]))) {
- $opCharacter .= $formula{++$index};
+ if ((isset(self::$_comparisonOperators[$opCharacter])) && (strlen($formula) > $index) && (isset(self::$_comparisonOperators[$formula[$index+1]]))) {
+ $opCharacter .= $formula[++$index];
//echo 'Initial character of expression block is comparison operator '.$opCharacter.PHP_EOL;
}
@@ -3045,11 +3045,11 @@ private function _parseFormula($formula, PHPExcel_Cell $pCell = NULL) {
}
}
// Ignore white space
- while (($formula{$index} == "\n") || ($formula{$index} == "\r")) {
+ while (($formula[$index] == "\n") || ($formula[$index] == "\r")) {
++$index;
}
- if ($formula{$index} == ' ') {
- while ($formula{$index} == ' ') {
+ if ($formula[$index] == ' ') {
+ while ($formula[$index] == ' ') {
++$index;
}
// If we're expecting an operator, but only have a space between the previous and next operands (and both are
@@ -3465,7 +3465,7 @@ private function _processTokenStack($tokens, $cellID = NULL, PHPExcel_Cell $pCel
// echo 'Token is a PHPExcel constant: '.$excelConstant.'
';
$stack->push('Constant Value',self::$_ExcelConstants[$excelConstant]);
$this->_debugLog->writeDebugLog('Evaluating Constant ', $excelConstant, ' as ', $this->_showTypeDetails(self::$_ExcelConstants[$excelConstant]));
- } elseif ((is_numeric($token)) || ($token === NULL) || (is_bool($token)) || ($token == '') || ($token{0} == '"') || ($token{0} == '#')) {
+ } elseif ((is_numeric($token)) || ($token === NULL) || (is_bool($token)) || ($token == '') || ($token[0] == '"') || ($token[0] == '#')) {
// echo 'Token is a number, boolean, string, null or an Excel error
';
$stack->push('Value',$token);
// if the token is a named range, push the named range name onto the stack
@@ -3507,11 +3507,11 @@ private function _validateBinaryOperand($cellID, &$operand, &$stack) {
if (is_string($operand)) {
// We only need special validations for the operand if it is a string
// Start by stripping off the quotation marks we use to identify true excel string values internally
- if ($operand > '' && $operand{0} == '"') { $operand = self::_unwrapResult($operand); }
+ if ($operand > '' && $operand[0] == '"') { $operand = self::_unwrapResult($operand); }
// If the string is a numeric value, we treat it as a numeric, so no further testing
if (!is_numeric($operand)) {
// If not a numeric, test to see if the value is an Excel error, and so can't be used in normal binary operations
- if ($operand > '' && $operand{0} == '#') {
+ if ($operand > '' && $operand[0] == '#') {
$stack->push('Value', $operand);
$this->_debugLog->writeDebugLog('Evaluation Result is ', $this->_showTypeDetails($operand));
return FALSE;
@@ -3564,8 +3564,8 @@ private function _executeBinaryComparisonOperation($cellID, $operand1, $operand2
}
// Simple validate the two operands if they are string values
- if (is_string($operand1) && $operand1 > '' && $operand1{0} == '"') { $operand1 = self::_unwrapResult($operand1); }
- if (is_string($operand2) && $operand2 > '' && $operand2{0} == '"') { $operand2 = self::_unwrapResult($operand2); }
+ if (is_string($operand1) && $operand1 > '' && $operand1[0] == '"') { $operand1 = self::_unwrapResult($operand1); }
+ if (is_string($operand2) && $operand2 > '' && $operand2[0] == '"') { $operand2 = self::_unwrapResult($operand2); }
// Use case insensitive comparaison if not OpenOffice mode
if (PHPExcel_Calculation_Functions::getCompatibilityMode() != PHPExcel_Calculation_Functions::COMPATIBILITY_OPENOFFICE)
@@ -3682,7 +3682,7 @@ private function _executeNumericBinaryOperation($cellID,$operand1,$operand2,$ope
}
} else {
if ((PHPExcel_Calculation_Functions::getCompatibilityMode() != PHPExcel_Calculation_Functions::COMPATIBILITY_OPENOFFICE) &&
- ((is_string($operand1) && !is_numeric($operand1) && strlen($operand1)>0) ||
+ ((is_string($operand1) && !is_numeric($operand1) && strlen($operand1)>0) ||
(is_string($operand2) && !is_numeric($operand2) && strlen($operand2)>0))) {
$result = PHPExcel_Calculation_Functions::VALUE();
} else {
diff --git a/includes/PHPExcel-1.8.1/Classes/PHPExcel/Calculation/Engineering.php b/includes/PHPExcel-1.8.1/Classes/PHPExcel/Calculation/Engineering.php
index b60163e5..ad80c151 100644
--- a/includes/PHPExcel-1.8.1/Classes/PHPExcel/Calculation/Engineering.php
+++ b/includes/PHPExcel-1.8.1/Classes/PHPExcel/Calculation/Engineering.php
@@ -708,7 +708,7 @@ public static function _parseComplex($complexNumber) {
// Split the input into its Real and Imaginary components
$leadingSign = 0;
if (strlen($workString) > 0) {
- $leadingSign = (($workString{0} == '+') || ($workString{0} == '-')) ? 1 : 0;
+ $leadingSign = (($workString[0] == '+') || ($workString[0] == '-')) ? 1 : 0;
}
$power = '';
$realNumber = strtok($workString, '+-');
@@ -747,10 +747,10 @@ public static function _parseComplex($complexNumber) {
* @return string The "cleaned" complex number
*/
private static function _cleanComplex($complexNumber) {
- if ($complexNumber{0} == '+') $complexNumber = substr($complexNumber,1);
- if ($complexNumber{0} == '0') $complexNumber = substr($complexNumber,1);
- if ($complexNumber{0} == '.') $complexNumber = '0'.$complexNumber;
- if ($complexNumber{0} == '+') $complexNumber = substr($complexNumber,1);
+ if ($complexNumber[0] == '+') $complexNumber = substr($complexNumber,1);
+ if ($complexNumber[0] == '0') $complexNumber = substr($complexNumber,1);
+ if ($complexNumber[0] == '.') $complexNumber = '0'.$complexNumber;
+ if ($complexNumber[0] == '+') $complexNumber = substr($complexNumber,1);
return $complexNumber;
}
diff --git a/includes/PHPExcel-1.8.1/Classes/PHPExcel/Calculation/FormulaParser.php b/includes/PHPExcel-1.8.1/Classes/PHPExcel/Calculation/FormulaParser.php
index 3884fd20..edf86950 100644
--- a/includes/PHPExcel-1.8.1/Classes/PHPExcel/Calculation/FormulaParser.php
+++ b/includes/PHPExcel-1.8.1/Classes/PHPExcel/Calculation/FormulaParser.php
@@ -159,7 +159,7 @@ private function _parseToTokens() {
// Check if the formula has a valid starting =
$formulaLength = strlen($this->_formula);
- if ($formulaLength < 2 || $this->_formula{0} != '=') return;
+ if ($formulaLength < 2 || $this->_formula[0] != '=') return;
// Helper variables
$tokens1 = $tokens2 = $stack = array();
@@ -179,8 +179,8 @@ private function _parseToTokens() {
// embeds are doubled
// end marks token
if ($inString) {
- if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE) {
- if ((($index + 2) <= $formulaLength) && ($this->_formula{$index + 1} == PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE)) {
+ if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE) {
+ if ((($index + 2) <= $formulaLength) && ($this->_formula[$index + 1] == PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE)) {
$value .= PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE;
++$index;
} else {
@@ -189,7 +189,7 @@ private function _parseToTokens() {
$value = "";
}
} else {
- $value .= $this->_formula{$index};
+ $value .= $this->_formula[$index];
}
++$index;
continue;
@@ -199,15 +199,15 @@ private function _parseToTokens() {
// embeds are double
// end does not mark a token
if ($inPath) {
- if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE) {
- if ((($index + 2) <= $formulaLength) && ($this->_formula{$index + 1} == PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE)) {
+ if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE) {
+ if ((($index + 2) <= $formulaLength) && ($this->_formula[$index + 1] == PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE)) {
$value .= PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE;
++$index;
} else {
$inPath = false;
}
} else {
- $value .= $this->_formula{$index};
+ $value .= $this->_formula[$index];
}
++$index;
continue;
@@ -217,10 +217,10 @@ private function _parseToTokens() {
// no embeds (changed to "()" by Excel)
// end does not mark a token
if ($inRange) {
- if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::BRACKET_CLOSE) {
+ if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::BRACKET_CLOSE) {
$inRange = false;
}
- $value .= $this->_formula{$index};
+ $value .= $this->_formula[$index];
++$index;
continue;
}
@@ -228,7 +228,7 @@ private function _parseToTokens() {
// error values
// end marks a token, determined from absolute list of values
if ($inError) {
- $value .= $this->_formula{$index};
+ $value .= $this->_formula[$index];
++$index;
if (in_array($value, $ERRORS)) {
$inError = false;
@@ -239,10 +239,10 @@ private function _parseToTokens() {
}
// scientific notation check
- if (strpos(PHPExcel_Calculation_FormulaParser::OPERATORS_SN, $this->_formula{$index}) !== false) {
+ if (strpos(PHPExcel_Calculation_FormulaParser::OPERATORS_SN, $this->_formula[$index]) !== false) {
if (strlen($value) > 1) {
- if (preg_match("/^[1-9]{1}(\.[0-9]+)?E{1}$/", $this->_formula{$index}) != 0) {
- $value .= $this->_formula{$index};
+ if (preg_match("/^[1-9]{1}(\.[0-9]+)?E{1}$/", $this->_formula[$index]) != 0) {
+ $value .= $this->_formula[$index];
++$index;
continue;
}
@@ -252,7 +252,7 @@ private function _parseToTokens() {
// independent character evaluation (order not important)
// establish state-dependent character evaluations
- if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE) {
+ if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE) {
if (strlen($value > 0)) { // unexpected
$tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_UNKNOWN);
$value = "";
@@ -262,7 +262,7 @@ private function _parseToTokens() {
continue;
}
- if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE) {
+ if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE) {
if (strlen($value) > 0) { // unexpected
$tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_UNKNOWN);
$value = "";
@@ -272,14 +272,14 @@ private function _parseToTokens() {
continue;
}
- if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::BRACKET_OPEN) {
+ if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::BRACKET_OPEN) {
$inRange = true;
$value .= PHPExcel_Calculation_FormulaParser::BRACKET_OPEN;
++$index;
continue;
}
- if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::ERROR_START) {
+ if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::ERROR_START) {
if (strlen($value) > 0) { // unexpected
$tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_UNKNOWN);
$value = "";
@@ -291,7 +291,7 @@ private function _parseToTokens() {
}
// mark start and end of arrays and array rows
- if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::BRACE_OPEN) {
+ if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::BRACE_OPEN) {
if (strlen($value) > 0) { // unexpected
$tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_UNKNOWN);
$value = "";
@@ -309,7 +309,7 @@ private function _parseToTokens() {
continue;
}
- if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::SEMICOLON) {
+ if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::SEMICOLON) {
if (strlen($value) > 0) {
$tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND);
$value = "";
@@ -331,7 +331,7 @@ private function _parseToTokens() {
continue;
}
- if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::BRACE_CLOSE) {
+ if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::BRACE_CLOSE) {
if (strlen($value) > 0) {
$tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND);
$value = "";
@@ -352,14 +352,14 @@ private function _parseToTokens() {
}
// trim white-space
- if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::WHITESPACE) {
+ if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::WHITESPACE) {
if (strlen($value) > 0) {
$tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND);
$value = "";
}
$tokens1[] = new PHPExcel_Calculation_FormulaToken("", PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_WHITESPACE);
++$index;
- while (($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::WHITESPACE) && ($index < $formulaLength)) {
+ while (($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::WHITESPACE) && ($index < $formulaLength)) {
++$index;
}
continue;
@@ -379,29 +379,29 @@ private function _parseToTokens() {
}
// standard infix operators
- if (strpos(PHPExcel_Calculation_FormulaParser::OPERATORS_INFIX, $this->_formula{$index}) !== false) {
+ if (strpos(PHPExcel_Calculation_FormulaParser::OPERATORS_INFIX, $this->_formula[$index]) !== false) {
if (strlen($value) > 0) {
$tokens1[] =new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND);
$value = "";
}
- $tokens1[] = new PHPExcel_Calculation_FormulaToken($this->_formula{$index}, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERATORINFIX);
+ $tokens1[] = new PHPExcel_Calculation_FormulaToken($this->_formula[$index], PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERATORINFIX);
++$index;
continue;
}
// standard postfix operators (only one)
- if (strpos(PHPExcel_Calculation_FormulaParser::OPERATORS_POSTFIX, $this->_formula{$index}) !== false) {
+ if (strpos(PHPExcel_Calculation_FormulaParser::OPERATORS_POSTFIX, $this->_formula[$index]) !== false) {
if (strlen($value) > 0) {
$tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND);
$value = "";
}
- $tokens1[] = new PHPExcel_Calculation_FormulaToken($this->_formula{$index}, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERATORPOSTFIX);
+ $tokens1[] = new PHPExcel_Calculation_FormulaToken($this->_formula[$index], PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERATORPOSTFIX);
++$index;
continue;
}
// start subexpression or function
- if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::PAREN_OPEN) {
+ if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::PAREN_OPEN) {
if (strlen($value) > 0) {
$tmp = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_FUNCTION, PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_START);
$tokens1[] = $tmp;
@@ -417,7 +417,7 @@ private function _parseToTokens() {
}
// function, subexpression, or array parameters, or operand unions
- if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::COMMA) {
+ if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::COMMA) {
if (strlen($value) > 0) {
$tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND);
$value = "";
@@ -438,7 +438,7 @@ private function _parseToTokens() {
}
// stop subexpression
- if ($this->_formula{$index} == PHPExcel_Calculation_FormulaParser::PAREN_CLOSE) {
+ if ($this->_formula[$index] == PHPExcel_Calculation_FormulaParser::PAREN_CLOSE) {
if (strlen($value) > 0) {
$tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND);
$value = "";
@@ -454,7 +454,7 @@ private function _parseToTokens() {
}
// token accumulation
- $value .= $this->_formula{$index};
+ $value .= $this->_formula[$index];
++$index;
}
diff --git a/includes/PHPExcel-1.8.1/Classes/PHPExcel/Calculation/Functions.php b/includes/PHPExcel-1.8.1/Classes/PHPExcel/Calculation/Functions.php
index dea1503b..c43beaad 100644
--- a/includes/PHPExcel-1.8.1/Classes/PHPExcel/Calculation/Functions.php
+++ b/includes/PHPExcel-1.8.1/Classes/PHPExcel/Calculation/Functions.php
@@ -310,7 +310,7 @@ public static function _ifCondition($condition) {
$condition = PHPExcel_Calculation_Functions::flattenSingleValue($condition);
if (!isset($condition{0}))
$condition = '=""';
- if (!in_array($condition{0},array('>', '<', '='))) {
+ if (!in_array($condition[0],array('>', '<', '='))) {
if (!is_numeric($condition)) { $condition = PHPExcel_Calculation::_wrapResult(strtoupper($condition)); }
return '='.$condition;
} else {
@@ -531,7 +531,7 @@ public static function N($value = NULL) {
break;
case 'string' :
// Errors
- if ((strlen($value) > 0) && ($value{0} == '#')) {
+ if ((strlen($value) > 0) && ($value[0] == '#')) {
return $value;
}
break;
@@ -580,7 +580,7 @@ public static function TYPE($value = NULL) {
return 64;
} elseif(is_string($value)) {
// Errors
- if ((strlen($value) > 0) && ($value{0} == '#')) {
+ if ((strlen($value) > 0) && ($value[0] == '#')) {
return 16;
}
return 2;
diff --git a/includes/PHPExcel-1.8.1/Classes/PHPExcel/Calculation/TextData.php b/includes/PHPExcel-1.8.1/Classes/PHPExcel/Calculation/TextData.php
index 148a5b75..4dc34072 100644
--- a/includes/PHPExcel-1.8.1/Classes/PHPExcel/Calculation/TextData.php
+++ b/includes/PHPExcel-1.8.1/Classes/PHPExcel/Calculation/TextData.php
@@ -48,19 +48,19 @@ class PHPExcel_Calculation_TextData {
private static $_invalidChars = Null;
private static function _uniord($c) {
- if (ord($c{0}) >=0 && ord($c{0}) <= 127)
- return ord($c{0});
- if (ord($c{0}) >= 192 && ord($c{0}) <= 223)
- return (ord($c{0})-192)*64 + (ord($c{1})-128);
- if (ord($c{0}) >= 224 && ord($c{0}) <= 239)
- return (ord($c{0})-224)*4096 + (ord($c{1})-128)*64 + (ord($c{2})-128);
- if (ord($c{0}) >= 240 && ord($c{0}) <= 247)
- return (ord($c{0})-240)*262144 + (ord($c{1})-128)*4096 + (ord($c{2})-128)*64 + (ord($c{3})-128);
- if (ord($c{0}) >= 248 && ord($c{0}) <= 251)
- return (ord($c{0})-248)*16777216 + (ord($c{1})-128)*262144 + (ord($c{2})-128)*4096 + (ord($c{3})-128)*64 + (ord($c{4})-128);
- if (ord($c{0}) >= 252 && ord($c{0}) <= 253)
- return (ord($c{0})-252)*1073741824 + (ord($c{1})-128)*16777216 + (ord($c{2})-128)*262144 + (ord($c{3})-128)*4096 + (ord($c{4})-128)*64 + (ord($c{5})-128);
- if (ord($c{0}) >= 254 && ord($c{0}) <= 255) //error
+ if (ord($c[0]) >=0 && ord($c[0]) <= 127)
+ return ord($c[0]);
+ if (ord($c[0]) >= 192 && ord($c[0]) <= 223)
+ return (ord($c[0])-192)*64 + (ord($c[1])-128);
+ if (ord($c[0]) >= 224 && ord($c[0]) <= 239)
+ return (ord($c[0])-224)*4096 + (ord($c[1])-128)*64 + (ord($c[2])-128);
+ if (ord($c[0]) >= 240 && ord($c[0]) <= 247)
+ return (ord($c[0])-240)*262144 + (ord($c[1])-128)*4096 + (ord($c[2])-128)*64 + (ord($c[3])-128);
+ if (ord($c[0]) >= 248 && ord($c[0]) <= 251)
+ return (ord($c[0])-248)*16777216 + (ord($c[1])-128)*262144 + (ord($c[2])-128)*4096 + (ord($c[3])-128)*64 + (ord($c[4])-128);
+ if (ord($c[0]) >= 252 && ord($c[0]) <= 253)
+ return (ord($c[0])-252)*1073741824 + (ord($c[1])-128)*16777216 + (ord($c[2])-128)*262144 + (ord($c[3])-128)*4096 + (ord($c[4])-128)*64 + (ord($c[5])-128);
+ if (ord($c[0]) >= 254 && ord($c[0]) <= 255) //error
return PHPExcel_Calculation_Functions::VALUE();
return 0;
} // function _uniord()
@@ -489,7 +489,7 @@ public static function PROPERCASE($mixedCaseString) {
* @param string $oldText String to modify
* @param int $start Start character
* @param int $chars Number of characters
- * @param string $newText String to replace in defined position
+ * @param string $newText String to replace in defined position
* @return string
*/
public static function REPLACE($oldText = '', $start = 1, $chars = null, $newText) {
@@ -597,8 +597,8 @@ public static function VALUE($value = '') {
if (!is_numeric($value)) {
$numberValue = str_replace(
- PHPExcel_Shared_String::getThousandsSeparator(),
- '',
+ PHPExcel_Shared_String::getThousandsSeparator(),
+ '',
trim($value, " \t\n\r\0\x0B" . PHPExcel_Shared_String::getCurrencyCode())
);
if (is_numeric($numberValue)) {
diff --git a/includes/PHPExcel-1.8.1/Classes/PHPExcel/Cell.php b/includes/PHPExcel-1.8.1/Classes/PHPExcel/Cell.php
index 2d5f9102..51151909 100644
--- a/includes/PHPExcel-1.8.1/Classes/PHPExcel/Cell.php
+++ b/includes/PHPExcel-1.8.1/Classes/PHPExcel/Cell.php
@@ -801,19 +801,19 @@ public static function columnIndexFromString($pString = 'A')
// We also use the language construct isset() rather than the more costly strlen() function to match the length of $pString
// for improved performance
- if (isset($pString{0})) {
- if (!isset($pString{1})) {
+ if (isset($pString[0])) {
+ if (!isset($pString[1])) {
$_indexCache[$pString] = $_columnLookup[$pString];
return $_indexCache[$pString];
- } elseif(!isset($pString{2})) {
- $_indexCache[$pString] = $_columnLookup[$pString{0}] * 26 + $_columnLookup[$pString{1}];
+ } elseif(!isset($pString[2])) {
+ $_indexCache[$pString] = $_columnLookup[$pString[0]] * 26 + $_columnLookup[$pString[1]];
return $_indexCache[$pString];
- } elseif(!isset($pString{3})) {
- $_indexCache[$pString] = $_columnLookup[$pString{0}] * 676 + $_columnLookup[$pString{1}] * 26 + $_columnLookup[$pString{2}];
+ } elseif(!isset($pString[3])) {
+ $_indexCache[$pString] = $_columnLookup[$pString[0]] * 676 + $_columnLookup[$pString[1]] * 26 + $_columnLookup[$pString[2]];
return $_indexCache[$pString];
}
}
- throw new PHPExcel_Exception("Column string index can not be " . ((isset($pString{0})) ? "longer than 3 characters" : "empty"));
+ throw new PHPExcel_Exception("Column string index can not be " . ((isset($pString[0])) ? "longer than 3 characters" : "empty"));
}
/**
diff --git a/includes/PHPExcel-1.8.1/Classes/PHPExcel/Cell/DefaultValueBinder.php b/includes/PHPExcel-1.8.1/Classes/PHPExcel/Cell/DefaultValueBinder.php
index 252048f7..aaaa49ba 100644
--- a/includes/PHPExcel-1.8.1/Classes/PHPExcel/Cell/DefaultValueBinder.php
+++ b/includes/PHPExcel-1.8.1/Classes/PHPExcel/Cell/DefaultValueBinder.php
@@ -87,7 +87,7 @@ public static function dataTypeForValue($pValue = null) {
return PHPExcel_Cell_DataType::TYPE_STRING;
} elseif ($pValue instanceof PHPExcel_RichText) {
return PHPExcel_Cell_DataType::TYPE_INLINE;
- } elseif ($pValue{0} === '=' && strlen($pValue) > 1) {
+ } elseif ($pValue[0] === '=' && strlen($pValue) > 1) {
return PHPExcel_Cell_DataType::TYPE_FORMULA;
} elseif (is_bool($pValue)) {
return PHPExcel_Cell_DataType::TYPE_BOOL;
@@ -95,7 +95,7 @@ public static function dataTypeForValue($pValue = null) {
return PHPExcel_Cell_DataType::TYPE_NUMERIC;
} elseif (preg_match('/^[\+\-]?([0-9]+\\.?[0-9]*|[0-9]*\\.?[0-9]+)([Ee][\-\+]?[0-2]?\d{1,3})?$/', $pValue)) {
$tValue = ltrim($pValue, '+-');
- if (is_string($pValue) && $tValue{0} === '0' && strlen($tValue) > 1 && $tValue{1} !== '.' ) {
+ if (is_string($pValue) && $tValue[0] === '0' && strlen($tValue) > 1 && $tValue[1] !== '.' ) {
return PHPExcel_Cell_DataType::TYPE_STRING;
} elseif((strpos($pValue, '.') === false) && ($pValue > PHP_INT_MAX)) {
return PHPExcel_Cell_DataType::TYPE_STRING;
diff --git a/includes/PHPExcel-1.8.1/Classes/PHPExcel/Reader/Excel5.php b/includes/PHPExcel-1.8.1/Classes/PHPExcel/Reader/Excel5.php
index f2893ece..a19869a0 100644
--- a/includes/PHPExcel-1.8.1/Classes/PHPExcel/Reader/Excel5.php
+++ b/includes/PHPExcel-1.8.1/Classes/PHPExcel/Reader/Excel5.php
@@ -163,7 +163,7 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
const MS_BIFF_CRYPTO_NONE = 0;
const MS_BIFF_CRYPTO_XOR = 1;
const MS_BIFF_CRYPTO_RC4 = 2;
-
+
// Size of stream blocks when using RC4 encryption
const REKEY_BLOCK = 0x400;
@@ -389,10 +389,10 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
/**
* The type of encryption in use
*
- * @var int
+ * @var int
*/
private $_encryption = 0;
-
+
/**
* The position in the stream after which contents are encrypted
*
@@ -1093,25 +1093,25 @@ public function load($pFilename)
return $this->_phpExcel;
}
-
+
/**
* Read record data from stream, decrypting as required
- *
+ *
* @param string $data Data stream to read from
* @param int $pos Position to start reading from
* @param int $length Record data length
- *
+ *
* @return string Record data
*/
private function _readRecordData($data, $pos, $len)
{
$data = substr($data, $pos, $len);
-
+
// File not encrypted, or record before encryption start point
if ($this->_encryption == self::MS_BIFF_CRYPTO_NONE || $pos < $this->_encryptionStartPos) {
return $data;
}
-
+
$recordData = '';
if ($this->_encryption == self::MS_BIFF_CRYPTO_RC4) {
@@ -1144,7 +1144,7 @@ private function _readRecordData($data, $pos, $len)
// Keep track of the position of this decryptor.
// We'll try and re-use it later if we can to speed things up
$this->_rc4Pos = $pos + $len;
-
+
} elseif ($this->_encryption == self::MS_BIFF_CRYPTO_XOR) {
throw new PHPExcel_Reader_Exception('XOr encryption not supported');
}
@@ -1663,7 +1663,7 @@ private function _readBof()
*
* -- "OpenOffice.org's Documentation of the Microsoft
* Excel File Format"
- *
+ *
* The decryption functions and objects used from here on in
* are based on the source of Spreadsheet-ParseExcel:
* http://search.cpan.org/~jmcnamara/Spreadsheet-ParseExcel/
@@ -1675,12 +1675,12 @@ private function _readFilepass()
if ($length != 54) {
throw new PHPExcel_Reader_Exception('Unexpected file pass record length');
}
-
+
$recordData = $this->_readRecordData($this->_data, $this->_pos + 4, $length);
-
+
// move stream pointer to next record
$this->_pos += 4 + $length;
-
+
if (!$this->_verifyPassword(
'VelvetSweatshop',
substr($recordData, 6, 16),
@@ -1690,7 +1690,7 @@ private function _readFilepass()
)) {
throw new PHPExcel_Reader_Exception('Decryption password incorrect');
}
-
+
$this->_encryption = self::MS_BIFF_CRYPTO_RC4;
// Decryption required from the record after next onwards
@@ -1699,10 +1699,10 @@ private function _readFilepass()
/**
* Make an RC4 decryptor for the given block
- *
+ *
* @var int $block Block for which to create decrypto
* @var string $valContext MD5 context state
- *
+ *
* @return PHPExcel_Reader_Excel5_RC4
*/
private function _makeKey($block, $valContext)
@@ -1712,7 +1712,7 @@ private function _makeKey($block, $valContext)
for ($i = 0; $i < 5; $i++) {
$pwarray[$i] = $valContext[$i];
}
-
+
$pwarray[5] = chr($block & 0xff);
$pwarray[6] = chr(($block >> 8) & 0xff);
$pwarray[7] = chr(($block >> 16) & 0xff);
@@ -1730,13 +1730,13 @@ private function _makeKey($block, $valContext)
/**
* Verify RC4 file password
- *
+ *
* @var string $password Password to check
* @var string $docid Document id
* @var string $salt_data Salt data
* @var string $hashedsalt_data Hashed salt data
* @var string &$valContext Set to the MD5 context of the value
- *
+ *
* @return bool Success
*/
private function _verifyPassword($password, $docid, $salt_data, $hashedsalt_data, &$valContext)
@@ -1766,7 +1766,7 @@ private function _verifyPassword($password, $docid, $salt_data, $hashedsalt_data
if ((64 - $offset) < 5) {
$tocopy = 64 - $offset;
}
-
+
for ($i = 0; $i <= $tocopy; $i++) {
$pwarray[$offset + $i] = $mdContext1[$keyoffset + $i];
}
@@ -1803,7 +1803,7 @@ private function _verifyPassword($password, $docid, $salt_data, $hashedsalt_data
$salt = $key->RC4($salt_data);
$hashedsalt = $key->RC4($hashedsalt_data);
-
+
$salt .= "\x80" . str_repeat("\0", 47);
$salt[56] = "\x80";
@@ -1860,7 +1860,7 @@ private function _readDateMode()
// offset: 0; size: 2; 0 = base 1900, 1 = base 1904
PHPExcel_Shared_Date::setExcelCalendar(PHPExcel_Shared_Date::CALENDAR_WINDOWS_1900);
- if (ord($recordData{0}) == 1) {
+ if (ord($recordData[0]) == 1) {
PHPExcel_Shared_Date::setExcelCalendar(PHPExcel_Shared_Date::CALENDAR_MAC_1904);
}
}
@@ -1919,7 +1919,7 @@ private function _readFont()
}
// offset: 10; size: 1; underline type
- $underlineType = ord($recordData{10});
+ $underlineType = ord($recordData[10]);
switch ($underlineType) {
case 0x00:
break; // no underline
@@ -2058,7 +2058,7 @@ private function _readXf()
// offset: 6; size: 1; Alignment and text break
// bit 2-0, mask 0x07; horizontal alignment
- $horAlign = (0x07 & ord($recordData{6})) >> 0;
+ $horAlign = (0x07 & ord($recordData[6])) >> 0;
switch ($horAlign) {
case 0:
$objStyle->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_GENERAL);
@@ -2083,7 +2083,7 @@ private function _readXf()
break;
}
// bit 3, mask 0x08; wrap text
- $wrapText = (0x08 & ord($recordData{6})) >> 3;
+ $wrapText = (0x08 & ord($recordData[6])) >> 3;
switch ($wrapText) {
case 0:
$objStyle->getAlignment()->setWrapText(false);
@@ -2093,7 +2093,7 @@ private function _readXf()
break;
}
// bit 6-4, mask 0x70; vertical alignment
- $vertAlign = (0x70 & ord($recordData{6})) >> 4;
+ $vertAlign = (0x70 & ord($recordData[6])) >> 4;
switch ($vertAlign) {
case 0:
$objStyle->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_TOP);
@@ -2111,7 +2111,7 @@ private function _readXf()
if ($this->_version == self::XLS_BIFF8) {
// offset: 7; size: 1; XF_ROTATION: Text rotation angle
- $angle = ord($recordData{7});
+ $angle = ord($recordData[7]);
$rotation = 0;
if ($angle <= 90) {
$rotation = $angle;
@@ -2124,11 +2124,11 @@ private function _readXf()
// offset: 8; size: 1; Indentation, shrink to cell size, and text direction
// bit: 3-0; mask: 0x0F; indent level
- $indent = (0x0F & ord($recordData{8})) >> 0;
+ $indent = (0x0F & ord($recordData[8])) >> 0;
$objStyle->getAlignment()->setIndent($indent);
// bit: 4; mask: 0x10; 1 = shrink content to fit into cell
- $shrinkToFit = (0x10 & ord($recordData{8})) >> 4;
+ $shrinkToFit = (0x10 & ord($recordData[8])) >> 4;
switch ($shrinkToFit) {
case 0:
$objStyle->getAlignment()->setShrinkToFit(false);
@@ -2210,7 +2210,7 @@ private function _readXf()
// BIFF5
// offset: 7; size: 1; Text orientation and flags
- $orientationAndFlags = ord($recordData{7});
+ $orientationAndFlags = ord($recordData[7]);
// bit: 1-0; mask: 0x03; XF_ORIENTATION: Text orientation
$xfOrientation = (0x03 & $orientationAndFlags) >> 0;
@@ -2334,7 +2334,7 @@ private function _readXfExt()
$xclrValue = substr($extData, 4, 4); // color value (value based on color type)
if ($xclfType == 2) {
- $rgb = sprintf('%02X%02X%02X', ord($xclrValue{0}), ord($xclrValue{1}), ord($xclrValue{2}));
+ $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2]));
// modify the relevant style property
if ( isset($this->_mapCellXfIndex[$ixfe]) ) {
@@ -2350,7 +2350,7 @@ private function _readXfExt()
$xclrValue = substr($extData, 4, 4); // color value (value based on color type)
if ($xclfType == 2) {
- $rgb = sprintf('%02X%02X%02X', ord($xclrValue{0}), ord($xclrValue{1}), ord($xclrValue{2}));
+ $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2]));
// modify the relevant style property
if ( isset($this->_mapCellXfIndex[$ixfe]) ) {
@@ -2366,7 +2366,7 @@ private function _readXfExt()
$xclrValue = substr($extData, 4, 4); // color value (value based on color type)
if ($xclfType == 2) {
- $rgb = sprintf('%02X%02X%02X', ord($xclrValue{0}), ord($xclrValue{1}), ord($xclrValue{2}));
+ $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2]));
// modify the relevant style property
if ( isset($this->_mapCellXfIndex[$ixfe]) ) {
@@ -2382,7 +2382,7 @@ private function _readXfExt()
$xclrValue = substr($extData, 4, 4); // color value (value based on color type)
if ($xclfType == 2) {
- $rgb = sprintf('%02X%02X%02X', ord($xclrValue{0}), ord($xclrValue{1}), ord($xclrValue{2}));
+ $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2]));
// modify the relevant style property
if ( isset($this->_mapCellXfIndex[$ixfe]) ) {
@@ -2398,7 +2398,7 @@ private function _readXfExt()
$xclrValue = substr($extData, 4, 4); // color value (value based on color type)
if ($xclfType == 2) {
- $rgb = sprintf('%02X%02X%02X', ord($xclrValue{0}), ord($xclrValue{1}), ord($xclrValue{2}));
+ $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2]));
// modify the relevant style property
if ( isset($this->_mapCellXfIndex[$ixfe]) ) {
@@ -2414,7 +2414,7 @@ private function _readXfExt()
$xclrValue = substr($extData, 4, 4); // color value (value based on color type)
if ($xclfType == 2) {
- $rgb = sprintf('%02X%02X%02X', ord($xclrValue{0}), ord($xclrValue{1}), ord($xclrValue{2}));
+ $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2]));
// modify the relevant style property
if ( isset($this->_mapCellXfIndex[$ixfe]) ) {
@@ -2430,7 +2430,7 @@ private function _readXfExt()
$xclrValue = substr($extData, 4, 4); // color value (value based on color type)
if ($xclfType == 2) {
- $rgb = sprintf('%02X%02X%02X', ord($xclrValue{0}), ord($xclrValue{1}), ord($xclrValue{2}));
+ $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2]));
// modify the relevant style property
if ( isset($this->_mapCellXfIndex[$ixfe]) ) {
@@ -2446,7 +2446,7 @@ private function _readXfExt()
$xclrValue = substr($extData, 4, 4); // color value (value based on color type)
if ($xclfType == 2) {
- $rgb = sprintf('%02X%02X%02X', ord($xclrValue{0}), ord($xclrValue{1}), ord($xclrValue{2}));
+ $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2]));
// modify the relevant style property
if ( isset($this->_mapCellXfIndex[$ixfe]) ) {
@@ -2488,7 +2488,7 @@ private function _readStyle()
if ($isBuiltIn) {
// offset: 2; size: 1; identifier for built-in style
- $builtInId = ord($recordData{2});
+ $builtInId = ord($recordData[2]);
switch ($builtInId) {
case 0x00:
@@ -2555,7 +2555,7 @@ private function _readSheet()
$this->_pos += 4 + $length;
// offset: 4; size: 1; sheet state
- switch (ord($recordData{4})) {
+ switch (ord($recordData[4])) {
case 0x00: $sheetState = PHPExcel_Worksheet::SHEETSTATE_VISIBLE; break;
case 0x01: $sheetState = PHPExcel_Worksheet::SHEETSTATE_HIDDEN; break;
case 0x02: $sheetState = PHPExcel_Worksheet::SHEETSTATE_VERYHIDDEN; break;
@@ -2563,7 +2563,7 @@ private function _readSheet()
}
// offset: 5; size: 1; sheet type
- $sheetType = ord($recordData{5});
+ $sheetType = ord($recordData[5]);
// offset: 6; size: var; sheet name
if ($this->_version == self::XLS_BIFF8) {
@@ -2742,7 +2742,7 @@ private function _readDefinedName()
// offset: 2; size: 1; keyboard shortcut
// offset: 3; size: 1; length of the name (character count)
- $nlen = ord($recordData{3});
+ $nlen = ord($recordData[3]);
// offset: 4; size: 2; size of the formula data (it can happen that this is zero)
// note: there can also be additional data, this is not included in $flen
@@ -2826,7 +2826,7 @@ private function _readSst()
$pos += 2;
// option flags
- $optionFlags = ord($recordData{$pos});
+ $optionFlags = ord($recordData[$pos]);
++$pos;
// bit: 0; mask: 0x01; 0 = compressed; 1 = uncompressed
@@ -2895,7 +2895,7 @@ private function _readSst()
// repeated option flags
// OpenOffice.org documentation 5.21
- $option = ord($recordData{$pos});
+ $option = ord($recordData[$pos]);
++$pos;
if ($isCompressed && ($option == 0)) {
@@ -2919,7 +2919,7 @@ private function _readSst()
// this fragment compressed
$len = min($charsLeft, $limitpos - $pos);
for ($j = 0; $j < $len; ++$j) {
- $retstr .= $recordData{$pos + $j} . chr(0);
+ $retstr .= $recordData[$pos + $j] . chr(0);
}
$charsLeft -= $len;
$isCompressed = false;
@@ -3818,7 +3818,7 @@ private function _readFormula()
// We can apparently not rely on $isPartOfSharedFormula. Even when $isPartOfSharedFormula = true
// the formula data may be ordinary formula data, therefore we need to check
// explicitly for the tExp token (0x01)
- $isPartOfSharedFormula = $isPartOfSharedFormula && ord($formulaStructure{2}) == 0x01;
+ $isPartOfSharedFormula = $isPartOfSharedFormula && ord($formulaStructure[2]) == 0x01;
if ($isPartOfSharedFormula) {
// part of shared formula which means there will be a formula with a tExp token and nothing else
@@ -3842,9 +3842,9 @@ private function _readFormula()
$xfIndex = self::_GetInt2d($recordData, 4);
// offset: 6; size: 8; result of the formula
- if ( (ord($recordData{6}) == 0)
- && (ord($recordData{12}) == 255)
- && (ord($recordData{13}) == 255) ) {
+ if ( (ord($recordData[6]) == 0)
+ && (ord($recordData[12]) == 255)
+ && (ord($recordData[13]) == 255) ) {
// String formula. Result follows in appended STRING record
$dataType = PHPExcel_Cell_DataType::TYPE_STRING;
@@ -3858,25 +3858,25 @@ private function _readFormula()
// read STRING record
$value = $this->_readString();
- } elseif ((ord($recordData{6}) == 1)
- && (ord($recordData{12}) == 255)
- && (ord($recordData{13}) == 255)) {
+ } elseif ((ord($recordData[6]) == 1)
+ && (ord($recordData[12]) == 255)
+ && (ord($recordData[13]) == 255)) {
// Boolean formula. Result is in +2; 0=false, 1=true
$dataType = PHPExcel_Cell_DataType::TYPE_BOOL;
- $value = (bool) ord($recordData{8});
+ $value = (bool) ord($recordData[8]);
- } elseif ((ord($recordData{6}) == 2)
- && (ord($recordData{12}) == 255)
- && (ord($recordData{13}) == 255)) {
+ } elseif ((ord($recordData[6]) == 2)
+ && (ord($recordData[12]) == 255)
+ && (ord($recordData[13]) == 255)) {
// Error formula. Error code is in +2
$dataType = PHPExcel_Cell_DataType::TYPE_ERROR;
- $value = self::_mapErrorCode(ord($recordData{8}));
+ $value = self::_mapErrorCode(ord($recordData[8]));
- } elseif ((ord($recordData{6}) == 3)
- && (ord($recordData{12}) == 255)
- && (ord($recordData{13}) == 255)) {
+ } elseif ((ord($recordData[6]) == 3)
+ && (ord($recordData[12]) == 255)
+ && (ord($recordData[13]) == 255)) {
// Formula result is a null string
$dataType = PHPExcel_Cell_DataType::TYPE_NULL;
@@ -3944,7 +3944,7 @@ private function _readSharedFmla()
// offset: 6, size: 1; not used
// offset: 7, size: 1; number of existing FORMULA records for this shared formula
- $no = ord($recordData{7});
+ $no = ord($recordData[7]);
// offset: 8, size: var; Binary token array of the shared formula
$formula = substr($recordData, 8);
@@ -4011,10 +4011,10 @@ private function _readBoolErr()
$xfIndex = self::_GetInt2d($recordData, 4);
// offset: 6; size: 1; the boolean value or error value
- $boolErr = ord($recordData{6});
+ $boolErr = ord($recordData[6]);
// offset: 7; size: 1; 0=boolean; 1=error
- $isError = ord($recordData{7});
+ $isError = ord($recordData[7]);
$cell = $this->_phpSheet->getCell($columnString . ($row + 1));
switch ($isError) {
@@ -4392,7 +4392,7 @@ private function _readSelection()
if (!$this->_readDataOnly) {
// offset: 0; size: 1; pane identifier
- $paneId = ord($recordData{0});
+ $paneId = ord($recordData[0]);
// offset: 1; size: 2; index to row of the active cell
$r = self::_GetInt2d($recordData, 1);
@@ -4544,9 +4544,9 @@ private function _readHyperLink()
$hyperlinkType = 'UNC';
} else if (!$isFileLinkOrUrl) {
$hyperlinkType = 'workbook';
- } else if (ord($recordData{$offset}) == 0x03) {
+ } else if (ord($recordData[$offset]) == 0x03) {
$hyperlinkType = 'local';
- } else if (ord($recordData{$offset}) == 0xE0) {
+ } else if (ord($recordData[$offset]) == 0xE0) {
$hyperlinkType = 'URL';
}
@@ -6094,10 +6094,10 @@ private function _readBIFF5CellRangeAddressFixed($subData)
$lr = self::_GetInt2d($subData, 2) + 1;
// offset: 4; size: 1; index to first column
- $fc = ord($subData{4});
+ $fc = ord($subData[4]);
// offset: 5; size: 1; index to last column
- $lc = ord($subData{5});
+ $lc = ord($subData[5]);
// check values
if ($fr > $lr || $fc > $lc) {
@@ -6504,13 +6504,13 @@ private static function _readBIFF8Constant($valueData)
private static function _readRGB($rgb)
{
// offset: 0; size 1; Red component
- $r = ord($rgb{0});
+ $r = ord($rgb[0]);
// offset: 1; size: 1; Green component
- $g = ord($rgb{1});
+ $g = ord($rgb[1]);
// offset: 2; size: 1; Blue component
- $b = ord($rgb{2});
+ $b = ord($rgb[2]);
// HEX notation, e.g. 'FF00FC'
$rgb = sprintf('%02X%02X%02X', $r, $g, $b);
diff --git a/includes/PHPExcel-1.8.1/Classes/PHPExcel/Reader/Excel5/Escher.php b/includes/PHPExcel-1.8.1/Classes/PHPExcel/Reader/Excel5/Escher.php
index 8dc5e902..0a6adaff 100644
--- a/includes/PHPExcel-1.8.1/Classes/PHPExcel/Reader/Excel5/Escher.php
+++ b/includes/PHPExcel-1.8.1/Classes/PHPExcel/Reader/Excel5/Escher.php
@@ -250,16 +250,16 @@ private function _readBSE()
$foDelay = PHPExcel_Reader_Excel5::_GetInt4d($recordData, 28);
// offset: 32; size: 1; unused1
- $unused1 = ord($recordData{32});
+ $unused1 = ord($recordData[32]);
// offset: 33; size: 1; size of nameData in bytes (including null terminator)
- $cbName = ord($recordData{33});
+ $cbName = ord($recordData[33]);
// offset: 34; size: 1; unused2
- $unused2 = ord($recordData{34});
+ $unused2 = ord($recordData[34]);
// offset: 35; size: 1; unused3
- $unused3 = ord($recordData{35});
+ $unused3 = ord($recordData[35]);
// offset: 36; size: $cbName; nameData
$nameData = substr($recordData, 36, $cbName);
@@ -301,7 +301,7 @@ private function _readBlipJPEG()
}
// offset: var; size: 1; tag
- $tag = ord($recordData{$pos});
+ $tag = ord($recordData[$pos]);
$pos += 1;
// offset: var; size: var; the raw image data
@@ -342,7 +342,7 @@ private function _readBlipPNG()
}
// offset: var; size: 1; tag
- $tag = ord($recordData{$pos});
+ $tag = ord($recordData[$pos]);
$pos += 1;
// offset: var; size: var; the raw image data
diff --git a/includes/PHPExcel-1.8.1/Classes/PHPExcel/Reader/SYLK.php b/includes/PHPExcel-1.8.1/Classes/PHPExcel/Reader/SYLK.php
index b61118a3..5daa1931 100644
--- a/includes/PHPExcel-1.8.1/Classes/PHPExcel/Reader/SYLK.php
+++ b/includes/PHPExcel-1.8.1/Classes/PHPExcel/Reader/SYLK.php
@@ -168,7 +168,7 @@ public function listWorksheetInfo($pFilename)
if ($dataType == 'C') {
// Read cell value data
foreach($rowData as $rowDatum) {
- switch($rowDatum{0}) {
+ switch($rowDatum[0]) {
case 'C' :
case 'X' :
$columnIndex = substr($rowDatum,1) - 1;
@@ -257,7 +257,7 @@ public function loadIntoExisting($pFilename, PHPExcel $objPHPExcel)
if ($dataType == 'P') {
$formatArray = array();
foreach($rowData as $rowDatum) {
- switch($rowDatum{0}) {
+ switch($rowDatum[0]) {
case 'P' : $formatArray['numberformat']['code'] = str_replace($fromFormats,$toFormats,substr($rowDatum,1));
break;
case 'E' :
@@ -267,7 +267,7 @@ public function loadIntoExisting($pFilename, PHPExcel $objPHPExcel)
break;
case 'S' : $styleSettings = substr($rowDatum,1);
for ($i=0;$i= PHPExcel_Cell::columnIndexFromString($beforeColumn));
- $updateRow = (($newRow{0} != '$') && ($beforeRow{0} != '$') &&
+ $updateRow = (($newRow[0] != '$') && ($beforeRow[0] != '$') &&
$newRow >= $beforeRow);
// Create new column reference
diff --git a/includes/PHPExcel-1.8.1/Classes/PHPExcel/Shared/OLE.php b/includes/PHPExcel-1.8.1/Classes/PHPExcel/Shared/OLE.php
index 9796282a..67fe0fb3 100644
--- a/includes/PHPExcel-1.8.1/Classes/PHPExcel/Shared/OLE.php
+++ b/includes/PHPExcel-1.8.1/Classes/PHPExcel/Shared/OLE.php
@@ -447,7 +447,7 @@ public static function Asc2Ucs($ascii)
{
$rawname = '';
for ($i = 0; $i < strlen($ascii); ++$i) {
- $rawname .= $ascii{$i} . "\x00";
+ $rawname .= $ascii[$i] . "\x00";
}
return $rawname;
}
diff --git a/includes/PHPExcel-1.8.1/Classes/PHPExcel/Shared/String.php b/includes/PHPExcel-1.8.1/Classes/PHPExcel/Shared/String.php
index 7d6b4192..3d119268 100644
--- a/includes/PHPExcel-1.8.1/Classes/PHPExcel/Shared/String.php
+++ b/includes/PHPExcel-1.8.1/Classes/PHPExcel/Shared/String.php
@@ -526,15 +526,15 @@ public static function ConvertEncoding($value, $to, $from)
*/
public static function utf16_decode($str, $bom_be = TRUE) {
if( strlen($str) < 2 ) return $str;
- $c0 = ord($str{0});
- $c1 = ord($str{1});
+ $c0 = ord($str[0]);
+ $c1 = ord($str[1]);
if( $c0 == 0xfe && $c1 == 0xff ) { $str = substr($str,2); }
elseif( $c0 == 0xff && $c1 == 0xfe ) { $str = substr($str,2); $bom_be = false; }
$len = strlen($str);
$newstr = '';
for($i=0;$i<$len;$i+=2) {
- if( $bom_be ) { $val = ord($str{$i}) << 4; $val += ord($str{$i+1}); }
- else { $val = ord($str{$i+1}) << 4; $val += ord($str{$i}); }
+ if( $bom_be ) { $val = ord($str[$i]) << 4; $val += ord($str[$i+1]); }
+ else { $val = ord($str[$i+1]) << 4; $val += ord($str[$i]); }
$newstr .= ($val == 0x228) ? "\n" : chr($val);
}
return $newstr;
diff --git a/includes/PHPExcel-1.8.1/Classes/PHPExcel/Shared/ZipStreamWrapper.php b/includes/PHPExcel-1.8.1/Classes/PHPExcel/Shared/ZipStreamWrapper.php
index 6e63d3ce..664f4954 100644
--- a/includes/PHPExcel-1.8.1/Classes/PHPExcel/Shared/ZipStreamWrapper.php
+++ b/includes/PHPExcel-1.8.1/Classes/PHPExcel/Shared/ZipStreamWrapper.php
@@ -81,7 +81,7 @@ public static function register() {
*/
public function stream_open($path, $mode, $options, &$opened_path) {
// Check for mode
- if ($mode{0} != 'r') {
+ if ($mode[0] != 'r') {
throw new PHPExcel_Reader_Exception('Mode ' . $mode . ' is not supported. Only read mode is supported.');
}
diff --git a/includes/PHPExcel-1.8.1/Classes/PHPExcel/Worksheet/AutoFilter.php b/includes/PHPExcel-1.8.1/Classes/PHPExcel/Worksheet/AutoFilter.php
index 22c35748..839d29c5 100644
--- a/includes/PHPExcel-1.8.1/Classes/PHPExcel/Worksheet/AutoFilter.php
+++ b/includes/PHPExcel-1.8.1/Classes/PHPExcel/Worksheet/AutoFilter.php
@@ -730,7 +730,7 @@ public function showHideRows()
);
} else {
// Date based
- if ($dynamicRuleType{0} == 'M' || $dynamicRuleType{0} == 'Q') {
+ if ($dynamicRuleType[0] == 'M' || $dynamicRuleType[0] == 'Q') {
// Month or Quarter
sscanf($dynamicRuleType,'%[A-Z]%d', $periodType, $period);
if ($periodType == 'M') {
diff --git a/includes/PHPExcel-1.8.1/Classes/PHPExcel/Writer/Excel5/Parser.php b/includes/PHPExcel-1.8.1/Classes/PHPExcel/Writer/Excel5/Parser.php
index bc6ddb13..b3ba358d 100644
--- a/includes/PHPExcel-1.8.1/Classes/PHPExcel/Writer/Excel5/Parser.php
+++ b/includes/PHPExcel-1.8.1/Classes/PHPExcel/Writer/Excel5/Parser.php
@@ -1021,7 +1021,7 @@ function _cellToRowcol($cell)
$col = 0;
$col_ref_length = strlen($col_ref);
for ($i = 0; $i < $col_ref_length; ++$i) {
- $col += (ord($col_ref{$i}) - 64) * pow(26, $expn);
+ $col += (ord($col_ref[$i]) - 64) * pow(26, $expn);
--$expn;
}
@@ -1043,28 +1043,28 @@ function _advance()
$formula_length = strlen($this->_formula);
// eat up white spaces
if ($i < $formula_length) {
- while ($this->_formula{$i} == " ") {
+ while ($this->_formula[$i] == " ") {
++$i;
}
if ($i < ($formula_length - 1)) {
- $this->_lookahead = $this->_formula{$i+1};
+ $this->_lookahead = $this->_formula[$i+1];
}
$token = '';
}
while ($i < $formula_length) {
- $token .= $this->_formula{$i};
+ $token .= $this->_formula[$i];
if ($i < ($formula_length - 1)) {
- $this->_lookahead = $this->_formula{$i+1};
+ $this->_lookahead = $this->_formula[$i+1];
} else {
$this->_lookahead = '';
}
if ($this->_match($token) != '') {
//if ($i < strlen($this->_formula) - 1) {
- // $this->_lookahead = $this->_formula{$i+1};
+ // $this->_lookahead = $this->_formula[$i+1];
//}
$this->_current_char = $i + 1;
$this->_current_token = $token;
@@ -1072,7 +1072,7 @@ function _advance()
}
if ($i < ($formula_length - 2)) {
- $this->_lookahead = $this->_formula{$i+2};
+ $this->_lookahead = $this->_formula[$i+2];
} else { // if we run out of characters _lookahead becomes empty
$this->_lookahead = '';
}
@@ -1205,7 +1205,7 @@ function parse($formula)
{
$this->_current_char = 0;
$this->_formula = $formula;
- $this->_lookahead = isset($formula{1}) ? $formula{1} : '';
+ $this->_lookahead = isset($formula[1]) ? $formula[1] : '';
$this->_advance();
$this->_parse_tree = $this->_condition();
return true;
diff --git a/includes/PHPExcel-1.8.1/Classes/PHPExcel/Writer/Excel5/Workbook.php b/includes/PHPExcel-1.8.1/Classes/PHPExcel/Writer/Excel5/Workbook.php
index ecfac5dc..31b1be8b 100644
--- a/includes/PHPExcel-1.8.1/Classes/PHPExcel/Writer/Excel5/Workbook.php
+++ b/includes/PHPExcel-1.8.1/Classes/PHPExcel/Writer/Excel5/Workbook.php
@@ -675,7 +675,7 @@ private function _writeAllDefinedNamesBiff8()
$formulaData = $this->_parser->toReversePolish();
// make sure tRef3d is of type tRef3dR (0x3A)
- if (isset($formulaData{0}) and ($formulaData{0} == "\x7A" or $formulaData{0} == "\x5A")) {
+ if (isset($formulaData[0]) and ($formulaData[0] == "\x7A" or $formulaData[0] == "\x5A")) {
$formulaData = "\x3A" . substr($formulaData, 1);
}
diff --git a/includes/PHPExcel-1.8.1/Classes/PHPExcel/Writer/Excel5/Worksheet.php b/includes/PHPExcel-1.8.1/Classes/PHPExcel/Writer/Excel5/Worksheet.php
index fb75499b..76456cbf 100644
--- a/includes/PHPExcel-1.8.1/Classes/PHPExcel/Writer/Excel5/Worksheet.php
+++ b/includes/PHPExcel-1.8.1/Classes/PHPExcel/Writer/Excel5/Worksheet.php
@@ -904,7 +904,7 @@ private function _writeFormula($row, $col, $formula, $xfIndex, $calculatedValue)
$unknown = 0x0000; // Must be zero
// Strip the '=' or '@' sign at the beginning of the formula string
- if ($formula{0} == '=') {
+ if ($formula[0] == '=') {
$formula = substr($formula,1);
} else {
// Error handling
diff --git a/includes/PHPExcel-1.8.1/unitTests/custom/complexAssert.php b/includes/PHPExcel-1.8.1/unitTests/custom/complexAssert.php
index 5b813d25..fe978f6c 100644
--- a/includes/PHPExcel-1.8.1/unitTests/custom/complexAssert.php
+++ b/includes/PHPExcel-1.8.1/unitTests/custom/complexAssert.php
@@ -9,7 +9,7 @@ class complexAssert {
public function assertComplexEquals($expected, $actual, $delta = 0)
{
- if ($expected{0} === '#') {
+ if ($expected[0] === '#') {
// Expecting an error, so we do a straight string comparison
if ($expected === $actual) {
return TRUE;
diff --git a/includes/PHPExcel-1.8.1/unitTests/testDataFileIterator.php b/includes/PHPExcel-1.8.1/unitTests/testDataFileIterator.php
index 9eabe09d..170f5966 100644
--- a/includes/PHPExcel-1.8.1/unitTests/testDataFileIterator.php
+++ b/includes/PHPExcel-1.8.1/unitTests/testDataFileIterator.php
@@ -51,7 +51,7 @@ private function _parseNextDataset()
do {
// Only take lines that contain test data and that aren't commented out
$testDataRow = trim(fgets($this->file));
- } while (($testDataRow > '') && ($testDataRow{0} === '#'));
+ } while (($testDataRow > '') && ($testDataRow[0] === '#'));
// Discard any comments at the end of the line
list($testData) = explode('//',$testDataRow);
diff --git a/includes/S3-0.4.0/S3.php b/includes/S3-0.4.0/S3.php
index 4d2fd01e..e12e961b 100644
--- a/includes/S3-0.4.0/S3.php
+++ b/includes/S3-0.4.0/S3.php
@@ -794,7 +794,7 @@ public static function getHttpUploadPostParams($bucket, $uriPrefix = '', $acl =
}
array_push($policy->conditions, array('content-length-range', 0, $maxFileSize));
$policy = base64_encode(str_replace('\/', '/', json_encode($policy)));
-
+
// Create parameters
$params = new stdClass;
$params->AWSAccessKeyId = self::$__accessKey;
@@ -1355,7 +1355,7 @@ private function __responseHeaderCallback(&$curl, &$data) {
elseif ($header == 'Content-Type')
$this->response->headers['type'] = $value;
elseif ($header == 'ETag')
- $this->response->headers['hash'] = $value{0} == '"' ? substr($value, 1, -1) : $value;
+ $this->response->headers['hash'] = $value[0] == '"' ? substr($value, 1, -1) : $value;
elseif (preg_match('/^x-amz-meta-.*$/', $header))
$this->response->headers[$header] = is_numeric($value) ? (int)$value : $value;
}
diff --git a/includes/aws/sdk-1.5.7/_samples/lib/ProgressBar.php b/includes/aws/sdk-1.5.7/_samples/lib/ProgressBar.php
index 72f30407..0eca7e95 100644
--- a/includes/aws/sdk-1.5.7/_samples/lib/ProgressBar.php
+++ b/includes/aws/sdk-1.5.7/_samples/lib/ProgressBar.php
@@ -33,7 +33,7 @@
* @author Stefan Walk
* @license MIT License
*/
-
+
class Console_ProgressBar {
// properties {{{
@@ -75,9 +75,9 @@ class Console_ProgressBar {
*/
var $_last_update_time = 0.0;
// }}}
-
+
// constructor() {{{
- /**
+ /**
* Constructor, sets format and size
*
* See the reset() method for documentation.
@@ -89,11 +89,11 @@ class Console_ProgressBar {
* @param float The target number for the bar
* @param array Options for the progress bar
* @see reset
- */
- function Console_ProgressBar($formatstring, $bar, $prefill, $width,
- $target_num, $options = array())
+ */
+ function Console_ProgressBar($formatstring, $bar, $prefill, $width,
+ $target_num, $options = array())
{
- $this->reset($formatstring, $bar, $prefill, $width, $target_num,
+ $this->reset($formatstring, $bar, $prefill, $width, $target_num,
$options);
}
// }}}
@@ -154,7 +154,7 @@ function Console_ProgressBar($formatstring, $bar, $prefill, $width,
* | | possible.
* fraction_pad | ' ' | Character to use when padding max and
* | | current number to a fixed size.
- * | | Senseful values are ' ' and '0', but
+ * | | Senseful values are ' ' and '0', but
* | | any are possible.
* width_absolute | true | If the width passed as an argument
* | | should mean the total size (true) or
@@ -165,10 +165,10 @@ function Console_ProgressBar($formatstring, $bar, $prefill, $width,
* | | problems with some terminal emulators,
* | | for example Eterm.
* ansi_clear | false | If the bar should be cleared everytime
- * num_datapoints | 5 | How many datapoints to use to create
- * | | the estimated remaining time
+ * num_datapoints | 5 | How many datapoints to use to create
+ * | | the estimated remaining time
* min_draw_interval | 0.0 | If the last call to update() was less
- * | | than this amount of seconds ago,
+ * | | than this amount of seconds ago,
* | | don't update.
*
*
@@ -180,8 +180,8 @@ function Console_ProgressBar($formatstring, $bar, $prefill, $width,
* @param array Options for the progress bar
* @return bool
*/
- function reset($formatstring, $bar, $prefill, $width, $target_num,
- $options = array())
+ function reset($formatstring, $bar, $prefill, $width, $target_num,
+ $options = array())
{
if ($target_num == 0) {
trigger_error("PEAR::Console_ProgressBar: Using a target number equal to 0 is invalid, setting to 1 instead");
@@ -211,9 +211,9 @@ function reset($formatstring, $bar, $prefill, $width, $target_num,
}
$this->_options = $options = $intopts;
// placeholder
- $cur = '%2$\''.$options['fraction_pad']{0}.strlen((int)$target_num).'.'
+ $cur = '%2$\''.$options['fraction_pad'][0].strlen((int)$target_num).'.'
.$options['fraction_precision'].'f';
- $max = $cur; $max{1} = 3;
+ $max = $cur; $max[1] = 3;
// pre php-4.3.7 %3.2f meant 3 characters before . and two after
// php-4.3.7 and later it means 3 characters for the whole number
if (version_compare(PHP_VERSION, '4.3.7', 'ge')) {
@@ -221,9 +221,9 @@ function reset($formatstring, $bar, $prefill, $width, $target_num,
} else {
$padding = 3;
}
- $perc = '%4$\''.$options['percent_pad']{0}.$padding.'.'
+ $perc = '%4$\''.$options['percent_pad'][0].$padding.'.'
.$options['percent_precision'].'f';
-
+
$transitions = array(
'%%' => '%%',
'%fraction%' => $cur.'/'.$max,
@@ -234,7 +234,7 @@ function reset($formatstring, $bar, $prefill, $width, $target_num,
'%elapsed%' => '%5$s',
'%estimate%' => '%6$s',
);
-
+
$this->_skeleton = strtr($formatstring, $transitions);
$slen = strlen(sprintf($this->_skeleton, '', 0, 0, 0, '00:00:00','00:00:00'));
@@ -247,7 +247,7 @@ function reset($formatstring, $bar, $prefill, $width, $target_num,
$blen = $width;
}
- $lbar = str_pad($bar, $blen, $bar{0}, STR_PAD_LEFT);
+ $lbar = str_pad($bar, $blen, $bar[0], STR_PAD_LEFT);
$rbar = str_pad($prefill, $blen, substr($prefill, -1, 1));
$this->_bar = substr($lbar,-$blen).substr($rbar,0,$blen);
@@ -259,7 +259,7 @@ function reset($formatstring, $bar, $prefill, $width, $target_num,
return true;
}
// }}}
-
+
// {{{ update($current)
/**
* Updates the bar with new progress information
@@ -280,7 +280,7 @@ function update($current)
$this->display($current);
return;
}
- if ($time - $this->_last_update_time <
+ if ($time - $this->_last_update_time <
$this->_options['min_draw_interval'] and $current != $this->_target_num) {
return;
}
@@ -289,7 +289,7 @@ function update($current)
$this->_last_update_time = $time;
}
// }}}
-
+
// {{{ display($current)
/**
* Prints the bar. Usually, you don't need this method, just use update()
@@ -299,7 +299,7 @@ function update($current)
* @param int current position of the progress counter
* @return bool
*/
- function display($current)
+ function display($current)
{
$percent = $current / $this->_target_num;
$filled = round($percent * $this->_blen);
@@ -308,7 +308,7 @@ function display($current)
$this->_fetchTime() - $this->_start_time
);
$estimate = $this->_formatSeconds($this->_generateEstimate());
- $this->_rlen = printf($this->_skeleton,
+ $this->_rlen = printf($this->_skeleton,
$visbar, $current, $this->_target_num, $percent * 100, $elapsed,
$estimate
);
@@ -319,7 +319,7 @@ function display($current)
} elseif ($this->_rlen < $this->_tlen) {
echo str_repeat(' ', $this->_tlen - $this->_rlen);
$this->_rlen = $this->_tlen;
- }
+ }
return true;
}
// }}}
@@ -332,7 +332,7 @@ function display($current)
* cursor position
* @return bool
*/
- function erase($clear = false)
+ function erase($clear = false)
{
if ($this->_options['ansi_terminal'] and !$clear) {
if ($this->_options['ansi_clear']) {
@@ -357,7 +357,7 @@ function erase($clear = false)
* @param float The number of seconds
* @return string
*/
- function _formatSeconds($seconds)
+ function _formatSeconds($seconds)
{
$hou = floor($seconds/3600);
$min = floor(($seconds - $hou * 3600) / 60);
@@ -388,7 +388,7 @@ function _fetchTime() {
}
function _addDatapoint($val, $time) {
- if (count($this->_rate_datapoints)
+ if (count($this->_rate_datapoints)
== $this->_options['num_datapoints']) {
array_shift($this->_rate_datapoints);
}
diff --git a/includes/dataTables-1.7.3/media/unit_testing/controller.php b/includes/dataTables-1.7.3/media/unit_testing/controller.php
index 83cc7440..d19dd3f1 100644
--- a/includes/dataTables-1.7.3/media/unit_testing/controller.php
+++ b/includes/dataTables-1.7.3/media/unit_testing/controller.php
@@ -1,16 +1,16 @@
DataTables unit test controller
-
+
-
+