Got rid of copyright notice in files, we will just have one that covers all files at the root of the package. Converted comments to Phpdocumentor format. Added @author, @version, @package, and @subpackage doc tags. Reformatted code to Campware PHP coding conventions.
This commit is contained in:
parent
ed31251b46
commit
8d5bc9f865
21 changed files with 375 additions and 720 deletions
|
@ -1,33 +1,4 @@
|
||||||
<?php
|
<?php
|
||||||
/*------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Copyright (c) 2004 Media Development Loan Fund
|
|
||||||
|
|
||||||
This file is part of the Campcaster project.
|
|
||||||
http://campcaster.campware.org/
|
|
||||||
To report bugs, send an e-mail to bugs@campware.org
|
|
||||||
|
|
||||||
Campcaster is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
Campcaster 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 General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with Campcaster; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
|
|
||||||
Author : $Author$
|
|
||||||
Version : $Revision$
|
|
||||||
Location : $URL$
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
require_once 'subj.php';
|
require_once 'subj.php';
|
||||||
|
|
||||||
define('USE_ALIB_CLASSES', TRUE);
|
define('USE_ALIB_CLASSES', TRUE);
|
||||||
|
@ -37,10 +8,12 @@ define('ALIBERR_NOTEXISTS', 31);
|
||||||
/**
|
/**
|
||||||
* Alib class
|
* Alib class
|
||||||
*
|
*
|
||||||
* authentication/authorization class
|
* Authentication/authorization class
|
||||||
*
|
*
|
||||||
* @author $Author$
|
* @author $Author$
|
||||||
* @version $Revision$
|
* @version $Revision$
|
||||||
|
* @package Campcaster
|
||||||
|
* @subpackage Alib
|
||||||
* @see Subjects
|
* @see Subjects
|
||||||
* @see GreenBox
|
* @see GreenBox
|
||||||
*/
|
*/
|
||||||
|
@ -54,7 +27,7 @@ class Alib extends Subjects{
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param object $dbc DB
|
* @param DB $dbc
|
||||||
* @param array $config
|
* @param array $config
|
||||||
*/
|
*/
|
||||||
function Alib(&$dbc, $config)
|
function Alib(&$dbc, $config)
|
||||||
|
@ -74,7 +47,8 @@ class Alib extends Subjects{
|
||||||
*
|
*
|
||||||
* @param string $login
|
* @param string $login
|
||||||
* @param string $pass
|
* @param string $pass
|
||||||
* @return boolean/sessionId/err
|
* @return mixed
|
||||||
|
* boolean/sessionId/err
|
||||||
*/
|
*/
|
||||||
function login($login, $pass)
|
function login($login, $pass)
|
||||||
{
|
{
|
||||||
|
@ -166,11 +140,15 @@ class Alib extends Subjects{
|
||||||
/**
|
/**
|
||||||
* Insert permission record
|
* Insert permission record
|
||||||
*
|
*
|
||||||
* @param int $sid - local user/group id
|
* @param int $sid
|
||||||
|
* local user/group id
|
||||||
* @param string $action
|
* @param string $action
|
||||||
* @param int $oid - local object id
|
* @param int $oid
|
||||||
* @param string $type - 'A'|'D' (allow/deny)
|
* local object id
|
||||||
* @return int - local permission id
|
* @param string $type
|
||||||
|
* 'A'|'D' (allow/deny)
|
||||||
|
* @return int
|
||||||
|
* local permission id
|
||||||
*/
|
*/
|
||||||
function addPerm($sid, $action, $oid, $type='A')
|
function addPerm($sid, $action, $oid, $type='A')
|
||||||
{
|
{
|
||||||
|
@ -188,9 +166,12 @@ class Alib extends Subjects{
|
||||||
/**
|
/**
|
||||||
* Remove permission record
|
* Remove permission record
|
||||||
*
|
*
|
||||||
* @param int $permid OPT - local permission id
|
* @param int $permid
|
||||||
* @param int $subj OPT - local user/group id
|
* (optional) local permission id
|
||||||
* @param int $obj OPT - local object id
|
* @param int $subj
|
||||||
|
* (optional) local user/group id
|
||||||
|
* @param int $obj
|
||||||
|
* (optional) local object id
|
||||||
* @return boolean/error
|
* @return boolean/error
|
||||||
*/
|
*/
|
||||||
function removePerm($permid=NULL, $subj=NULL, $obj=NULL)
|
function removePerm($permid=NULL, $subj=NULL, $obj=NULL)
|
||||||
|
@ -217,8 +198,10 @@ class Alib extends Subjects{
|
||||||
/**
|
/**
|
||||||
* Return object related with permission record
|
* Return object related with permission record
|
||||||
*
|
*
|
||||||
* @param int $permid - local permission id
|
* @param int $permid
|
||||||
* @return int - local object id
|
* local permission id
|
||||||
|
* @return int
|
||||||
|
* local object id
|
||||||
*/
|
*/
|
||||||
function _getPermOid($permid)
|
function _getPermOid($permid)
|
||||||
{
|
{
|
||||||
|
@ -242,10 +225,14 @@ class Alib extends Subjects{
|
||||||
* object-tree-related.
|
* object-tree-related.
|
||||||
* Support for object classes can be disabled by USE_ALIB_CLASSES const.
|
* Support for object classes can be disabled by USE_ALIB_CLASSES const.
|
||||||
*
|
*
|
||||||
* @param int $sid, subject id (user or group id)
|
* @param int $sid
|
||||||
* @param string $action, from set defined in config
|
* subject id (user or group id)
|
||||||
* @param int $oid, object id, optional (default: root node)
|
* @param string $action
|
||||||
* @return boolean/err
|
* from set defined in config
|
||||||
|
* @param int $oid
|
||||||
|
* object id, optional (default: root node)
|
||||||
|
* @return mixed
|
||||||
|
* boolean/err
|
||||||
*/
|
*/
|
||||||
function checkPerm($sid, $action, $oid=NULL)
|
function checkPerm($sid, $action, $oid=NULL)
|
||||||
{
|
{
|
||||||
|
@ -335,7 +322,8 @@ class Alib extends Subjects{
|
||||||
* Remove all permissions on object and then remove object itself
|
* Remove all permissions on object and then remove object itself
|
||||||
*
|
*
|
||||||
* @param int $id
|
* @param int $id
|
||||||
* @return void/error
|
* @return mixed
|
||||||
|
* void/error
|
||||||
*/
|
*/
|
||||||
function removeObj($id)
|
function removeObj($id)
|
||||||
{
|
{
|
||||||
|
@ -352,7 +340,8 @@ class Alib extends Subjects{
|
||||||
* Remove all permissions of subject and then remove subject itself
|
* Remove all permissions of subject and then remove subject itself
|
||||||
*
|
*
|
||||||
* @param string $login
|
* @param string $login
|
||||||
* @return void/error
|
* @return mixed
|
||||||
|
* void/error
|
||||||
*/
|
*/
|
||||||
function removeSubj($login)
|
function removeSubj($login)
|
||||||
{
|
{
|
||||||
|
@ -371,6 +360,7 @@ class Alib extends Subjects{
|
||||||
return parent::removeSubj($login, $uid);
|
return parent::removeSubj($login, $uid);
|
||||||
} // fn removeSubj
|
} // fn removeSubj
|
||||||
|
|
||||||
|
|
||||||
/* ------------------------------------------------------------- sessions */
|
/* ------------------------------------------------------------- sessions */
|
||||||
/**
|
/**
|
||||||
* Get login from session id (token)
|
* Get login from session id (token)
|
||||||
|
@ -515,8 +505,10 @@ class Alib extends Subjects{
|
||||||
/**
|
/**
|
||||||
* Dump all permissions for debug
|
* Dump all permissions for debug
|
||||||
*
|
*
|
||||||
* @param string $indstr // indentation string
|
* @param string $indstr
|
||||||
* @param string $ind // actual indentation
|
* indentation string
|
||||||
|
* @param string $ind
|
||||||
|
* actual indentation
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function dumpPerms($indstr=' ', $ind='')
|
function dumpPerms($indstr=' ', $ind='')
|
||||||
|
|
|
@ -1,47 +1,22 @@
|
||||||
<?php
|
<?php
|
||||||
/*------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Copyright (c) 2004 Media Development Loan Fund
|
|
||||||
|
|
||||||
This file is part of the Campcaster project.
|
|
||||||
http://campcaster.campware.org/
|
|
||||||
To report bugs, send an e-mail to bugs@campware.org
|
|
||||||
|
|
||||||
Campcaster is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
Campcaster 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 General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with Campcaster; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
|
|
||||||
Author : $Author$
|
|
||||||
Version : $Revision$
|
|
||||||
Location : $URL$
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
|
||||||
require_once "m2tree.php";
|
require_once "m2tree.php";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ObjClass class
|
* ObjClass class
|
||||||
*
|
*
|
||||||
* class for 'object classes' handling - i.e. groups of object in tree
|
* A class for 'object classes' handling - i.e. groups of object in tree
|
||||||
*
|
*
|
||||||
* @author $Author$
|
* @author $Author$
|
||||||
* @version $Revision$
|
* @version $Revision$
|
||||||
|
* @package Campcaster
|
||||||
|
* @subpackage Alib
|
||||||
* @see Mtree
|
* @see Mtree
|
||||||
* @see Subj
|
* @see Subj
|
||||||
*/
|
*/
|
||||||
class ObjClasses extends M2tree{
|
class ObjClasses extends M2tree{
|
||||||
var $classTable;
|
var $classTable;
|
||||||
var $cmembTable;
|
var $cmembTable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
|
@ -56,6 +31,7 @@ class ObjClasses extends M2tree{
|
||||||
$this->cmembTable = $config['tblNamePrefix'].'cmemb';
|
$this->cmembTable = $config['tblNamePrefix'].'cmemb';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ======================================================= public methods */
|
/* ======================================================= public methods */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -67,15 +43,20 @@ class ObjClasses extends M2tree{
|
||||||
function addClass($cname)
|
function addClass($cname)
|
||||||
{
|
{
|
||||||
$id = $this->dbc->nextId("{$this->treeTable}_id_seq");
|
$id = $this->dbc->nextId("{$this->treeTable}_id_seq");
|
||||||
if(PEAR::isError($id)) return $id;
|
if (PEAR::isError($id)) {
|
||||||
|
return $id;
|
||||||
|
}
|
||||||
$r = $this->dbc->query("
|
$r = $this->dbc->query("
|
||||||
INSERT INTO {$this->classTable} (id, cname)
|
INSERT INTO {$this->classTable} (id, cname)
|
||||||
VALUES ($id, '$cname')
|
VALUES ($id, '$cname')
|
||||||
");
|
");
|
||||||
if(PEAR::isError($r)) return $r;
|
if (PEAR::isError($r)) {
|
||||||
|
return $r;
|
||||||
|
}
|
||||||
return $id;
|
return $id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove class by name
|
* Remove class by name
|
||||||
*
|
*
|
||||||
|
@ -85,10 +66,13 @@ class ObjClasses extends M2tree{
|
||||||
function removeClass($cname)
|
function removeClass($cname)
|
||||||
{
|
{
|
||||||
$cid = $this->getClassId($cname);
|
$cid = $this->getClassId($cname);
|
||||||
if(PEAR::isError($cid)) return($cid);
|
if (PEAR::isError($cid)) {
|
||||||
|
return($cid);
|
||||||
|
}
|
||||||
return $this->removeClassById($cid);
|
return $this->removeClassById($cid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove class by id
|
* Remove class by id
|
||||||
*
|
*
|
||||||
|
@ -99,13 +83,18 @@ class ObjClasses extends M2tree{
|
||||||
{
|
{
|
||||||
$r = $this->dbc->query("DELETE FROM {$this->cmembTable}
|
$r = $this->dbc->query("DELETE FROM {$this->cmembTable}
|
||||||
WHERE cid=$cid");
|
WHERE cid=$cid");
|
||||||
if(PEAR::isError($r)) return $r;
|
if (PEAR::isError($r)) {
|
||||||
|
return $r;
|
||||||
|
}
|
||||||
$r = $this->dbc->query("DELETE FROM {$this->classTable}
|
$r = $this->dbc->query("DELETE FROM {$this->classTable}
|
||||||
WHERE id=$cid");
|
WHERE id=$cid");
|
||||||
if(PEAR::isError($r)) return $r;
|
if (PEAR::isError($r)) {
|
||||||
|
return $r;
|
||||||
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add object to class
|
* Add object to class
|
||||||
*
|
*
|
||||||
|
@ -117,10 +106,13 @@ class ObjClasses extends M2tree{
|
||||||
{
|
{
|
||||||
$r = $this->dbc->query("INSERT INTO {$this->cmembTable} (cid, objid)
|
$r = $this->dbc->query("INSERT INTO {$this->cmembTable} (cid, objid)
|
||||||
VALUES ($cid, $oid)");
|
VALUES ($cid, $oid)");
|
||||||
if(PEAR::isError($r)) return $r;
|
if (PEAR::isError($r)) {
|
||||||
|
return $r;
|
||||||
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove object from class
|
* Remove object from class
|
||||||
*
|
*
|
||||||
|
@ -132,10 +124,13 @@ class ObjClasses extends M2tree{
|
||||||
{
|
{
|
||||||
$r = $this->dbc->query("DELETE FROM {$this->cmembTable}
|
$r = $this->dbc->query("DELETE FROM {$this->cmembTable}
|
||||||
WHERE objid=$oid".(is_null($cid)? '':" AND cid=$cid"));
|
WHERE objid=$oid".(is_null($cid)? '':" AND cid=$cid"));
|
||||||
if(PEAR::isError($r)) return $r;
|
if (PEAR::isError($r)) {
|
||||||
|
return $r;
|
||||||
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------- object tree */
|
/* ---------------------------------------------------------- object tree */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -147,10 +142,13 @@ class ObjClasses extends M2tree{
|
||||||
function removeObj($id)
|
function removeObj($id)
|
||||||
{
|
{
|
||||||
$r = $this->removeObjFromClass($id);
|
$r = $this->removeObjFromClass($id);
|
||||||
if(PEAR::isError($r)) return $r;
|
if (PEAR::isError($r)) {
|
||||||
|
return $r;
|
||||||
|
}
|
||||||
return parent::removeObj($id);
|
return parent::removeObj($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* --------------------------------------------------------- info methods */
|
/* --------------------------------------------------------- info methods */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -166,6 +164,7 @@ class ObjClasses extends M2tree{
|
||||||
WHERE cname='$cname'");
|
WHERE cname='$cname'");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get class name from id
|
* Get class name from id
|
||||||
*
|
*
|
||||||
|
@ -178,6 +177,7 @@ class ObjClasses extends M2tree{
|
||||||
$query = "SELECT cname FROM {$this->classTable} WHERE id=$id");
|
$query = "SELECT cname FROM {$this->classTable} WHERE id=$id");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return true is object is class
|
* Return true is object is class
|
||||||
*
|
*
|
||||||
|
@ -188,10 +188,13 @@ class ObjClasses extends M2tree{
|
||||||
{
|
{
|
||||||
$r = $this->dbc->getOne("SELECT count(*) FROM {$this->classTable}
|
$r = $this->dbc->getOne("SELECT count(*) FROM {$this->classTable}
|
||||||
WHERE id=$id");
|
WHERE id=$id");
|
||||||
if(PEAR::isError($r)) return $r;
|
if (PEAR::isError($r)) {
|
||||||
|
return $r;
|
||||||
|
}
|
||||||
return ($r > 0);
|
return ($r > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return all classes
|
* Return all classes
|
||||||
*
|
*
|
||||||
|
@ -202,6 +205,7 @@ class ObjClasses extends M2tree{
|
||||||
return $this->dbc->getAll("SELECT * FROM {$this->classTable}");
|
return $this->dbc->getAll("SELECT * FROM {$this->classTable}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return all objects in class
|
* Return all objects in class
|
||||||
*
|
*
|
||||||
|
@ -215,6 +219,7 @@ class ObjClasses extends M2tree{
|
||||||
WHERE cm.cid=$id AND cm.objid=t.id");
|
WHERE cm.cid=$id AND cm.objid=t.id");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* =============================================== test and debug methods */
|
/* =============================================== test and debug methods */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -237,6 +242,7 @@ class ObjClasses extends M2tree{
|
||||||
return $r;
|
return $r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete all classes and membeship records
|
* Delete all classes and membeship records
|
||||||
*
|
*
|
||||||
|
@ -247,6 +253,8 @@ class ObjClasses extends M2tree{
|
||||||
$this->dbc->query("DELETE FROM {$this->classTable}");
|
$this->dbc->query("DELETE FROM {$this->classTable}");
|
||||||
parent::reset();
|
parent::reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Insert test data
|
* Insert test data
|
||||||
*
|
*
|
||||||
|
@ -263,13 +271,16 @@ class ObjClasses extends M2tree{
|
||||||
$this->tdata['classes'] = $o;
|
$this->tdata['classes'] = $o;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Make basic test
|
* Make basic test
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
function test()
|
function test()
|
||||||
{
|
{
|
||||||
if(PEAR::isError($p = parent::test())) return $p;
|
if (PEAR::isError($p = parent::test())) {
|
||||||
|
return $p;
|
||||||
|
}
|
||||||
$this->deleteData();
|
$this->deleteData();
|
||||||
$this->testData();
|
$this->testData();
|
||||||
$this->test_correct = "Sections a (2), Class 2 (2)\n";
|
$this->test_correct = "Sections a (2), Class 2 (2)\n";
|
||||||
|
@ -282,11 +293,14 @@ class ObjClasses extends M2tree{
|
||||||
$this->deleteData();
|
$this->deleteData();
|
||||||
if ($this->test_dump==$this->test_correct) {
|
if ($this->test_dump==$this->test_correct) {
|
||||||
$this->test_log.="class: OK\n"; return TRUE;
|
$this->test_log.="class: OK\n"; return TRUE;
|
||||||
}else return PEAR::raiseError(
|
} else {
|
||||||
|
return PEAR::raiseError(
|
||||||
'ObjClasses::test:', 1, PEAR_ERROR_DIE, '%s'.
|
'ObjClasses::test:', 1, PEAR_ERROR_DIE, '%s'.
|
||||||
"<pre>\ncorrect:\n{$this->test_correct}\n".
|
"<pre>\ncorrect:\n{$this->test_correct}\n".
|
||||||
"dump:\n{$this->test_dump}\n</pre>\n");
|
"dump:\n{$this->test_dump}\n</pre>\n");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create tables + initialize
|
* Create tables + initialize
|
||||||
|
@ -311,6 +325,8 @@ class ObjClasses extends M2tree{
|
||||||
$this->dbc->query("CREATE UNIQUE INDEX {$this->cmembTable}_idx
|
$this->dbc->query("CREATE UNIQUE INDEX {$this->cmembTable}_idx
|
||||||
ON {$this->cmembTable} (objid, cid)");
|
ON {$this->cmembTable} (objid, cid)");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Drop tables etc.
|
* Drop tables etc.
|
||||||
*
|
*
|
||||||
|
@ -321,5 +337,5 @@ class ObjClasses extends M2tree{
|
||||||
$this->dbc->query("DROP TABLE {$this->cmembTable}");
|
$this->dbc->query("DROP TABLE {$this->cmembTable}");
|
||||||
parent::uninstall();
|
parent::uninstall();
|
||||||
}
|
}
|
||||||
}
|
} // class ObjClasses
|
||||||
?>
|
?>
|
|
@ -1,32 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
/*------------------------------------------------------------------------------
|
/**
|
||||||
|
* @author $Author$
|
||||||
Copyright (c) 2004 Media Development Loan Fund
|
* @version $Revision$
|
||||||
|
*/
|
||||||
This file is part of the Campcaster project.
|
|
||||||
http://campcaster.campware.org/
|
|
||||||
To report bugs, send an e-mail to bugs@campware.org
|
|
||||||
|
|
||||||
Campcaster is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
Campcaster 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 General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with Campcaster; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
|
|
||||||
Author : $Author$
|
|
||||||
Version : $Revision$
|
|
||||||
Location : $URL$
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
|
||||||
require_once "alib_h.php";
|
require_once "alib_h.php";
|
||||||
require_once "alibExTestAuth.php";
|
require_once "alibExTestAuth.php";
|
||||||
|
|
||||||
|
|
|
@ -1,32 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
/*------------------------------------------------------------------------------
|
/**
|
||||||
|
* @author $Author$
|
||||||
Copyright (c) 2004 Media Development Loan Fund
|
* @version $Revision$
|
||||||
|
*/
|
||||||
This file is part of the Campcaster project.
|
|
||||||
http://campcaster.campware.org/
|
|
||||||
To report bugs, send an e-mail to bugs@campware.org
|
|
||||||
|
|
||||||
Campcaster is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
Campcaster 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 General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with Campcaster; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
|
|
||||||
Author : $Author$
|
|
||||||
Version : $Revision$
|
|
||||||
Location : $URL$
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
|
||||||
require_once "alib_h.php";
|
require_once "alib_h.php";
|
||||||
|
|
||||||
// prefill data structure for template
|
// prefill data structure for template
|
||||||
|
|
|
@ -1,32 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
/*------------------------------------------------------------------------------
|
/**
|
||||||
|
* @author $Author$
|
||||||
|
* @version $Revision$
|
||||||
|
*/
|
||||||
|
|
||||||
Copyright (c) 2004 Media Development Loan Fund
|
|
||||||
|
|
||||||
This file is part of the Campcaster project.
|
|
||||||
http://campcaster.campware.org/
|
|
||||||
To report bugs, send an e-mail to bugs@campware.org
|
|
||||||
|
|
||||||
Campcaster is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
Campcaster 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 General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with Campcaster; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
|
|
||||||
Author : $Author$
|
|
||||||
Version : $Revision$
|
|
||||||
Location : $URL$
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
|
||||||
require_once "alib_h.php";
|
require_once "alib_h.php";
|
||||||
require_once "alibExTestAuth.php";
|
require_once "alibExTestAuth.php";
|
||||||
|
|
||||||
|
|
|
@ -1,32 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
/*------------------------------------------------------------------------------
|
/**
|
||||||
|
* @author $Author$
|
||||||
Copyright (c) 2004 Media Development Loan Fund
|
* @version $Revision$
|
||||||
|
*/
|
||||||
This file is part of the Campcaster project.
|
|
||||||
http://campcaster.campware.org/
|
|
||||||
To report bugs, send an e-mail to bugs@campware.org
|
|
||||||
|
|
||||||
Campcaster is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
Campcaster 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 General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with Campcaster; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
|
|
||||||
Author : $Author$
|
|
||||||
Version : $Revision$
|
|
||||||
Location : $URL$
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
|
||||||
require_once "alib_h.php";
|
require_once "alib_h.php";
|
||||||
|
|
||||||
$sid=$_GET['subj'];
|
$sid=$_GET['subj'];
|
||||||
|
|
|
@ -1,32 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
/*------------------------------------------------------------------------------
|
/**
|
||||||
|
* @author $Author$
|
||||||
|
* @version $Revision$
|
||||||
|
*/
|
||||||
|
|
||||||
Copyright (c) 2004 Media Development Loan Fund
|
|
||||||
|
|
||||||
This file is part of the Campcaster project.
|
|
||||||
http://campcaster.campware.org/
|
|
||||||
To report bugs, send an e-mail to bugs@campware.org
|
|
||||||
|
|
||||||
Campcaster is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
Campcaster 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 General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with Campcaster; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
|
|
||||||
Author : $Author$
|
|
||||||
Version : $Revision$
|
|
||||||
Location : $URL$
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
|
||||||
require_once "alib_h.php";
|
require_once "alib_h.php";
|
||||||
require_once "alibExTestAuth.php";
|
require_once "alibExTestAuth.php";
|
||||||
|
|
||||||
|
|
|
@ -1,32 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
/*------------------------------------------------------------------------------
|
/**
|
||||||
|
* @author $Author$
|
||||||
|
* @version $Revision$
|
||||||
|
*/
|
||||||
|
|
||||||
Copyright (c) 2004 Media Development Loan Fund
|
|
||||||
|
|
||||||
This file is part of the Campcaster project.
|
|
||||||
http://campcaster.campware.org/
|
|
||||||
To report bugs, send an e-mail to bugs@campware.org
|
|
||||||
|
|
||||||
Campcaster is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
Campcaster 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 General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with Campcaster; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
|
|
||||||
Author : $Author$
|
|
||||||
Version : $Revision$
|
|
||||||
Location : $URL$
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
|
||||||
require_once "alib_h.php";
|
require_once "alib_h.php";
|
||||||
require_once "alibExTestAuth.php";
|
require_once "alibExTestAuth.php";
|
||||||
|
|
||||||
|
|
|
@ -1,36 +1,13 @@
|
||||||
<?php
|
<?php
|
||||||
/*------------------------------------------------------------------------------
|
/**
|
||||||
|
* @author $Author$
|
||||||
Copyright (c) 2004 Media Development Loan Fund
|
* @version $Revision$
|
||||||
|
*/
|
||||||
This file is part of the Campcaster project.
|
|
||||||
http://campcaster.campware.org/
|
|
||||||
To report bugs, send an e-mail to bugs@campware.org
|
|
||||||
|
|
||||||
Campcaster is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
Campcaster 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 General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with Campcaster; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
|
|
||||||
Author : $Author$
|
|
||||||
Version : $Revision$
|
|
||||||
Location : $URL$
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
|
||||||
$login = $alib->getSessLogin($_REQUEST['alibsid']);
|
$login = $alib->getSessLogin($_REQUEST['alibsid']);
|
||||||
if(!isset($login)||$login==''){
|
if(!isset($login)||$login==''){
|
||||||
$_SESSION['alertMsg'] = "Login required";
|
$_SESSION['alertMsg'] = "Login required";
|
||||||
header("Location: alibExLogin.php");
|
header("Location: alibExLogin.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
|
@ -1,32 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
/*------------------------------------------------------------------------------
|
/**
|
||||||
|
* @author $Author$
|
||||||
|
* @version $Revision$
|
||||||
|
*/
|
||||||
|
|
||||||
Copyright (c) 2004 Media Development Loan Fund
|
|
||||||
|
|
||||||
This file is part of the Campcaster project.
|
|
||||||
http://campcaster.campware.org/
|
|
||||||
To report bugs, send an e-mail to bugs@campware.org
|
|
||||||
|
|
||||||
Campcaster is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
Campcaster 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 General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with Campcaster; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
|
|
||||||
Author : $Author$
|
|
||||||
Version : $Revision$
|
|
||||||
Location : $URL$
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
|
||||||
require_once "alib_h.php";
|
require_once "alib_h.php";
|
||||||
require_once "alibExTestAuth.php";
|
require_once "alibExTestAuth.php";
|
||||||
|
|
||||||
|
|
|
@ -1,32 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
/*------------------------------------------------------------------------------
|
/**
|
||||||
|
* @author $Author$
|
||||||
Copyright (c) 2004 Media Development Loan Fund
|
* @version $Revision$
|
||||||
|
*/
|
||||||
This file is part of the Campcaster project.
|
|
||||||
http://campcaster.campware.org/
|
|
||||||
To report bugs, send an e-mail to bugs@campware.org
|
|
||||||
|
|
||||||
Campcaster is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
Campcaster 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 General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with Campcaster; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
|
|
||||||
Author : $Author$
|
|
||||||
Version : $Revision$
|
|
||||||
Location : $URL$
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
|
||||||
require_once "alib_h.php";
|
require_once "alib_h.php";
|
||||||
|
|
||||||
#echo"<pre>\nGET:\n"; print_r($_GET); echo"POST:\n"; print_r($_POST); exit;
|
#echo"<pre>\nGET:\n"; print_r($_GET); echo"POST:\n"; print_r($_POST); exit;
|
||||||
|
|
|
@ -1,32 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
/*------------------------------------------------------------------------------
|
/**
|
||||||
|
* @author $Author$
|
||||||
Copyright (c) 2004 Media Development Loan Fund
|
* @version $Revision$
|
||||||
|
*/
|
||||||
This file is part of the Campcaster project.
|
|
||||||
http://campcaster.campware.org/
|
|
||||||
To report bugs, send an e-mail to bugs@campware.org
|
|
||||||
|
|
||||||
Campcaster is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
Campcaster 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 General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with Campcaster; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
|
|
||||||
Author : $Author$
|
|
||||||
Version : $Revision$
|
|
||||||
Location : $URL$
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
$config = array(
|
$config = array(
|
||||||
'dsn' => array( // data source definition
|
'dsn' => array( // data source definition
|
||||||
|
|
|
@ -1,33 +1,3 @@
|
||||||
<?php
|
|
||||||
/*------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Copyright (c) 2004 Media Development Loan Fund
|
|
||||||
|
|
||||||
This file is part of the Campcaster project.
|
|
||||||
http://campcaster.campware.org/
|
|
||||||
To report bugs, send an e-mail to bugs@campware.org
|
|
||||||
|
|
||||||
Campcaster is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
Campcaster 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 General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with Campcaster; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
|
|
||||||
Author : $Author$
|
|
||||||
Version : $Revision$
|
|
||||||
Location : $URL$
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
|
||||||
?>
|
|
||||||
<html><head>
|
<html><head>
|
||||||
<title>ALib module</title>
|
<title>ALib module</title>
|
||||||
<meta name="author" content="$Author$"/>
|
<meta name="author" content="$Author$"/>
|
||||||
|
|
|
@ -1,32 +1,8 @@
|
||||||
<?
|
<?
|
||||||
/*------------------------------------------------------------------------------
|
/**
|
||||||
|
* @author $Author$
|
||||||
Copyright (c) 2004 Media Development Loan Fund
|
* @version $Revision$
|
||||||
|
*/
|
||||||
This file is part of the Campcaster project.
|
|
||||||
http://campcaster.campware.org/
|
|
||||||
To report bugs, send an e-mail to bugs@campware.org
|
|
||||||
|
|
||||||
Campcaster is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
Campcaster 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 General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with Campcaster; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
|
|
||||||
Author : $Author$
|
|
||||||
Version : $Revision$
|
|
||||||
Location : $URL$
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
|
||||||
require_once '../example/conf.php';
|
require_once '../example/conf.php';
|
||||||
require_once 'DB.php';
|
require_once 'DB.php';
|
||||||
require_once '../alib.php';
|
require_once '../alib.php';
|
||||||
|
@ -57,7 +33,7 @@ $alib =& new Alib($dbc, $config);
|
||||||
|
|
||||||
echo "\n\n======\n".
|
echo "\n\n======\n".
|
||||||
"This is Alib standalone installation script, it is NOT needed to run ".
|
"This is Alib standalone installation script, it is NOT needed to run ".
|
||||||
"for Livesupport.\nAlib is automatically used by storageServer without it.".
|
"for Campcaster.\nAlib is automatically used by storageServer without it.".
|
||||||
"\n======\n\n";
|
"\n======\n\n";
|
||||||
|
|
||||||
echo "Alib: uninstall ...\n";
|
echo "Alib: uninstall ...\n";
|
||||||
|
|
|
@ -1,32 +1,8 @@
|
||||||
<?
|
<?
|
||||||
/*------------------------------------------------------------------------------
|
/**
|
||||||
|
* @author $Author$
|
||||||
Copyright (c) 2004 Media Development Loan Fund
|
* @version $Revision$
|
||||||
|
*/
|
||||||
This file is part of the Campcaster project.
|
|
||||||
http://campcaster.campware.org/
|
|
||||||
To report bugs, send an e-mail to bugs@campware.org
|
|
||||||
|
|
||||||
Campcaster is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
Campcaster 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 General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with Campcaster; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
|
|
||||||
Author : $Author$
|
|
||||||
Version : $Revision$
|
|
||||||
Location : $URL$
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
|
||||||
require_once '../example/conf.php';
|
require_once '../example/conf.php';
|
||||||
require_once 'DB.php';
|
require_once 'DB.php';
|
||||||
require_once '../alib.php';
|
require_once '../alib.php';
|
||||||
|
|
|
@ -4,7 +4,7 @@ define('ALIBERR_MTREE', 10);
|
||||||
/**
|
/**
|
||||||
* M2tree class
|
* M2tree class
|
||||||
*
|
*
|
||||||
* class for tree hierarchy stored in db
|
* A class for tree hierarchy stored in db.
|
||||||
*
|
*
|
||||||
* example config: example/conf.php<br>
|
* example config: example/conf.php<br>
|
||||||
* example minimal config:
|
* example minimal config:
|
||||||
|
@ -21,9 +21,13 @@ define('ALIBERR_MTREE', 10);
|
||||||
* 'RootNode' =>'RootNode',
|
* 'RootNode' =>'RootNode',
|
||||||
* );
|
* );
|
||||||
* </code></pre>
|
* </code></pre>
|
||||||
|
*
|
||||||
* @author $Author$
|
* @author $Author$
|
||||||
* @version $Revision$
|
* @version $Revision$
|
||||||
|
* @package Campcaster
|
||||||
|
* @subpackage Alib
|
||||||
* @see ObjClasses
|
* @see ObjClasses
|
||||||
|
*
|
||||||
* Original author Tom Hlava
|
* Original author Tom Hlava
|
||||||
*/
|
*/
|
||||||
class M2tree {
|
class M2tree {
|
||||||
|
@ -55,9 +59,8 @@ class M2tree{
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param dbc object
|
* @param DB $dbc
|
||||||
* @param config array
|
* @param array $config
|
||||||
* @return this
|
|
||||||
*/
|
*/
|
||||||
function M2tree(&$dbc, $config)
|
function M2tree(&$dbc, $config)
|
||||||
{
|
{
|
||||||
|
@ -74,10 +77,14 @@ class M2tree{
|
||||||
* Add new object of specified type to the tree under specified parent
|
* Add new object of specified type to the tree under specified parent
|
||||||
* node
|
* node
|
||||||
*
|
*
|
||||||
* @param string $name, mnemonic name for new object
|
* @param string $name
|
||||||
* @param string $type, type of new object
|
* mnemonic name for new object
|
||||||
* @param int $parid, optional, parent id
|
* @param string $type
|
||||||
* @return int/err - new id of inserted object or PEAR::error
|
* type of new object
|
||||||
|
* @param int $parid
|
||||||
|
* optional, parent id
|
||||||
|
* @return mixed
|
||||||
|
* int/err - new id of inserted object or PEAR::error
|
||||||
*/
|
*/
|
||||||
function addObj($name, $type, $parid = NULL)
|
function addObj($name, $type, $parid = NULL)
|
||||||
{
|
{
|
||||||
|
@ -140,8 +147,10 @@ class M2tree{
|
||||||
/**
|
/**
|
||||||
* Remove specified object
|
* Remove specified object
|
||||||
*
|
*
|
||||||
* @param int $oid, object id to remove
|
* @param int $oid
|
||||||
* @return boolean/err - TRUE or PEAR::error
|
* object id to remove
|
||||||
|
* @return mixed
|
||||||
|
* boolean/err - TRUE or PEAR::error
|
||||||
*/
|
*/
|
||||||
function removeObj($oid)
|
function removeObj($oid)
|
||||||
{
|
{
|
||||||
|
@ -182,10 +191,14 @@ class M2tree{
|
||||||
* Create copy of specified object and insert copy to new position
|
* Create copy of specified object and insert copy to new position
|
||||||
* recursively
|
* recursively
|
||||||
*
|
*
|
||||||
* @param oid int, source object id
|
* @param int $oid
|
||||||
* @param newParid int, destination parent id
|
* source object id
|
||||||
* @param after null, dummy argument for back-compatibility
|
* @param int $newParid
|
||||||
* @return int/err - new id of inserted object or PEAR::error
|
* destination parent id
|
||||||
|
* @param null $after
|
||||||
|
* dummy argument for back-compatibility
|
||||||
|
* @return mixed
|
||||||
|
* int/err - new id of inserted object or PEAR::error
|
||||||
*/
|
*/
|
||||||
function copyObj($oid, $newParid, $after=NULL)
|
function copyObj($oid, $newParid, $after=NULL)
|
||||||
{
|
{
|
||||||
|
@ -243,9 +256,10 @@ class M2tree{
|
||||||
/**
|
/**
|
||||||
* Move subtree to another node without removing/adding
|
* Move subtree to another node without removing/adding
|
||||||
*
|
*
|
||||||
* @param oid int
|
* @param int $oid
|
||||||
* @param newParid int
|
* @param int $newParid
|
||||||
* @param after null, dummy argument for back-compatibility
|
* @param null $after
|
||||||
|
* dummy argument for back-compatibility
|
||||||
* @return boolean/err
|
* @return boolean/err
|
||||||
*/
|
*/
|
||||||
function moveObj($oid, $newParid, $after=NULL)
|
function moveObj($oid, $newParid, $after=NULL)
|
||||||
|
@ -303,9 +317,12 @@ class M2tree{
|
||||||
/**
|
/**
|
||||||
* Rename of specified object
|
* Rename of specified object
|
||||||
*
|
*
|
||||||
* @param int $oid, object id to rename
|
* @param int $oid
|
||||||
* @param string $newName, new name
|
* object id to rename
|
||||||
* @return boolean/err - True or PEAR::error
|
* @param string $newName
|
||||||
|
* new name
|
||||||
|
* @return mixed
|
||||||
|
* boolean/err - True or PEAR::error
|
||||||
*/
|
*/
|
||||||
function renameObj($oid, $newName)
|
function renameObj($oid, $newName)
|
||||||
{
|
{
|
||||||
|
@ -340,9 +357,12 @@ class M2tree{
|
||||||
/**
|
/**
|
||||||
* Search for child id by name in sibling set
|
* Search for child id by name in sibling set
|
||||||
*
|
*
|
||||||
* @param string $name, searched name
|
* @param string $name
|
||||||
* @param int $parId, optional, parent id (default is root node)
|
* searched name
|
||||||
* @return int/null/err - child id (if found) or null or PEAR::error
|
* @param int $parId
|
||||||
|
* optional, parent id (default is root node)
|
||||||
|
* @return mixed
|
||||||
|
* int/null/err - child id (if found) or null or PEAR::error
|
||||||
*/
|
*/
|
||||||
function getObjId($name, $parId = null)
|
function getObjId($name, $parId = null)
|
||||||
{
|
{
|
||||||
|
@ -368,8 +388,10 @@ class M2tree{
|
||||||
* Get one value for object by id (default: get name)
|
* Get one value for object by id (default: get name)
|
||||||
*
|
*
|
||||||
* @param int $oid
|
* @param int $oid
|
||||||
* @param string $fld, optional, requested field (default: name)
|
* @param string $fld
|
||||||
* @return string/err
|
* optional, requested field (default: name)
|
||||||
|
* @return mixed
|
||||||
|
* string/err
|
||||||
*/
|
*/
|
||||||
function getObjName($oid, $fld='name')
|
function getObjName($oid, $fld='name')
|
||||||
{
|
{
|
||||||
|
@ -414,7 +436,8 @@ class M2tree{
|
||||||
*
|
*
|
||||||
* @param int $oid
|
* @param int $oid
|
||||||
* @param string $flds, optional
|
* @param string $flds, optional
|
||||||
* @param boolean $withSelf - flag for include specified object to the path
|
* @param boolean $withSelf
|
||||||
|
* flag for include specified object to the path
|
||||||
* @return array/err
|
* @return array/err
|
||||||
*/
|
*/
|
||||||
function getPath($oid, $flds='id', $withSelf=TRUE)
|
function getPath($oid, $flds='id', $withSelf=TRUE)
|
||||||
|
@ -426,13 +449,17 @@ class M2tree{
|
||||||
WHERE objid=$oid
|
WHERE objid=$oid
|
||||||
ORDER BY coalesce(level, 0) DESC
|
ORDER BY coalesce(level, 0) DESC
|
||||||
");
|
");
|
||||||
if($this->dbc->isError($path)) return $path;
|
if ($this->dbc->isError($path)) {
|
||||||
|
return $path;
|
||||||
|
}
|
||||||
if ($withSelf) {
|
if ($withSelf) {
|
||||||
$r = $this->dbc->getRow("
|
$r = $this->dbc->getRow("
|
||||||
SELECT $flds FROM {$this->treeTable}
|
SELECT $flds FROM {$this->treeTable}
|
||||||
WHERE id=$oid
|
WHERE id=$oid
|
||||||
");
|
");
|
||||||
if($this->dbc->isError($r)) return $r;
|
if ($this->dbc->isError($r)) {
|
||||||
|
return $r;
|
||||||
|
}
|
||||||
array_push($path, $r);
|
array_push($path, $r);
|
||||||
}
|
}
|
||||||
return $path;
|
return $path;
|
||||||
|
@ -443,8 +470,10 @@ class M2tree{
|
||||||
* Get array of childnodes
|
* Get array of childnodes
|
||||||
*
|
*
|
||||||
* @param int $oid
|
* @param int $oid
|
||||||
* @param string $flds, optional, comma separated list of requested fields
|
* @param string $flds
|
||||||
* @param string $order, optional, fieldname for order by clause
|
* optional, comma separated list of requested fields
|
||||||
|
* @param string $order
|
||||||
|
* optional, fieldname for order by clause
|
||||||
* @return array/err
|
* @return array/err
|
||||||
*/
|
*/
|
||||||
function getDir($oid, $flds='id', $order='name')
|
function getDir($oid, $flds='id', $order='name')
|
||||||
|
@ -463,10 +492,13 @@ class M2tree{
|
||||||
/**
|
/**
|
||||||
* Get level of object relatively to specified root
|
* Get level of object relatively to specified root
|
||||||
*
|
*
|
||||||
* @param int $oid, object id
|
* @param int $oid
|
||||||
* @param string $flds, list of field names for select
|
* object id
|
||||||
|
* @param string $flds
|
||||||
|
* list of field names for select
|
||||||
* (optional - default: 'level')
|
* (optional - default: 'level')
|
||||||
* @param int $rootId, root for relative levels
|
* @param int $rootId
|
||||||
|
* root for relative levels
|
||||||
* (optional - default: NULL - use root of whole tree)
|
* (optional - default: NULL - use root of whole tree)
|
||||||
* @return hash-array with field name/value pairs
|
* @return hash-array with field name/value pairs
|
||||||
*/
|
*/
|
||||||
|
@ -492,10 +524,14 @@ class M2tree{
|
||||||
/**
|
/**
|
||||||
* Get subtree of specified node
|
* Get subtree of specified node
|
||||||
*
|
*
|
||||||
* @param int $oid, optional, default: root node
|
* @param int $oid
|
||||||
* @param boolean $withRoot, optional, include/exclude specified node
|
* optional, default: root node
|
||||||
* @param int $rootId, root for relative levels, optional
|
* @param boolean $withRoot
|
||||||
* @return array/err
|
* optional, include/exclude specified node
|
||||||
|
* @param int $rootId
|
||||||
|
* root for relative levels, optional
|
||||||
|
* @return mixed
|
||||||
|
* array/err
|
||||||
*/
|
*/
|
||||||
function getSubTree($oid=NULL, $withRoot=FALSE, $rootId=NULL)
|
function getSubTree($oid=NULL, $withRoot=FALSE, $rootId=NULL)
|
||||||
{
|
{
|
||||||
|
@ -531,9 +567,12 @@ class M2tree{
|
||||||
/**
|
/**
|
||||||
* Returns true if first object if child of second one
|
* Returns true if first object if child of second one
|
||||||
*
|
*
|
||||||
* @param int $oid, object id of tested object
|
* @param int $oid
|
||||||
* @param int $parid, object id of parent
|
* object id of tested object
|
||||||
* @param boolean $indirect, test indirect or only direct relation
|
* @param int $parid
|
||||||
|
* object id of parent
|
||||||
|
* @param boolean $indirect
|
||||||
|
* test indirect or only direct relation
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
function isChildOf($oid, $parid, $indirect=FALSE)
|
function isChildOf($oid, $parid, $indirect=FALSE)
|
||||||
|
@ -607,7 +646,8 @@ class M2tree{
|
||||||
* Cut subtree of specified object from tree.
|
* Cut subtree of specified object from tree.
|
||||||
* Preserve subtree structure.
|
* Preserve subtree structure.
|
||||||
*
|
*
|
||||||
* @param int $oid, object id
|
* @param int $oid
|
||||||
|
* object id
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
function _cutSubtree($oid)
|
function _cutSubtree($oid)
|
||||||
|
@ -638,8 +678,10 @@ class M2tree{
|
||||||
/**
|
/**
|
||||||
* Paste subtree previously cut by _cutSubtree method into main tree
|
* Paste subtree previously cut by _cutSubtree method into main tree
|
||||||
*
|
*
|
||||||
* @param int $oid, object id
|
* @param int $oid
|
||||||
* @param int $newParid, destination object id
|
* object id
|
||||||
|
* @param int $newParid
|
||||||
|
* destination object id
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
function _pasteSubtree($oid, $newParid)
|
function _pasteSubtree($oid, $newParid)
|
||||||
|
@ -674,7 +716,8 @@ class M2tree{
|
||||||
/**
|
/**
|
||||||
* Do SQL rollback and return PEAR::error
|
* Do SQL rollback and return PEAR::error
|
||||||
*
|
*
|
||||||
* @param object/string $r, error object or error message
|
* @param object/string $r
|
||||||
|
* error object or error message
|
||||||
* @return err
|
* @return err
|
||||||
*/
|
*/
|
||||||
function _dbRollback($r)
|
function _dbRollback($r)
|
||||||
|
@ -696,9 +739,12 @@ class M2tree{
|
||||||
/**
|
/**
|
||||||
* Human readable dump of subtree - for debug
|
* Human readable dump of subtree - for debug
|
||||||
*
|
*
|
||||||
* @param int $oid, start object id
|
* @param int $oid
|
||||||
* @param string $indstr, indentation string
|
* start object id
|
||||||
* @param string $ind, aktual indentation
|
* @param string $indstr
|
||||||
|
* indentation string
|
||||||
|
* @param string $ind
|
||||||
|
* actual indentation
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function dumpTree($oid=NULL, $indstr=' ', $ind='',
|
function dumpTree($oid=NULL, $indstr=' ', $ind='',
|
||||||
|
|
|
@ -1,32 +1,4 @@
|
||||||
<?php
|
<?php
|
||||||
/*------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Copyright (c) 2004 Media Development Loan Fund
|
|
||||||
|
|
||||||
This file is part of the Campcaster project.
|
|
||||||
http://campcaster.campware.org/
|
|
||||||
To report bugs, send an e-mail to bugs@campware.org
|
|
||||||
|
|
||||||
Campcaster is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
Campcaster 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 General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with Campcaster; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
|
|
||||||
Author : $Author$
|
|
||||||
Version : $Revision$
|
|
||||||
Location : $URL$
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
|
||||||
require_once "class.php";
|
require_once "class.php";
|
||||||
define('ALIBERR_NOTGR', 20);
|
define('ALIBERR_NOTGR', 20);
|
||||||
define('ALIBERR_BADSMEMB', 21);
|
define('ALIBERR_BADSMEMB', 21);
|
||||||
|
@ -40,6 +12,8 @@ define('ALIBERR_BADSMEMB', 21);
|
||||||
*
|
*
|
||||||
* @author $Author$
|
* @author $Author$
|
||||||
* @version $Revision$
|
* @version $Revision$
|
||||||
|
* @package Campcaster
|
||||||
|
* @subpackage Alib
|
||||||
* @see ObjClasses
|
* @see ObjClasses
|
||||||
* @see Alib
|
* @see Alib
|
||||||
*/
|
*/
|
||||||
|
@ -68,9 +42,12 @@ class Subjects extends ObjClasses {
|
||||||
* Add new subject
|
* Add new subject
|
||||||
*
|
*
|
||||||
* @param string $login
|
* @param string $login
|
||||||
* @param string $pass, optional
|
* @param string $pass
|
||||||
* @param string $realname, optional
|
* optional
|
||||||
* @param boolean $passenc, optional, password already encrypted if true
|
* @param string $realname
|
||||||
|
* optional
|
||||||
|
* @param boolean $passenc
|
||||||
|
* optional, password already encrypted if true
|
||||||
* @return int/err
|
* @return int/err
|
||||||
*/
|
*/
|
||||||
function addSubj($login, $pass=NULL, $realname='', $passenc=FALSE)
|
function addSubj($login, $pass=NULL, $realname='', $passenc=FALSE)
|
||||||
|
@ -101,7 +78,8 @@ class Subjects extends ObjClasses {
|
||||||
* Remove subject by uid or by login
|
* Remove subject by uid or by login
|
||||||
*
|
*
|
||||||
* @param string $login
|
* @param string $login
|
||||||
* @param int $uid, optional, default: null
|
* @param int $uid
|
||||||
|
* optional, default: null
|
||||||
* @return boolean/err
|
* @return boolean/err
|
||||||
*/
|
*/
|
||||||
function removeSubj($login, $uid=NULL)
|
function removeSubj($login, $uid=NULL)
|
||||||
|
@ -132,7 +110,8 @@ class Subjects extends ObjClasses {
|
||||||
* Check login and password
|
* Check login and password
|
||||||
*
|
*
|
||||||
* @param string $login
|
* @param string $login
|
||||||
* @param string $pass, optional
|
* @param string $pass
|
||||||
|
* optional
|
||||||
* @return boolean/int/err
|
* @return boolean/int/err
|
||||||
*/
|
*/
|
||||||
function authenticate($login, $pass='')
|
function authenticate($login, $pass='')
|
||||||
|
@ -152,7 +131,8 @@ class Subjects extends ObjClasses {
|
||||||
* Set lastlogin or lastfail timestamp
|
* Set lastlogin or lastfail timestamp
|
||||||
*
|
*
|
||||||
* @param string $login
|
* @param string $login
|
||||||
* @param boolean $failed, true=> set lastfail, false=> set lastlogin
|
* @param boolean $failed
|
||||||
|
* true=> set lastfail, false=> set lastlogin
|
||||||
* @return boolean/int/err
|
* @return boolean/int/err
|
||||||
*/
|
*/
|
||||||
function setTimeStamp($login, $failed=FALSE)
|
function setTimeStamp($login, $failed=FALSE)
|
||||||
|
@ -172,9 +152,12 @@ class Subjects extends ObjClasses {
|
||||||
* Change user password
|
* Change user password
|
||||||
*
|
*
|
||||||
* @param string $login
|
* @param string $login
|
||||||
* @param string $oldpass, old password (optional for 'superuser mode')
|
* @param string $oldpass
|
||||||
* @param string $pass, optional
|
* old password (optional for 'superuser mode')
|
||||||
* @param boolean $passenc, optional, password already encrypted if true
|
* @param string $pass
|
||||||
|
* optional
|
||||||
|
* @param boolean $passenc
|
||||||
|
* optional, password already encrypted if true
|
||||||
* @return boolean/err
|
* @return boolean/err
|
||||||
*/
|
*/
|
||||||
function passwd($login, $oldpass=null, $pass='', $passenc=FALSE)
|
function passwd($login, $oldpass=null, $pass='', $passenc=FALSE)
|
||||||
|
@ -386,8 +369,10 @@ class Subjects extends ObjClasses {
|
||||||
/**
|
/**
|
||||||
* Return true if uid is [id]direct member of gid
|
* Return true if uid is [id]direct member of gid
|
||||||
*
|
*
|
||||||
* @param int $uid, local user id
|
* @param int $uid
|
||||||
* @param int $gid, local group id
|
* local user id
|
||||||
|
* @param int $gid
|
||||||
|
* local group id
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
function isMemberOf($uid, $gid)
|
function isMemberOf($uid, $gid)
|
||||||
|
@ -412,8 +397,10 @@ class Subjects extends ObjClasses {
|
||||||
*
|
*
|
||||||
* @param int $uid
|
* @param int $uid
|
||||||
* @param int $gid
|
* @param int $gid
|
||||||
* @param int $level, optional
|
* @param int $level
|
||||||
* @param int $mid, optional
|
* optional
|
||||||
|
* @param int $mid
|
||||||
|
* optional
|
||||||
* @return int/err
|
* @return int/err
|
||||||
*/
|
*/
|
||||||
function _addMemb($uid, $gid, $level=0, $mid='null')
|
function _addMemb($uid, $gid, $level=0, $mid='null')
|
||||||
|
@ -474,7 +461,8 @@ class Subjects extends ObjClasses {
|
||||||
* List [in]direct members of group
|
* List [in]direct members of group
|
||||||
*
|
*
|
||||||
* @param int $gid
|
* @param int $gid
|
||||||
* @param int $uid, optional
|
* @param int $uid
|
||||||
|
* optional
|
||||||
* @return array/err
|
* @return array/err
|
||||||
*/
|
*/
|
||||||
function _listMemb($gid, $uid=NULL)
|
function _listMemb($gid, $uid=NULL)
|
||||||
|
@ -490,7 +478,8 @@ class Subjects extends ObjClasses {
|
||||||
* List groups where uid is [in]direct member
|
* List groups where uid is [in]direct member
|
||||||
*
|
*
|
||||||
* @param int $gid
|
* @param int $gid
|
||||||
* @param int $uid, optional
|
* @param int $uid
|
||||||
|
* optional
|
||||||
* @return array/err
|
* @return array/err
|
||||||
*/
|
*/
|
||||||
function _listRMemb($uid, $gid=NULL)
|
function _listRMemb($uid, $gid=NULL)
|
||||||
|
@ -580,8 +569,10 @@ class Subjects extends ObjClasses {
|
||||||
/**
|
/**
|
||||||
* Dump subjects for debug
|
* Dump subjects for debug
|
||||||
*
|
*
|
||||||
* @param string $indstr // indentation string
|
* @param string $indstr
|
||||||
* @param string $ind // aktual indentation
|
* indentation string
|
||||||
|
* @param string $ind
|
||||||
|
* actual indentation
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function dumpSubjects($indstr=' ', $ind='')
|
function dumpSubjects($indstr=' ', $ind='')
|
||||||
|
|
|
@ -1,32 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
/*------------------------------------------------------------------------------
|
/**
|
||||||
|
* @author $Author$
|
||||||
Copyright (c) 2004 Media Development Loan Fund
|
* @version $Revision$
|
||||||
|
*/
|
||||||
This file is part of the Campcaster project.
|
|
||||||
http://campcaster.campware.org/
|
|
||||||
To report bugs, send an e-mail to bugs@campware.org
|
|
||||||
|
|
||||||
Campcaster is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
Campcaster 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 General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with Campcaster; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
|
|
||||||
Author : $Author$
|
|
||||||
Version : $Revision$
|
|
||||||
Location : $URL$
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
|
||||||
include_once "xmlrpc.inc";
|
include_once "xmlrpc.inc";
|
||||||
include_once "xmlrpcs.inc";
|
include_once "xmlrpcs.inc";
|
||||||
require_once "../example/alib_h.php";
|
require_once "../example/alib_h.php";
|
||||||
|
@ -45,7 +21,7 @@ function v2xr($var, $struct=true){
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* XMLRPC interface for Alib class<br>
|
* XMLRPC interface for Alib class<br>
|
||||||
* only for testing now (with example) - LiveSupport uses special interface
|
* only for testing now (with example) - Campcaster uses special interface
|
||||||
*
|
*
|
||||||
* @author $Author$
|
* @author $Author$
|
||||||
* @version $Revision$
|
* @version $Revision$
|
||||||
|
|
|
@ -1,33 +1,4 @@
|
||||||
<?php
|
<?php
|
||||||
/*------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Copyright (c) 2004 Media Development Loan Fund
|
|
||||||
|
|
||||||
This file is part of the Campcaster project.
|
|
||||||
http://campcaster.campware.org/
|
|
||||||
To report bugs, send an e-mail to bugs@campware.org
|
|
||||||
|
|
||||||
Campcaster is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
Campcaster 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 General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with Campcaster; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
|
|
||||||
Author : $Author$
|
|
||||||
Version : $Revision$
|
|
||||||
Location : $URL$
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
header ("location: xr_cli_test.php");
|
header ("location: xr_cli_test.php");
|
||||||
die;
|
die;
|
||||||
?>
|
?>
|
|
@ -1,32 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
/*------------------------------------------------------------------------------
|
/**
|
||||||
|
* @author $Author$
|
||||||
Copyright (c) 2004 Media Development Loan Fund
|
* @version $Revision$
|
||||||
|
*/
|
||||||
This file is part of the Campcaster project.
|
|
||||||
http://campcaster.campware.org/
|
|
||||||
To report bugs, send an e-mail to bugs@campware.org
|
|
||||||
|
|
||||||
Campcaster is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
Campcaster 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 General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with Campcaster; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
|
|
||||||
Author : $Author$
|
|
||||||
Version : $Revision$
|
|
||||||
Location : $URL$
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
|
||||||
include("xmlrpc.inc");
|
include("xmlrpc.inc");
|
||||||
|
|
||||||
$host = "localhost";
|
$host = "localhost";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue