[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/phpforms INSTALL samples/contact.gfd sampl...
From: |
Jan Ischebeck |
Subject: |
gnue/phpforms INSTALL samples/contact.gfd sampl... |
Date: |
Thu, 18 Jul 2002 04:07:48 -0400 |
CVSROOT: /cvsroot/gnue
Module name: gnue
Changes by: Jan Ischebeck <address@hidden> 02/07/18 04:07:48
Modified files:
phpforms : INSTALL
phpforms/samples: contact.gfd README
phpforms/src : common.php database.inc gnue-forms.php
Log message:
add MailGateway database backend, which is used by the contact.gfd
Contact
wizard.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/phpforms/INSTALL.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/phpforms/samples/contact.gfd.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/phpforms/samples/README.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/phpforms/src/common.php.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/phpforms/src/database.inc.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/phpforms/src/gnue-forms.php.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
Patches:
Index: gnue/phpforms/INSTALL
diff -c gnue/phpforms/INSTALL:1.2 gnue/phpforms/INSTALL:1.3
*** gnue/phpforms/INSTALL:1.2 Tue Jul 16 20:14:08 2002
--- gnue/phpforms/INSTALL Thu Jul 18 04:07:48 2002
***************
*** 14,23 ****
line 46 in gnue-forms.php out
3. You have to enable the following php extentions:
4. copy all files from phpforms/src into your webserver directory
! 5. modify connection.php depending on your needs.
6. now you can test "phpforms" by just pointing your web browser to
http://yourhost/path/gnue-forms.php
--- 14,24 ----
line 46 in gnue-forms.php out
3. You have to enable the following php extentions:
+ XML (parser based on expat)
4. copy all files from phpforms/src into your webserver directory
! 5. modify settings.php and connection.php depending on your needs.
6. now you can test "phpforms" by just pointing your web browser to
http://yourhost/path/gnue-forms.php
Index: gnue/phpforms/samples/README
diff -c gnue/phpforms/samples/README:1.1 gnue/phpforms/samples/README:1.2
*** gnue/phpforms/samples/README:1.1 Wed Jul 17 18:41:39 2002
--- gnue/phpforms/samples/README Thu Jul 18 04:07:48 2002
***************
*** 2,5 ****
You have to copy all files in the same directory where gnue-forms.php is.
To setup the database use the state_maint.sql file.
! Remark: the example .GFD files are copied from gnue/forms/samples
--- 2,6 ----
You have to copy all files in the same directory where gnue-forms.php is.
To setup the database use the state_maint.sql file.
! Remark: the example .GFD files are copied from gnue/forms/samples and
! slightly changed
Index: gnue/phpforms/samples/contact.gfd
diff -c gnue/phpforms/samples/contact.gfd:1.1
gnue/phpforms/samples/contact.gfd:1.2
*** gnue/phpforms/samples/contact.gfd:1.1 Wed Jul 17 18:41:39 2002
--- gnue/phpforms/samples/contact.gfd Thu Jul 18 04:07:48 2002
***************
*** 7,13 ****
<options>
<option value="0.0.3" name="version"/>
</options>
! <datasource cache="5" name="form"/>
<page name="Page_1">
<block name="block1" datasource="form">
<label x="1" y="1" name="Label_1" text="File As"/>
--- 7,15 ----
<options>
<option value="0.0.3" name="version"/>
</options>
! <database name="mailme" provider="MailGateway" email="address@hidden"
! mailtitle="new contact"/>
! <datasource cache="5" name="form" database="mailme"/>
<page name="Page_1">
<block name="block1" datasource="form">
<label x="1" y="1" name="Label_1" text="File As"/>
Index: gnue/phpforms/src/common.php
diff -c gnue/phpforms/src/common.php:1.1 gnue/phpforms/src/common.php:1.2
*** gnue/phpforms/src/common.php:1.1 Wed Jul 17 17:40:01 2002
--- gnue/phpforms/src/common.php Thu Jul 18 04:07:48 2002
***************
*** 162,167 ****
--- 162,169 ----
if ($type=="MailGateway") {
// Attr: Email-Addr.
// MODES: Delete-after-commit
+ require_once("database.inc");
+ $db=new MailGatewayDB;
}
if ($type=="SessionCache") {
// Attr: MaxEntrys
Index: gnue/phpforms/src/database.inc
diff -c gnue/phpforms/src/database.inc:1.5 gnue/phpforms/src/database.inc:1.6
*** gnue/phpforms/src/database.inc:1.5 Wed Jul 17 17:40:01 2002
--- gnue/phpforms/src/database.inc Thu Jul 18 04:07:48 2002
***************
*** 412,417 ****
--- 412,420 ----
};
return $indexList;
}
+ function commit($table) {
+ # do nothing
+ }
function addTable($table) {
DEBUG(5,"SessionCacheDB.AddTable: Tablename='".$table."'");
if (!isset($this->datastore[$table])) {
***************
*** 504,509 ****
--- 507,513 ----
$this->to_delete=array();
$this->changed=array();
$this->setFilter($this->filter);
+ $this->dbcon->commit($this->table);
}
function rollback() {
$this->to_delete=array();
***************
*** 597,602 ****
--- 601,644 ----
## print "<BR>CHANGED:";
## var_dump($this->changed);
print "<BR>";
+ }
+ }
+ class MailGatewayDB extends SessionCacheDB {
+ function MailGatewayDB() {
+ $this->attr=array();
+ $this->datastore=array();
+ $this->datacount=array();
+ $this->datastore["demotable"]=array(0=>array("File"=>"Hello"));
+ DEBUG(3,"New MailGatewayDB object");
+ }
+ function commit($table) {
+ $tosend=$datastore[$table];
+ print_r($tosend);
+ $m="GNU Enterprise PHP Form Result\n";
+ $m=$m."\n";
+ # reset($tosend);
+ # while (list ($k, $v) = each ($dtsdata)) {
+ # $m=$m."\n Datasource: ".$k."\n";
+ # reset($v["cache"]);
+ # while (list ($k1, $v1) = each ($v["cache"])) {
+ # $m=$m."\n Record: ".$k1."\n";
+ # reset($v1);
+ # while (list ($k2, $v2) = each ($v1)) {
+ # $m=$m.$k2.":".$v2."\n";
+ # }
+ #
+ # }
+ # }
+ $mailaddr=$this->attr["EMAIL"];
+ if (array_key_exists("MAILTITLE",$this->attr)) {
+ $title=$this->attr["MAILTITLE"];
+ } else {
+ $title="GNUe Forms - content submission";
+ };
+ mail ($mailaddr,$title,$m);
+ echo "<H1>MAIL SENT TO ".$mailaddr."</H1>";
+ session_destroy();
+ exit(0);
}
}
?>
Index: gnue/phpforms/src/gnue-forms.php
diff -c gnue/phpforms/src/gnue-forms.php:1.7
gnue/phpforms/src/gnue-forms.php:1.8
*** gnue/phpforms/src/gnue-forms.php:1.7 Wed Jul 17 17:40:01 2002
--- gnue/phpforms/src/gnue-forms.php Thu Jul 18 04:07:48 2002
***************
*** 37,43 ****
$clientversion="0.0.8.2"; // added appserver driver but broke postgres driv.
$clientversion="0.0.8.3"; // split gnue-forms.php in more files,
// added settings.php
!
require_once("settings.php");
--- 37,46 ----
$clientversion="0.0.8.2"; // added appserver driver but broke postgres driv.
$clientversion="0.0.8.3"; // split gnue-forms.php in more files,
// added settings.php
! $clientversion="0.0.9"; // fixed postgres bug, split gnue-forms into
! // common and gnue-forms, many new settings
! $clientversion="0.0.9.1"; // add Mailgateway (and modified contact.gfd to
! // use it
require_once("settings.php");
***************
*** 1322,1336 ****
$this->sel_block->query();
}
function commit() {
! if ($this->wizard) {
! $this->sendMail();
! } else {
! $this->sel_block->dtsource->commit();
! }
// commit all datasources
// commit database
}
function rollback() {
// clear all datasources
// rollback the database
}
--- 1325,1340 ----
$this->sel_block->query();
}
function commit() {
! # if ($this->wizard) {
! # $this->sendMail();
! #} else {
! $this->sel_block->dtsource->commit();
! #}
// commit all datasources
// commit database
}
function rollback() {
+ $this->sel_block->dtsource->rollback();
// clear all datasources
// rollback the database
}
***************
*** 1362,1368 ****
}
}
$mailaddr="address@hidden";
- // $mailaddr="address@hidden";
mail ($mailaddr,"GNU Forms submission",$m);
echo "<H1>MAIL SENT TO ".$mailaddr."</H1>";
session_destroy();
--- 1366,1371 ----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue/phpforms INSTALL samples/contact.gfd sampl...,
Jan Ischebeck <=