You can subscribe to this list here.
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(47) |
Aug
(73) |
Sep
(104) |
Oct
(55) |
Nov
|
Dec
|
|---|
|
From: alex <bin...@li...> - 2001-09-25 19:24:29
|
alex Tue Sep 25 12:24:24 2001 EDT
Removed files:
/r2/binarycloud/user/mod/graph php_imlib-0.3.tar.gz
/r2/binarycloud/user/mod/graph/vagrant INSTALL README TODO license
/r2/binarycloud/user/mod/graph/vagrant/examples filled_example.php
graph_example.php
pie_example.php
/r2/binarycloud/user/mod/graph/vagrant/libraries ARIAL.TTF
Graph.gd.class
Graph.imlib.class
Graph.swf.class
VAGRANT.class
Log:
Old junk
|
alex Tue Sep 25 11:10:56 2001 EDT
Added files:
/r2/binarycloud/user/default/db/before README
/r2/binarycloud/user/default/db/dump year_mo_dy_hr_mn_sc.txt
/r2/binarycloud/user/default/db/objects README
/r2/binarycloud/user/default/db/schema create_db.xml
Log:
Cleaning
Index: r2/binarycloud/user/default/db/dump/year_mo_dy_hr_mn_sc.txt
+++ r2/binarycloud/user/default/db/dump/year_mo_dy_hr_mn_sc.txt
file extention format:
year_month_day_hour_minutes_seconds
.schema_20001006114509_dump
is
2000 10 06 11 45 09
year: 2000
month: 10
day: 06
hour: 11
minute: 45
second: 09
Index: r2/binarycloud/user/default/db/schema/create_db.xml
+++ r2/binarycloud/user/default/db/schema/create_db.xml
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!-- Header {{{
*******************************************************************************
** -File $Id: create_db.xml,v 1.1 2001/09/25 18:10:56 alex Exp $
** -License LGPL (http://www.gnu.org/copyleft/lesser.html)
** -Copyright 2001, The Turing Studio, Inc.
** -Author alex black, en...@tu...
******************************************************************************
}}} -->
<database>
<name>binarycloud_db</name>
<create>1</create>
<table>
<name>bc_test</name>
<declaration>
<field>
<name>test</name>
<type>text</type>
</field>
</declaration>
</table>
</database>
|
|
From: alex <bin...@li...> - 2001-09-25 18:51:40
|
alex Tue Sep 25 11:21:28 2001 EDT
Added files:
/r2/binarycloud/user/bcdev/mod/query_example/qry Queries.php
Queries.qry.xml
Log:
Qry
Index: r2/binarycloud/user/bcdev/mod/query_example/qry/Queries.php
+++ r2/binarycloud/user/bcdev/mod/query_example/qry/Queries.php
<?php
// ripped from Queries.qry.xml
global $QueryManager;
$queries = array(
array(
'name' => "user.query_example.select.newsbyid",
'sql' => "SELECT newsid, news FROM news WHERE newsid = ?",
'argtypes' => array('integer')
),
array(
'name' => "user.query_example.select.allnews",
'sql' => "SELECT newsid, news FROM news"
),
);
$QueryManager->LoadQueries($queries);
unset($queries);
?>
Index: r2/binarycloud/user/bcdev/mod/query_example/qry/Queries.qry.xml
+++ r2/binarycloud/user/bcdev/mod/query_example/qry/Queries.qry.xml
<?xml version="1.0" ?>
<queries>
<query>
<!--
the name of the query
-->
<name>user.query_example.select.newsbyid</name>
<!--
The SQL portion of the query maybe with placeholders ("?")
-->
<sql>SELECT newsid, news FROM news WHERE newsid = ?</sql>
<!--
Types of the values the ? is going to replaced with.
In order of appearance in the sql portion of the query
-->
<argtypes>
<type>integer</type>
</argtypes>
</query>
<!--
Another query without arguments
-->
<query>
<name>user.query_example.select.allnews</name>
<sql>SELECT newsid, news FROM news</sql>
</query>
</queries>
|
|
From: alex <bin...@li...> - 2001-09-25 18:51:40
|
alex Tue Sep 25 11:13:36 2001 EDT
Removed files:
/r2/binarycloud/user/default/htdocs bcp.xml compilertest.html
destroy_session.php graph.php
index.php mod_cache_test.php
page_cache_test.php
query_example.php
query_example.php.xml
query_example.xml.php
static_mod_cache_test.php
static_module.php
xml2phptest.php.xml
xml2phptest.xml.php
xslt_example.php
xslt_example.php.xml
Log:
Cleaning
|
|
From: alex <bin...@li...> - 2001-09-25 18:51:40
|
alex Tue Sep 25 11:21:40 2001 EDT
Added files:
/r2/binarycloud/user/bcdev/mod/set_lang_example/html form.php
Log:
Lang ex
Index: r2/binarycloud/user/bcdev/mod/set_lang_example/html/form.php
+++ r2/binarycloud/user/bcdev/mod/set_lang_example/html/form.php
<!-- begin <?=__FILE__?> -->
<?php global $Lang; ?>
<?php global $PHP_SELF; ?>
<form action="<?=$PHP_SELF?>" method="GET">
Your current language is: <?=BC_LANG_NAME?>.
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top" colspan="2"><b>Set Your Language:</b></td>
</tr>
<tr>
<td valign="top"> </td>
<td valign="top">
<select name=".lang">
<option value="select">Select One</option>
<?php foreach ($Lang->langs as $lang) { ?>
<option value="<?=$lang['code']?>"><?=$lang['native']?></option>
<?php } ?>
</select>
<input type="submit" value="set">
</td>
</tr>
</table>
</form>
<!-- end <?=__FILE__?> -->
|
|
From: alex <bin...@li...> - 2001-09-25 18:51:39
|
alex Tue Sep 25 11:25:21 2001 EDT
Modified files:
/r2/binarycloud/user/bcdev Makefile
Log:
Synching makefile
Index: r2/binarycloud/user/bcdev/Makefile
diff -u r2/binarycloud/user/bcdev/Makefile:1.1 r2/binarycloud/user/bcdev/Makefile:1.2
--- r2/binarycloud/user/bcdev/Makefile:1.1 Tue Sep 25 11:18:08 2001
+++ r2/binarycloud/user/bcdev/Makefile Tue Sep 25 11:25:20 2001
@@ -1,5 +1,5 @@
# {{{ Header
-# -File $Id: Makefile,v 1.1 2001/09/25 18:18:08 alex Exp $
+# -File $Id: Makefile,v 1.2 2001/09/25 18:25:20 alex Exp $
# -License LGPL (http://www.gnu.org/copyleft/lesser.html)
# -Copyright 2001, Intacct Corp.
# -Author odysseas tsatalos, ody...@ya...
|
|
From: alex <bin...@li...> - 2001-09-25 18:51:39
|
alex Tue Sep 25 11:20:50 2001 EDT
Removed files:
/r2/binarycloud/user/bcdev/mod/graph php_imlib-0.3.tar.gz
Log:
Don't need this, in the install
|
|
From: alex <bin...@li...> - 2001-09-25 18:51:39
|
alex Tue Sep 25 11:20:38 2001 EDT
Added files:
/r2/binarycloud/user/bcdev/mod/graph php_imlib-0.3.tar.gz
Log:
Moo
|
|
From: alex <bin...@li...> - 2001-09-25 18:51:38
|
alex Tue Sep 25 11:16:27 2001 EDT
Removed files:
/r2/binarycloud/user/default/mod/webalizer start.sh
Log:
Cleaning
:
|
|
From: alex <bin...@li...> - 2001-09-25 18:51:38
|
alex Tue Sep 25 11:25:13 2001 EDT
Removed files:
/r2/binarycloud/user/default Makefile
Log:
Don't need this here
|
|
From: alex <bin...@li...> - 2001-09-25 18:51:38
|
alex Tue Sep 25 11:09:08 2001 EDT
Removed files:
/r2/binarycloud/user/default/cache README.txt
Log:
Moo
|
|
From: alex <bin...@li...> - 2001-09-25 18:51:38
|
alex Tue Sep 25 11:05:36 2001 EDT
Added files:
/r2/binarycloud/user/default Makefile
Log:
Adding default/
|
|
From: alex <bin...@li...> - 2001-09-24 00:19:03
|
alex Sun Sep 23 17:18:58 2001 EDT
Added files:
/r2/binarycloud/docs/specs/xml EntityDefinition.php
Modified files:
/r2/tasks MultiSiteMake.txt
Log:
Added Entity definition target php
Index: r2/tasks/MultiSiteMake.txt
diff -u r2/tasks/MultiSiteMake.txt:1.1 r2/tasks/MultiSiteMake.txt:1.2
--- r2/tasks/MultiSiteMake.txt:1.1 Sun Sep 9 00:45:39 2001
+++ r2/tasks/MultiSiteMake.txt Sun Sep 23 17:18:57 2001
@@ -1,8 +1,8 @@
-Task Name
+Multi-Site Make
--------------------------------------------------
-Task Summary
-This is a concise summary of the task that should be completed. It should give the reader a sense of the project's scope and goals.
+
-Dependencies
This task may require that other tasks listed in the TODO be completed first. If so, those dependencies should be mentioned here.
Index: r2/binarycloud/docs/specs/xml/EntityDefinition.php
+++ r2/binarycloud/docs/specs/xml/EntityDefinition.php
<?php
$entity => array(
'name' => 'furbees',
'manager' => 'FurbeesManager',
'database' => array(
'name' => 'binarycloud_db',
'create' => '0',
'table' => array(
'name' => 'furbee',
'index' => array(
'name' => 'furbee_id',
'unique' => '1',
'field' => array(
'name' => 'furbee_id',
),
),
),
),
'fields' => array(
array(
'name' => 'furbee_id',
'label' => 'Furbee ID',
'desc' => 'Unique ID for ever Furbee',
'path' => 'furbee_id',
'required' => 'true',
'default' => '0',
'notnull' => '1',
'type' => 'int',
'maxlength' => '20',
'processors' => array(
array(
'name' => 'EncodeEntitiesProcessor',
'params' => array(
'param_name' => 'value',
),
),
),
'validators' => array(
array(
'name' => 'FASTASequenceValidator',
'params' => array(
'param_name' => 'value',
),
),
),
'uicontrol' => array(
array(
'name' => 'TextBoxControl',
'params' => array(
'size' => '20',
),
),
),
),
array(
'name' => 'furbee_type_id',
'label' => 'Furbee type ID',
'desc' => 'The id of the type of furbee',
'path' => 'furbee_type_id',
'required' => 'true',
'type' => 'int',
'maxlength' => '20',
'entity' => 'furbee_type',
),
),
'schema' => array(
array(
'entsource' => 'furbee_type_id',
'dbtarget' => 'furbee.furbeetypeid',
),
);
?>
|
|
From: alex <bin...@li...> - 2001-09-23 22:38:24
|
alex Sun Sep 23 15:38:19 2001 EDT
Removed files:
/r2/tools/scripts php_compile.sh
Log:
Remved, bc_install is far more capable
|
|
From: alex <bin...@li...> - 2001-09-23 22:38:16
|
alex Sun Sep 23 15:37:54 2001 EDT
Added files:
/r2/tools/sfsync rm_cvs_dirs.sh
/r2/tools/sfsync/sf checkout.sh findrm.sh overlay.sh
Log:
Added some sourceforge cvs synching tools
Index: r2/tools/sfsync/rm_cvs_dirs.sh
+++ r2/tools/sfsync/rm_cvs_dirs.sh
rm -rf r2
cvs co -P r2;
find ./r2/ -name CVS -exec rm -rf {} \;
Index: r2/tools/sfsync/sf/checkout.sh
+++ r2/tools/sfsync/sf/checkout.sh
cvs -z3 -d:ext:tu...@cv...:/cvsroot/binarycloud co -P r2
Index: r2/tools/sfsync/sf/findrm.sh
+++ r2/tools/sfsync/sf/findrm.sh
find ./r2/ -type f |grep -ve 'CVS' > FileList.txt
perl -pi -e "s/\.\//rm -f \.\//g;" FileList.txt
sh FileList.txt
rm FileList.txt
Index: r2/tools/sfsync/sf/overlay.sh
+++ r2/tools/sfsync/sf/overlay.sh
cp -R ../r2/* r2/
|
|
From: andi <bin...@li...> - 2001-09-22 20:01:10
|
andi Sat Sep 22 13:01:04 2001 EDT
Added files:
/r2/binarycloud/user/htdocs compilertest.html
Modified files:
/r2/binarycloud/user/htdocs Makefile
Log:
Quick hack compiler test. This will become compilertest.php during make.
Index: r2/binarycloud/user/htdocs/Makefile
diff -u r2/binarycloud/user/htdocs/Makefile:1.6 r2/binarycloud/user/htdocs/Makefile:1.7
--- r2/binarycloud/user/htdocs/Makefile:1.6 Wed Aug 1 14:47:53 2001
+++ r2/binarycloud/user/htdocs/Makefile Sat Sep 22 13:01:04 2001
@@ -1,5 +1,5 @@
# {{{ Header
-# -File $Id: Makefile,v 1.6 2001/08/01 21:47:53 alex Exp $
+# -File $Id: Makefile,v 1.7 2001/09/22 20:01:04 andi Exp $
# -License LGPL (http://www.gnu.org/copyleft/lesser.html)
# -Copyright 2001, Intacct Corp.
# -Author odysseas tsatalos, ody...@ya...
@@ -21,11 +21,21 @@
HTDOCFILES=`find . -name '*' | grep '[.]' | grep -v resources | grep -v CVS `
RESOURCEFILES=`find resources -name '*' | grep '[.]' `
-all: htresources htfiles
+all: htresources htfiles bcctest
htfiles:
@$(INSTALLCODE) $(SITEBUILD_DIR) $(HTDOCFILES)
htresources:
@$(INSTALLCODE) $(SITEBUILD_DIR) $(RESOURCEFILES)
+
+#
+# very quick hack to test the bcc (andi)
+#
+bcctest:
+ @echo "in user/htdocs (bcc compilertest)";
+ @$(PHP_COMMAND) $(TOOLS_DIR)/compiletags.php $(SITEBUILD_DIR) $(USER_DIR)/htdocs/compilertest.html $(SITEBUILD_DIR)/compilertest.php
+
+
+
Index: r2/binarycloud/user/htdocs/compilertest.html
+++ r2/binarycloud/user/htdocs/compilertest.html
<html>
<head>
<title>Test</title>
<link rel="stylesheet" type="text/css" href="resources/css/binarycloud.css" />
<script src="resources/js/base_lib.js" language="javascript"></script>
</head>
<body bgcolor="#EEEEEE" text="#000000" link="#003366" alink="#CCCCCC" vlink="#003366" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">
<b> blah </b>
<bc:module id="moo" name="HelloWorld" package="hello_world">
<cache expires="30" use_uri="true" var="$moo"/>
<params>
<param_name>value</param_name>
<another_param_name>another_value</another_param_name>
</params>
</bc:module>
<bc:img id="abcimg" />
<bc:js id="moo" inline="true" />
<bc:css id="moo" inline="false" />
<bc:href id="href" href="/archive/mp3/any_document.mp3" usedocroot="true" />
</body>
</html>
|
|
From: andi <bin...@li...> - 2001-09-22 19:59:07
|
andi Sat Sep 22 12:59:02 2001 EDT
Modified files:
/r2/binarycloud/base Makefile
Log:
Added mod/bcc to be processed by make
Index: r2/binarycloud/base/Makefile
diff -u r2/binarycloud/base/Makefile:1.5 r2/binarycloud/base/Makefile:1.6
--- r2/binarycloud/base/Makefile:1.5 Sat Jul 14 19:03:08 2001
+++ r2/binarycloud/base/Makefile Sat Sep 22 12:59:02 2001
@@ -1,5 +1,5 @@
# {{{ Header
-# -File $Id: Makefile,v 1.5 2001/07/15 02:03:08 alex Exp $
+# -File $Id: Makefile,v 1.6 2001/09/22 19:59:02 andi Exp $
# -License LGPL (http://www.gnu.org/copyleft/lesser.html)
# -Copyright 2001, Intacct Corp.
# -Author odysseas tsatalos, ody...@ya...
@@ -13,6 +13,7 @@
init \
lib \
mgr \
+ mod/bcc \
$(EMPTY)
all: dirs
|
|
From: andi <bin...@li...> - 2001-09-22 19:58:21
|
andi Sat Sep 22 12:58:15 2001 EDT
Added files:
/r2/binarycloud/base/mod/bcc Bcc.php BccDefaultCompiler.php
BccImgCompiler.php
BccModuleCompiler.php Makefile
Log:
Bcc stuff
|
|
From: andi <bin...@li...> - 2001-09-22 19:55:40
|
andi Sat Sep 22 12:55:35 2001 EDT
Modified files:
/r2/binarycloud/base/utils compiletags.php
Log:
New compiletags script. Works
Index: r2/binarycloud/base/utils/compiletags.php
diff -u r2/binarycloud/base/utils/compiletags.php:1.1 r2/binarycloud/base/utils/compiletags.php:1.2
--- r2/binarycloud/base/utils/compiletags.php:1.1 Fri Sep 21 11:19:02 2001
+++ r2/binarycloud/base/utils/compiletags.php Sat Sep 22 12:55:35 2001
@@ -2,35 +2,66 @@
<?php
// {{{ Header
/*
- * -File $Id: compiletags.php,v 1.1 2001/09/21 18:19:02 andi Exp $
+ * -File $Id: compiletags.php,v 1.2 2001/09/22 19:55:35 andi Exp $
* -License LGPL (http://www.gnu.org/copyleft/lesser.html)
* -Copyright 2001, Intacct Corp.
* -Author odysseas tsatalos, ody...@ya...
* -Author Andris Spruds, an...@do...
- * -Author Andreas Aderhold an...@bi...
+ * -Author Andreas Aderhold, a.a...@th...
*/
// }}}
-// {{{
-$strSyntax = "Usage: $argv[0] buildpath infile outfile\n";
-$argv = $HTTP_SERVER_VARS['argv'];
-if ( sizeof($argv) != 4 ) {
+// main entry point {{{
+
+function main(&$_argv) {
+
+ if ( sizeof($_argv) != 4 ) {
+ _PrintUsage();
+ }
+
+
+ $buildPath=$_argv[1];
+ include_once($buildPath. '/prepend.php');
+
+ $in = realpath($_argv[2]);
+ $out = $_argv[3];
+
+ $Bcc =& _InitBcc();
+ // setup parser and engage
+ $Bcc->Compile($in, $out);
+
+}
+
+// }}}
+// display usage information
+
+function _PrintUsage() {
+ $strSyntax = "Usage: $argv[0] buildpath infile outfile\n";
die($strSyntax);
}
-$buildPath=$argv[1];
-include_once($buildPath. '/prepend.php');
+// }}}
+// Init bcc
-import('binarycloud.lib.XMLUtils');
-import('binarycloud.lib.BCTagParser');
+function &_InitBcc() {
+ import('binarycloud.mod.bcc.Bcc');
-$in = realpath($argv[2]);
-$out = $argv[3];
+ $bcc =& new Bcc;
+ // register and import (internal to bcc) compiler classes
+ $bcc->RegisterTag('BC:MODULE', "BccModuleCompiler");
+ $bcc->RegisterTag('BC:IMG', "BccImgCompiler");
+ return $bcc;
+}
+// }}}
+
+main($HTTP_SERVER_VARS['argv']);
-// setup parser and engage
-$xml =& new BCTagParser($in, $out);
-$xml->RegisterTag('BC:MODULE', "BCCompileModuleTag");
-$xml->RegisterTag('BC:IMG', "BCCompileImgTag");
-$xml->Compile();
// }}} end
+/*
+ * Local Variables:
+ * mode: php
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ */
?>
|
|
From: alex <bin...@li...> - 2001-09-22 19:22:39
|
alex Sat Sep 22 12:22:31 2001 EDT
Added files:
/r2/binarycloud/base/mod/bcc README
Log:
Added bcc module directory in base/
|
|
From: alex <bin...@li...> - 2001-09-21 23:18:20
|
alex Fri Sep 21 16:18:14 2001 EDT
Added files:
/r2/binarycloud/ext/metabase/editplus metabase.acp metabase.ctl
metabase.stx template.schema
Log:
Metabase editplus tmpls
Index: r2/binarycloud/ext/metabase/editplus/metabase.acp
+++ r2/binarycloud/ext/metabase/editplus/metabase.acp
#TITLE=Metabase
#CASE=y
#T=database
<database>
^!
</database>
#T=create
<create>^!</create>
#T=table
<table>
^!
</table>
#T=declaration
<declaration>
^!
</declaration>
#T=index
<index>
^!
</index>
#T=sorting
<sorting>^!</sorting>
#T=unique
<unique>1</unique>
#T=init
<initialization>
^!
</initialization>
#T=insert
<insert>
^!
</insert>
#T=value
<value>^!</value>
#T=sequence
<sequence>
^!
</sequence>
#T=start
<start>^!</start>
#T=on
<on>^!</on>
#T=field
<field>
^!
</field>
#T=type
<type>^!</type>
#T=name
<name>^!</name>
#T=len
<length>^!</length>
#T=notnull
<notnull>^!</notnull>
#T=unsigned
<unsigned>1</unsigned>
#T=default
<default>^!</default>
#T=was
<was>^!</was>
#T=var
<variable>^!</variable>
#T=te
text
#T=boo
boolean
#T=int
integer
#T=deci
decimal
#T=flo
float
#T=times
timestamp
#T=ti
time
#
Index: r2/binarycloud/ext/metabase/editplus/metabase.ctl
+++ r2/binarycloud/ext/metabase/editplus/metabase.ctl
#TITLE=Metabase
#INFO
EditPlus Cliptext Library v1.0 written by ES-Computing.
PHP Metabase Database Abstraction Layer Cliptext Library by Aral Balkan
Metabase by Manuel Lemos (ml...@ac...)
#SORT=n
#T=?xml version="1.0"
<?xml version="1.0" encoding="ISO-8859-1" ?>
^!
#T=database
<database>
^!
</database>
#T=create
<create>^!</create>
#T=table (declare)
<table>
^!
</table>
#T=table (attribute of sequence on)
<table>^!</table>
#T=declaration
<declaration>
^!
</declaration>
#T=index
<index>
^!
</index>
#T=sorting
<sorting>^!</sorting>
#T=unique
<unique>1</unique>
#T=initialization
<initialization>
^!
</initialization>
#T=insert
<insert>
^!
</insert>
#T=value
<value>^!</value>
#T=sequence
<sequence>
^!
</sequence>
#T=start
<start>^!</start>
#T=on
<on>
^!
</on>
#T=field (declare)
<field>
^!
</field>
#T=field (attribute of sequence on)
<field>^!</field>
#T=type
<type>^!</type>
#T=name
<name>^!</name>
#T=length
<length>^!</length>
#T=notnull
<notnull>^!</notnull>
#T=unsigned
<unsigned>1</unsigned>
#T=default
<default>^!</default>
#T=was
<was>^!</was>
#T=variable
<variable>^!</variable>
#T=text
text
#T=boolean
boolean
#T=integer
integer
#T=decimal
decimal
#T=float
float
#T=timestamp
timestamp
#T=date
date
#T=time
time
#
Index: r2/binarycloud/ext/metabase/editplus/metabase.stx
+++ r2/binarycloud/ext/metabase/editplus/metabase.stx
#TITLE=Metabase
; Metabase syntax file by Aral Balkan
; (http://www.aralbalkan.com). Based on:
; XML syntax file written by Hyoung Moon, Lee
; Metabase by Manuel Lemos (ml...@ac...)
; Note, I chose aesthetics over logical grouping when necessary.
#DELIMITER=<>/=+*|,()[]'"
#QUOTATION1='
#QUOTATION2="
#CONTINUE_QUOTE=n
#LINECOMMENT=
#LINECOMMENT2=
#COMMENTON=<!--
#COMMENTOFF=-->
#COMMENTON2=
#COMMENTOFF2=
#ESCAPE=\
#CASE=y
#PREFIX1=
#PREFIX2=
#PREFIX3=
#PREFIX4=
#PREFIX5=
#SUFFIX1=
#SUFFIX2=
#SUFFIX3=
#SUFFIX4=
#SUFFIX5=
#KEYWORD=Metabase One
declaration
initialization
#KEYWORD=Metabase Two
field
index
insert
#KEYWORD=Metabase Three
sequence
table
#KEYWORD=Metabase Attributes
unique
create
type
name
was
notnull
default
value
unsigned
length
sorting
on
start
variable
#KEYWORD=General
database
?xml
?xml-stylesheet
!DOCTYPE
!ENTITY
!ELEMENT
!ATTLIST
!NOTATION
!
?
@
$
<
/
>
INCLUDE
IGNORE
SYSTEM
PUBLIC
NDATA
^#PCDATA
EMPTY
ANY
UTF-8
utf-8
utf-16
UTF-16
ISO-10646-UCS-2
ISO-10646-UCS-4
ISO-8859-1
ISO-8859-2
ISO-8859-9
ISO-2022-JP
Shift_JIS
EUC-JP
euc-kr
EUC-KR
version
encoding
standalone
href
title
media
charset
alternate
xml:space
preserve
xml:lang
CDATA
ID
IDREF
IDREFS
ENTITY
ENTITIES
NMTOKEN
NMTOKENS
^#REQUIRED
^#IMPLIED
^#FIXED
#
Index: r2/binarycloud/ext/metabase/editplus/template.schema
+++ r2/binarycloud/ext/metabase/editplus/template.schema
<?xml version="1.0" encoding="ISO-8859-1" ?>
<database>
<name></name>
<!-- Flag parser to create database -->
<create>1</create>
<table>
<name></name>
<!-- Declare table -->
<declaration>
<field>
<type></type>
<name></name>
</field>
<index>
<name></name>
<unique>1</unique>
<field>
<name></name>
<sorting></sorting>
</field>
</index>
</declaration>
<!-- Populate table -->
<initialization>
<insert>
<field>
<name></name>
<value></value>
</field>
</insert>
<initialization>
</table>
<sequence>
<name></name>
<start></start>
<on>
<field></field>
<table></table>
</on>
</sequence>
</database>
|
|
From: andi <bin...@li...> - 2001-09-21 18:19:08
|
andi Fri Sep 21 11:19:02 2001 EDT
Added files:
/r2/binarycloud/base/utils compiletags.php
Log:
Added script that acts similar to xml2php. It uses BCTagParser to compile bc:tags to whatever you specified in the tag-compile-functions. See BCTagParser for more info.
Index: r2/binarycloud/base/utils/compiletags.php
+++ r2/binarycloud/base/utils/compiletags.php
#!/usr/local/php4/bin/php -q
<?php
// {{{ Header
/*
* -File $Id: compiletags.php,v 1.1 2001/09/21 18:19:02 andi Exp $
* -License LGPL (http://www.gnu.org/copyleft/lesser.html)
* -Copyright 2001, Intacct Corp.
* -Author odysseas tsatalos, ody...@ya...
* -Author Andris Spruds, an...@do...
* -Author Andreas Aderhold an...@bi...
*/
// }}}
// {{{
$strSyntax = "Usage: $argv[0] buildpath infile outfile\n";
$argv = $HTTP_SERVER_VARS['argv'];
if ( sizeof($argv) != 4 ) {
die($strSyntax);
}
$buildPath=$argv[1];
include_once($buildPath. '/prepend.php');
import('binarycloud.lib.XMLUtils');
import('binarycloud.lib.BCTagParser');
$in = realpath($argv[2]);
$out = $argv[3];
// setup parser and engage
$xml =& new BCTagParser($in, $out);
$xml->RegisterTag('BC:MODULE', "BCCompileModuleTag");
$xml->RegisterTag('BC:IMG', "BCCompileImgTag");
$xml->Compile();
// }}} end
?>
|
|
From: andi <bin...@li...> - 2001-09-21 18:17:34
|
andi Fri Sep 21 11:17:24 2001 EDT
Modified files:
/r2/binarycloud/base/lib BCTagParser.php
Log:
Cleared up and documented the parser.
Index: r2/binarycloud/base/lib/BCTagParser.php
diff -u r2/binarycloud/base/lib/BCTagParser.php:1.2 r2/binarycloud/base/lib/BCTagParser.php:1.3
--- r2/binarycloud/base/lib/BCTagParser.php:1.2 Fri Sep 21 08:34:35 2001
+++ r2/binarycloud/base/lib/BCTagParser.php Fri Sep 21 11:17:24 2001
@@ -1,49 +1,98 @@
-#!/usr/local/php4/bin/php -q
<?php
+// Header {{{
+/*
+ * -File $Id: BCTagParser.php,v 1.3 2001/09/21 18:17:24 andi Exp $
+ * -License LGPL (http://www.gnu.org/copyleft/lesser.html)
+ * -Copyright 2001, Thyrell
+ * -Authors Andreas Aderhold, <a.a...@th...>
+ */
-// these are the actual compiling methods.
-// They are registered at setup they must
-// return a sting with the compiled data,
-// or null in case of a compile error
-
-function BCCompileModuleTag($_tags) {
- // translating xml to php by using XMLUtils
- // this seems not to work for tag attributes
+$PACKAGE='binarycloud.lib';
- $trees = XMLUtils::XMLStr2XML($_tags);
- $xmlTree=$trees[0];
- $phpTree = XMLUtils::XML2PHP($xmlTree);
- $txtTree = XMLUtils::PHP2PHPArr($phpTree,false);
- var_dump($phpTree);
- return "Module Compiler output";
-}
+// }}}
+// {{{ BCTagParser
+/**
+ * BCTagParser class.
+ *
+ *
+ * @author Andreas Aderhold, a.a...@th...
+ * @version $Id: BCTagParser.php,v 1.3 2001/09/21 18:17:24 andi Exp $
+ */
-function BCCompileImgTag($_tag) {
- return "<img src=\"example_compliler_output.gif\">";
-}
-?>
-<?php
-// here we go
class BCTagParser {
/** Pool of all registered bc:foo tags and processor methods */
- var $knownTags = array(); // list of kown tags and their compiler methods
- var $infile = null; // source file
- var $outfile = null; // file to write back
-
+ var $knownTags = array();
+
+ /** source and destination files */
+ var $infile = null;
+ var $outfile = null;
+
+ // BCTagParser($_infile, $_outfile) {{{
+ /**
+ * Constructor. Set in und out file
+ *
+ * @param string filename of the sourcefile
+ * @param string filename of destination file
+ * @access public
+ * @author Andreas Aderhold, <a.a...@th...>
+ */
+
function BCTagParser($_infile, $_outfile) {
$this->infile = $_infile;
$this->outfile = $_outfile;
}
+
+ // }}}
+ // Compile() {{{
+ /**
+ * Compile. Assesor that starts the compiling process.
+ *
+ * @access public
+ * @author Andreas Aderhold, <a.a...@th...>
+ */
function Compile() {
$this->_CompileFile();
}
+ // }}}
+ // RegisterTag($_tag, $_processor) {{{
+ /**
+ * Register tag method. Registers a bc-style tag and the relating
+ * compiler function.
+ *
+ * i.e. $this->RegisterTag('BC:MODULE','BCCompileModuleTag');
+ *
+ * @access public
+ * @author Andreas Aderhold, <a.a...@th...>
+ */
+
function RegisterTag($_tag, $_processor) {
$this->knownTags[strtoupper($_tag)] = $_processor;
}
+ // }}}
+ // _CompileFile() {{{
+ /**
+ * Compiles file. Runs over the infile and looks for bc-style tags.
+ * Reads this tags to a buffer and builds an array with tag data
+ * and tag metadata (name, compiler handler, tagdata). Passes the
+ * tagdata to _CompileTag and replaces the tag with the compiled
+ * string in the outbuffer. Writes the outfile. The tagmeta array
+ * is in this form
+ *
+ * array(
+ * 'name' => 'BC:SOMETHING',
+ * 'handler' => 'BCCompileSomethingTag',
+ * 'data' => complete xml tag data
+ * );
+ *
+ * @return bool true/false upon success or failure
+ * @access public
+ * @author Andreas Aderhold, <a.a...@th...>
+ */
+
function _CompileFile() {
/* read file from disk */
@@ -70,7 +119,7 @@
}
}
}
- var_dump($tagData);
+
/* found at least one block, loop through and call compiler */
for ($i = 0; $i < count($tagData); $i++) {
echo "Compiling...\n";
@@ -78,19 +127,19 @@
}
/* write the new file to disk */
- $this->_Writefile($this->outfile, $source);
-
+ $success = $this->_Writefile($this->outfile, $source);
+ return $success;
}
-
- // method _CompileTag($_data) {{{
+ // }}}
+ // _CompileTag($_data) {{{
/**
- * This calls the xml parser providing the tag to parse. And retuns the
- * compiled tag.
+ * This calls the compiler function. And retuns the compiled tag.
*
- * @param $_tag string the xml tag to parse
+ * @param string $_tag the xml tag data to parse
* @access private
*/
+
function _CompileTag($_data) {
$tName =& $_data['name'];
@@ -116,14 +165,17 @@
}
// }}}
- // method _Readfile($_filename) {{{
-
+ // _Readfile($_filename) {{{
/**
- * private method for reading a file into an internal buffer
+ * Private method for reading a file into a buffer
*
- * @param $_filename string the file to read
- * @return string the contents of the file
+ * @param string $_filename the file to read
+ * @return string the contents of the file
+ * @access private
+ * @author Monte Ohrt <mo...@is...>
+ * @author Andrei Zmievski <an...@ph...>
*/
+
function _Readfile($_filename) {
if (!($fd = fopen($_filename, 'r'))) {
die("problem reading '$_filename.'");
@@ -136,16 +188,18 @@
}
// }}}
- // {{{
-
+ // _Writefile($_filename, $_contents) {{{
/**
* private method for writing a file from an internal buffer.
- * Method stolen from smarty ;-)
*
- * @param $_filename string the file to write
- * @param $_contents string the data to write
+ * @param string $_filename the filename to write
+ * @param string $_contents the data to write
* @return bool
+ * @access private
+ * @author Monte Ohrt <mo...@is...>
+ * @author Andrei Zmievski <an...@ph...>
*/
+
function _Writefile($_filename, $_contents) {
if (!($fd = fopen($_filename, 'w'))) {
@@ -160,17 +214,32 @@
}
return true;
}
+
+ // }}}
}
// }}}
-?>
-<?php
-// runngin the parser for demonstration
-include_once('./XMLUtils.php');
+
+
+// these are the actual compiling methods.
+// They are registered at setup they must
+// return a sting with the compiled data,
+// or null in case of a compile error
+// might be useful to swap them to another file
+
+function BCCompileModuleTag($_tags) {
+ // translating xml to php by using XMLUtils
+ // this seems not to work for tag attributes
-$xml =& new BCTagParser("data.html.xml", "data.html");
-$xml->RegisterTag('BC:MODULE', "BCCompileModuleTag");
-$xml->RegisterTag('BC:IMG', "BCCompileImgTag");
-$xml->Compile();
+ $trees = XMLUtils::XMLStr2XML($_tags);
+ $xmlTree = $trees[0];
+ $phpTree = XMLUtils::XML2PHP($xmlTree);
+ $txtTree = XMLUtils::PHP2PHPArr($phpTree,false);
+ return $txtTree;
+}
+
+function BCCompileImgTag($_tag) {
+ return "<img src=\"example_compliler_output.gif\">";
+}
/*
* Local Variables:
|
|
From: andi <bin...@li...> - 2001-09-21 15:34:42
|
andi Fri Sep 21 08:34:35 2001 EDT
Modified files:
/r2/binarycloud/base/lib BCTagParser.php
Log:
Basically functional now. The slot-in functions that actually compile the tags to php or img or whatever do not work. Grepin the <bc:*> tags and works. Extending the tags with custom tags works.
Index: r2/binarycloud/base/lib/BCTagParser.php
diff -u r2/binarycloud/base/lib/BCTagParser.php:1.1 r2/binarycloud/base/lib/BCTagParser.php:1.2
--- r2/binarycloud/base/lib/BCTagParser.php:1.1 Sun Sep 16 13:39:44 2001
+++ r2/binarycloud/base/lib/BCTagParser.php Fri Sep 21 08:34:35 2001
@@ -1,102 +1,177 @@
#!/usr/local/php4/bin/php -q
<?php
+
+// these are the actual compiling methods.
+// They are registered at setup they must
+// return a sting with the compiled data,
+// or null in case of a compile error
+
+function BCCompileModuleTag($_tags) {
+ // translating xml to php by using XMLUtils
+ // this seems not to work for tag attributes
+
+ $trees = XMLUtils::XMLStr2XML($_tags);
+ $xmlTree=$trees[0];
+ $phpTree = XMLUtils::XML2PHP($xmlTree);
+ $txtTree = XMLUtils::PHP2PHPArr($phpTree,false);
+ var_dump($phpTree);
+ return "Module Compiler output";
+}
+
+function BCCompileImgTag($_tag) {
+ return "<img src=\"example_compliler_output.gif\">";
+}
+?>
+<?php
+// here we go
class BCTagParser {
-
- /** Pool of all registered bc:foo tags and processor methods */
- var $knownTags;
- function BCTagParser($_file) {
- $this->RegisterTag('BC:IMG', "ImageRequestBuilder::Process");
- $this->RegisterTag('BC:JS', "JSRequestBuilder::Process");
- $this->RegisterTag('BC:MODULE', "_ProcessModule");
- $this->_Parse($_file);
+ /** Pool of all registered bc:foo tags and processor methods */
+ var $knownTags = array(); // list of kown tags and their compiler methods
+ var $infile = null; // source file
+ var $outfile = null; // file to write back
+
+ function BCTagParser($_infile, $_outfile) {
+ $this->infile = $_infile;
+ $this->outfile = $_outfile;
}
+ function Compile() {
+ $this->_CompileFile();
+ }
+
function RegisterTag($_tag, $_processor) {
- $this->knownTags[$_tag] = $_processor;
+ $this->knownTags[strtoupper($_tag)] = $_processor;
+ }
+
+ function _CompileFile() {
+
+ /* read file from disk */
+ $source = $this->_Readfile($this->infile);
+
+ /* pull out the bc code blocks that have children | not */
+ preg_match_all("!<(bc:.*?)>.*?</bc:.*?>|<bc:.*?/>!si", $source, $match);
+ $bcBlocks =& $match[0];
+
+ /* assemble interal array with all bc: tags */
+ $tagData = array();
+ for ($i = 0; $i < count($bcBlocks); ++$i) {
+ /* look it tag is registered and assign name and compiler function */
+ foreach($this->knownTags as $name => $val) {
+ if (stristr($bcBlocks[$i], $name)) {
+ $tagData[$i]['name'] = $name;
+ $tagData[$i]['handler'] = $val;
+ $tagData[$i]['data'] = $bcBlocks[$i];
+ break;
+ } else {
+ $tagData[$i]['name'] = 'UNKNOWN';
+ $tagData[$i]['handler'] = 'UNKNOWN';
+ $tagData[$i]['data'] = 'UNKNOWN';
+ }
+ }
+ }
+ var_dump($tagData);
+ /* found at least one block, loop through and call compiler */
+ for ($i = 0; $i < count($tagData); $i++) {
+ echo "Compiling...\n";
+ $source = preg_replace('!'.preg_quote($tagData[$i]['data'],'!').'!is', $this->_CompileTag($tagData[$i]), $source);
+ }
+
+ /* write the new file to disk */
+ $this->_Writefile($this->outfile, $source);
+
}
+
- // method _StartElement(&$_parser, $_name, $_attrs) {{{
+ // method _CompileTag($_data) {{{
/**
- * Method function triggered when an XML start element appears
- * here we will parse tag's we recognize from the xml file
+ * This calls the xml parser providing the tag to parse. And retuns the
+ * compiled tag.
*
- * @param $_parser ref the XML parser
- * @param $_name string the tag found
- * @param $_attrs array the attributes this tag carried
- * @access private
- * @author Andreas Adrehold, <a.a...@th...>
+ * @param $_tag string the xml tag to parse
+ * @access private
*/
+ function _CompileTag($_data) {
- function _StartElement(&$_parser, $_name, $_attrs) {
- if (!isset($this->knownTags[$_name])) {
- print "Unknown Tag $_name\n";
- return;
- }
- print "Processing $_name using ".$this->knownTags[$_name]."\n";
- var_dump($_attrs);
-
- // call the processing function, return resulting php
- // return $this->knownTags[$_name]($_attrs);
+ $tName =& $_data['name'];
+ $tData =& $_data['data'];
+ $tHandler =& $_data['handler'];
+
+ if ($tName == 'UNKNOWN') {
+ echo " +Unknown tag: $tName... skipped\n";
+ return "<!-- tag compiler unknown tag: $tName -->\n";
+ }
+
+ echo " +Processing $tName using $tHandler... ";
+
+ $ret = $tHandler($tData);
+
+ if ($ret !== null) {
+ echo "done\n";
+ return $ret;
+ } else {
+ echo "compile error\n";
+ return "<!-- tag compiler error while compiling $_name -->\n";
+ }
}
// }}}
- // method _EndElement(&$_parser, $_name) {{{
-
- function _EndElement(&$_parser, $_name) {
- // nothing - for now
+ // method _Readfile($_filename) {{{
+
+ /**
+ * private method for reading a file into an internal buffer
+ *
+ * @param $_filename string the file to read
+ * @return string the contents of the file
+ */
+ function _Readfile($_filename) {
+ if (!($fd = fopen($_filename, 'r'))) {
+ die("problem reading '$_filename.'");
+ return false;
+ }
+ flock($fd, LOCK_SH);
+ $contents = fread($fd, filesize($_filename));
+ fclose($fd);
+ return $contents;
}
// }}}
- // method _ProcessModule(&$_attrs) {{{
-
- function _ProcessModule(&$_attrs) {
- // wil call xml2php methods etc.
- // retuns resulting php
- var_dump($attrs);
- }
+ // {{{
- // }}}
- // method _Parse($_file) {{{
/**
- * private method for parsing the XML file. actually creates XML
- * parser and sets up element handlers
+ * private method for writing a file from an internal buffer.
+ * Method stolen from smarty ;-)
*
- * @param $_file string the file to parse
+ * @param $_filename string the file to write
+ * @param $_contents string the data to write
+ * @return bool
*/
+ function _Writefile($_filename, $_contents) {
- function _Parse($_file) {
-
- printf("Parsing XML file: $_file...\n",$this);
-
- if (empty($_file)) {
- die("XML file to parse was not set");
- }
-
- $xml_parser = xml_parser_create();
- xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, true);
- xml_set_object($xml_parser, &$this);
- xml_set_element_handler($xml_parser, "_StartElement", "_EndElement");
- if (!($fp = fopen($_file, "r"))) {
- die("Could not open XML input");
- }
-
- while ($data = fread($fp, 4096)) {
- if (!xml_parse($xml_parser, $data, feof($fp))) {
- die(sprintf("XML error: %s at line %d of $_file\n",
- xml_error_string(xml_get_error_code($xml_parser)),
- xml_get_current_line_number($xml_parser)));
- }
+ if (!($fd = fopen($_filename, 'w'))) {
+ die ("Problem writing '$_filename.'");
+ return false;
}
- xml_parser_free($xml_parser);
+ if (strtoupper(substr(PHP_OS,0,3)) == 'WIN' || (flock($fd, LOCK_EX)) ) {
+ fwrite($fd, $_contents);
+ fclose($fd);
+ chmod($_filename, 0644);
+ }
+ return true;
}
- // }}}
-
}
// }}}
-// exectute the parser for demonstration
-$xml =& new BCTagParser("data.html.xml");
+?>
+<?php
+// runngin the parser for demonstration
+include_once('./XMLUtils.php');
+
+$xml =& new BCTagParser("data.html.xml", "data.html");
+$xml->RegisterTag('BC:MODULE', "BCCompileModuleTag");
+$xml->RegisterTag('BC:IMG', "BCCompileImgTag");
+$xml->Compile();
+
/*
* Local Variables:
* mode: php
|
|
From: andi <bin...@li...> - 2001-09-21 10:45:15
|
andi Fri Sep 21 03:44:54 2001 EDT
Modified files:
/r2/binarycloud/base/mgr QueryManager.php
Log:
Removed metabase hack and extra abstraction code (workaround for older
metabase to support retreive meta-data). QueryManager is now clear.
Index: r2/binarycloud/base/mgr/QueryManager.php
diff -u r2/binarycloud/base/mgr/QueryManager.php:1.4 r2/binarycloud/base/mgr/QueryManager.php:1.5
--- r2/binarycloud/base/mgr/QueryManager.php:1.4 Wed Sep 12 11:14:04 2001
+++ r2/binarycloud/base/mgr/QueryManager.php Fri Sep 21 03:44:54 2001
@@ -1,7 +1,7 @@
<?php
// Header {{{
/*
- * -File $Id: QueryManager.php,v 1.4 2001/09/12 18:14:04 andi Exp $
+ * -File $Id: QueryManager.php,v 1.5 2001/09/21 10:44:54 andi Exp $
* -License LGPL (http://www.gnu.org/copyleft/lesser.html)
* -Copyright 2000, Intacct Corporation
* -Author John P. Campbell
@@ -571,34 +571,8 @@
}
// }}}
- // method _GetNumColumns($_result) {{{
- /**
- * This method determines the number of columns fetched by the last
- * query. It takes the result handle as parameter.
- *
- * I don't like this here. But it's a metabase problem. The Metabase
- * drivers currently do not implement this feauture.
- *
- * @param int Result handle
- * @return int Number of fields in last query
- * @access private
- * @see QueryManager::_ProcessResult()
- */
-
- function _GetNumColumns($_result) {
- switch ($this->dbType) {
- case 'oci': return OCINumCols($_result);
- case 'mysql': return mysql_num_fields($_result);
- case 'ifx': return ifx_num_fields($_result);
- case 'msql': return msql_num_fields($_result);
- case 'mssql': return mssql_num_fields($_result);
- case 'pgsql': return pg_numfields($_result);
- case 'odbc': return odbc_num_fields($_result);
- }
- }
-
- // }}}
// method _ProcessResult($_code, $_result, &$_buffer, $_headers) {{{
+
/**
* _ProcessResult processes a query result fetched by a select statement
* and fills a buffer passed by reference with the result values.
@@ -622,27 +596,14 @@
function _ProcessResult($_code, $_result, &$_buffer, $_headers = true) {
global $Debug;
- // Get the column names into the column data member.
- // (This is really a hack of the Metabase library.
- // |
- // | We have to modifiy the other metabase drivers mSQL,MySQL and
- // | PostgreSQL. It would be very nice to have
- // | MetabaseGetNumCols($database, $result) and
- // | MetabaseGetColumnNames($database, $result)
- // | Should be no problem 'caus php supports this for all dbms
- // | metabase abstracts
- // |
+
if ($_headers) {
- global $metabase_interfaces;
- global $metabase_databases;
- $metaIF =& $metabase_interfaces[$metabase_databases[$this->handle]->interface];
- $metaIF->GetColumnNames($_result);
- $colNames = $metaIF->columns[$_result];
+ $colNames = MetabaseGetColumnNames($this->handle, $_result);
$Debug->CaptureVar('QueryManager: Result columnames', $colNames);
}
$colCount = 0;
- $colCount = $this->_GetNumColumns($_result);
+ $colCount = MetabaseNumberOfColumns($this->handle, $_result);
if ($_result != 0) {
$eor = MetabaseEndOfResult($this->handle, $_result);
|