phpBMS

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

Revision 703, 5.1 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;
Line 
1<?php
2/*
3 $Rev: 331 $ | $LastChangedBy: brieb $
4 $LastChangedDate: 2007-10-15 16:13:23 -0600 (Mon, 15 Oct 2007) $
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
40        include("../../include/session.php");
41        include("include/tables.php");
42        include("include/fields.php");
43        include("include/widgets.php");
44
45        $thetable = new widgets($db, "tbld:2ad5146c-d4c0-db8e-592a-c0cc2f3c2c21");
46        $therecord = $thetable->processAddEditPage();
47
48        if(isset($therecord["phpbmsStatus"]))
49                $statusmessage = $therecord["phpbmsStatus"];
50
51        $pageTitle="Widget";
52
53        $phpbms->cssIncludes[] = "pages/base/widgets.css";
54        //$phpbms->jsIncludes[] = "modules/base/javascript/menu.js";
55
56                //Form Elements
57                //==============================================================
58                $theform = new phpbmsForm();
59
60                $theinput = new inputField("title", $therecord["title"], NULL, true);
61                $theinput->setAttribute("class","important");
62                $theform->addField($theinput);
63
64                $temparray = array("Large Side"=>"big", "Smaller Side"=>"little");
65                $theinput = new inputBasiclist("type", $therecord["type"], $temparray, "Area");
66                $theform->addField($theinput);
67
68                $theinput = new inputDataTableList($db, "moduleid", $therecord["moduleid"], "modules", "uuid", "displayname",
69                                                                "", "", false, "module");
70                $theform->addField($theinput);
71
72                $theinput = new inputCheckbox("default", $therecord["default"], NULL);
73                $theform->addField($theinput);
74
75                $theinput = new inputField("file", $therecord["file"], NULL, true);
76                $theform->addField($theinput);
77
78                $theinput = new inputRolesList($db,"roleid",$therecord["roleid"],"access (role)");
79                $theform->addField($theinput);
80
81                $thetable->getCustomFieldInfo();
82                $theform->prepCustomFields($db, $thetable->customFieldsQueryResult, $therecord);
83                $theform->jsMerge();
84                //==============================================================
85                //End Form Elements
86
87
88        include("header.php");
89
90?><div class="bodyline">
91        <?php $theform->startForm($pageTitle)?>
92
93        <fieldset id="fsAttributes">
94                <legend>attributes</legend>
95
96                <p><?php $theform->showField("type")?></p>
97
98                <p><?php $theform->showField("default")?></p>
99
100                <p><?php $theform->showField("moduleid")?></p>
101
102                <p><?php $theform->showField("roleid")?></p>
103
104        </fieldset>
105
106        <div id="leftSideDiv">
107                <fieldset>
108                        <legend>title / file</legend>
109
110                        <p class="big">
111                                <?php $theform->showField("title"); ?>
112                        </p>
113
114                        <p>
115                                <?php $theform->showField("file"); ?><br />
116                                <span class="notes">path relative to base directory of class that extends widget class</span>
117                        </p>
118
119                </fieldset>
120
121                <?php $theform->showCustomFields($db, $thetable->customFieldsQueryResult) ?>
122
123        </div>
124
125        <?php
126                $theform->showGeneralInfo($phpbms,$therecord);
127                $theform->endForm();
128        ?>
129</div>
130<?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.