2
0
mirror of https://github.com/ACSPRI/queXS synced 2024-04-02 12:12:16 +00:00

Merging the Limesurvey 1.91+ branch of queXS in to the trunk

This commit is contained in:
azammitdcarf
2011-09-08 01:58:41 +00:00
parent dfa55a3b9e
commit eaa9578ab8
2312 changed files with 811461 additions and 597534 deletions

View File

@@ -24,100 +24,100 @@ require_once($homedir.'/classes/pear/PEAR.php');
require_once($homedir.'/classes/pear/OLE/OLE.php');
/**
* Class for creating PPS's for OLE containers
*
* @author Xavier Noguer <xnoguer@php.net>
* @category Structures
* @package OLE
*/
* Class for creating PPS's for OLE containers
*
* @author Xavier Noguer <xnoguer@php.net>
* @category Structures
* @package OLE
*/
class OLE_PPS extends PEAR
{
/**
* The PPS index
* @var integer
*/
* The PPS index
* @var integer
*/
var $No;
/**
* The PPS name (in Unicode)
* @var string
*/
* The PPS name (in Unicode)
* @var string
*/
var $Name;
/**
* The PPS type. Dir, Root or File
* @var integer
*/
* The PPS type. Dir, Root or File
* @var integer
*/
var $Type;
/**
* The index of the previous PPS
* @var integer
*/
* The index of the previous PPS
* @var integer
*/
var $PrevPps;
/**
* The index of the next PPS
* @var integer
*/
* The index of the next PPS
* @var integer
*/
var $NextPps;
/**
* The index of it's first child if this is a Dir or Root PPS
* @var integer
*/
* The index of it's first child if this is a Dir or Root PPS
* @var integer
*/
var $DirPps;
/**
* A timestamp
* @var integer
*/
* A timestamp
* @var integer
*/
var $Time1st;
/**
* A timestamp
* @var integer
*/
* A timestamp
* @var integer
*/
var $Time2nd;
/**
* Starting block (small or big) for this PPS's data inside the container
* @var integer
*/
* Starting block (small or big) for this PPS's data inside the container
* @var integer
*/
var $_StartBlock;
/**
* The size of the PPS's data (in bytes)
* @var integer
*/
* The size of the PPS's data (in bytes)
* @var integer
*/
var $Size;
/**
* The PPS's data (only used if it's not using a temporary file)
* @var string
*/
* The PPS's data (only used if it's not using a temporary file)
* @var string
*/
var $_data;
/**
* Array of child PPS's (only used by Root and Dir PPS's)
* @var array
*/
* Array of child PPS's (only used by Root and Dir PPS's)
* @var array
*/
var $children = array();
/**
* The constructor
*
* @access public
* @param integer $No The PPS index
* @param string $name The PPS name (in Unicode)
* @param integer $type The PPS type. Dir, Root or File
* @param integer $prev The index of the previous PPS
* @param integer $next The index of the next PPS
* @param integer $dir The index of it's first child if this is a Dir or Root PPS
* @param integer $time_1st A timestamp
* @param integer $time_2nd A timestamp
* @param array $children Array containing children PPS for this PPS
*/
* The constructor
*
* @access public
* @param integer $No The PPS index
* @param string $name The PPS name (in Unicode)
* @param integer $type The PPS type. Dir, Root or File
* @param integer $prev The index of the previous PPS
* @param integer $next The index of the next PPS
* @param integer $dir The index of it's first child if this is a Dir or Root PPS
* @param integer $time_1st A timestamp
* @param integer $time_2nd A timestamp
* @param array $children Array containing children PPS for this PPS
*/
function OLE_PPS($No, $name, $type, $prev, $next, $dir, $time_1st, $time_2nd, $data, $children)
{
$this->No = $No;
@@ -139,11 +139,11 @@ class OLE_PPS extends PEAR
}
/**
* Returns the amount of data saved for this PPS
*
* @access private
* @return integer The amount of data (in bytes)
*/
* Returns the amount of data saved for this PPS
*
* @access private
* @return integer The amount of data (in bytes)
*/
function _DataLen()
{
if (!isset($this->_data)) {
@@ -161,11 +161,11 @@ class OLE_PPS extends PEAR
}
/**
* Returns a string with the PPS's WK (What is a WK?)
*
* @access private
* @return string The binary string
*/
* Returns a string with the PPS's WK (What is a WK?)
*
* @access private
* @return string The binary string
*/
function _getPpsWk()
{
$ret = $this->Name;
@@ -173,35 +173,35 @@ class OLE_PPS extends PEAR
$ret .= "\x00";
}
$ret .= pack("v", strlen($this->Name) + 2) // 66
. pack("c", $this->Type) // 67
. pack("c", 0x00) //UK // 68
. pack("V", $this->PrevPps) //Prev // 72
. pack("V", $this->NextPps) //Next // 76
. pack("V", $this->DirPps) //Dir // 80
. "\x00\x09\x02\x00" // 84
. "\x00\x00\x00\x00" // 88
. "\xc0\x00\x00\x00" // 92
. "\x00\x00\x00\x46" // 96 // Seems to be ok only for Root
. "\x00\x00\x00\x00" // 100
. OLE::LocalDate2OLE($this->Time1st) // 108
. OLE::LocalDate2OLE($this->Time2nd) // 116
. pack("V", isset($this->_StartBlock)?
$this->_StartBlock:0) // 120
. pack("V", $this->Size) // 124
. pack("V", 0); // 128
. pack("c", $this->Type) // 67
. pack("c", 0x00) //UK // 68
. pack("V", $this->PrevPps) //Prev // 72
. pack("V", $this->NextPps) //Next // 76
. pack("V", $this->DirPps) //Dir // 80
. "\x00\x09\x02\x00" // 84
. "\x00\x00\x00\x00" // 88
. "\xc0\x00\x00\x00" // 92
. "\x00\x00\x00\x46" // 96 // Seems to be ok only for Root
. "\x00\x00\x00\x00" // 100
. OLE::LocalDate2OLE($this->Time1st) // 108
. OLE::LocalDate2OLE($this->Time2nd) // 116
. pack("V", isset($this->_StartBlock)?
$this->_StartBlock:0) // 120
. pack("V", $this->Size) // 124
. pack("V", 0); // 128
return $ret;
}
/**
* Updates index and pointers to previous, next and children PPS's for this
* PPS. I don't think it'll work with Dir PPS's.
*
* @access private
* @param array &$pps_array Reference to the array of PPS's for the whole OLE
* container
* @return integer The index for this PPS
*/
function _savePpsSetPnt(&$pps_array)
* Updates index and pointers to previous, next and children PPS's for this
* PPS. I don't think it'll work with Dir PPS's.
*
* @access private
* @param array &$pps_array Reference to the array of PPS's for the whole OLE
* container
* @return integer The index for this PPS
*/
function _savePpsSetPnt(&$pps_array)
{
$pps_array[count($pps_array)] = &$this;
$this->No = count($pps_array) - 1;