phpBMS

root/trunk/phpbms/modules/base/relationships_addedit.php

Revision 703, 5.0 KB (checked in by brieb, 2 years ago)
  • Rearranged payment processing routine to be more flexible. It now needs to save the sales order first
  • Added payment processing template so developers have a guide when putting together their payment scripts
  • It seems their might be some unintentional touching of other files in this commit;
  • Property svn:keywords set to LastChangedBy LastChangedDate LastChangedRevision
Line 
1<?php
2/*
3 $Rev$ | $LastChangedBy$
4 $LastChangedDate$
5 +-------------------------------------------------------------------------+
6 | Copyright (c) 2004 - 2010, Kreotek LLC                                  |
7 | All rights reserved.                                                    |
8 +-------------------------------------------------------------------------+
9 |                                                                         |
10 | Redistribution and use in source and binary forms, with or without      |
11 | modification, are permitted provided that the following conditions are  |
12 | met:                                                                    |
13 |                                                                         |
14 | - Redistributions of source code must retain the above copyright        |
15 |   notice, this list of conditions and the following disclaimer.         |
16 |                                                                         |
17 | - Redistributions in binary form must reproduce the above copyright     |
18 |   notice, this list of conditions and the following disclaimer in the   |
19 |   documentation and/or other materials provided with the distribution.  |
20 |                                                                         |
21 | - Neither the name of Kreotek LLC nor the names of its contributore may |
22 |   be used to endorse or promote products derived from this software     |
23 |   without specific prior written permission.                            |
24 |                                                                         |
25 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS     |
26 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT       |
27 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A |
28 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT      |
29 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,   |
30 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT        |
31 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,   |
32 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY   |
33 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT     |
34 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   |
35 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.    |
36 |                                                                         |
37 +-------------------------------------------------------------------------+
38*/
39        include("../../include/session.php");
40        include("include/tables.php");
41        include("include/fields.php");
42        include("include/relationships.php");
43
44        $thetable = new relationships($db, "tbld:8d19c73c-42fb-d829-3681-d20b4dbe43b9");
45        $therecord = $thetable->processAddEditPage();
46
47        if(isset($therecord["phpbmsStatus"]))
48                $statusmessage = $therecord["phpbmsStatus"];
49
50        $pageTitle="Table Relationship";
51
52        $phpbms->cssIncludes[] = "pages/relationships.css";
53
54                //Form Elements
55                //==============================================================
56                $theform = new phpbmsForm();
57
58                $theinput = new inputField("name",$therecord["name"],NULL,true,NULL,64,64);
59                $theinput->setAttribute("class","important");
60                $theform->addField($theinput);
61
62                $theinput = new inputField("fromfield",$therecord["fromfield"],"from field",true,NULL,32,64);
63                $theform->addField($theinput);
64
65                $theinput = new inputField("tofield",$therecord["tofield"],"to field",true,NULL,32,64);
66                $theform->addField($theinput);
67
68                $theinput = new inputCheckbox("inherint",$therecord["inherint"],"inherent relationship");
69                $theform->addField($theinput);
70
71                $thetable->getCustomFieldInfo();
72                $theform->prepCustomFields($db, $thetable->customFieldsQueryResult, $therecord);
73                $theform->jsMerge();
74                //==============================================================
75                //End Form Elements
76
77        include("header.php");
78
79?><div class="bodyline">
80        <?php $theform->startForm($pageTitle)?>
81
82        <fieldset>
83                <legend><label for="name">name</label></legend>
84                <p class="big">
85                        <?php $theform->showField("name");?>
86                </p>
87        </fieldset>
88
89        <fieldset>
90                <legend>From</legend>
91                <p>
92                        <label for="fromtableid">from table definition</label><br />
93                        <?php $thetable->displayTables("fromtableid",$therecord["fromtableid"]) ?>
94                </p>
95
96                <p><?php $theform->showField("fromfield"); ?></p>
97
98        </fieldset>
99
100        <fieldset>
101                <legend>to</legend>
102                <p>
103                        <label for="totableid">table</label><br />
104                        <?php $thetable->displayTables("totableid",$therecord["totableid"]) ?>
105                </p>
106
107                <p><?php $theform->showField("tofield"); ?></p>
108
109                <p><?php $theform->showField("inherint");?></p>
110
111                <p class="notes">
112                        Note: Use "inherent relationship" if the "to table" is already included in the "from table" query table (see the
113                        "from table's" definition)
114                </p>
115        </fieldset>
116
117        <?php $theform->showCustomFields($db, $thetable->customFieldsQueryResult) ?>
118
119        <?php
120                $theform->showGeneralInfo($phpbms,$therecord);
121                $theform->endForm();
122        ?>
123</div>
124<?php include("footer.php");?>
Note: See TracBrowser for help on using the browser.
phpBMS vulnerability assesment provided by Orvant Inc. Copyright © 2010 Kreotek, LLC. All Rights reserved.