phpBMS

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

Revision 703, 6.3 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: 285 $ | $LastChangedBy: brieb $
4 $LastChangedDate: 2007-08-27 14:05:27 -0600 (Mon, 27 Aug 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        include("../../include/session.php");
40        include("include/fields.php");
41        include("include/tables.php");
42
43
44        $thetable = new phpbmstable($db,"tbld:29925e0a-c825-0067-8882-db4b57866a96");
45        $therecord = $thetable->processAddEditPage();
46
47
48        if(isset($therecord["phpbmsStatus"]))
49                $statusmessage = $therecord["phpbmsStatus"];
50
51        $phpbms->cssIncludes[] = "pages/base/smartsearches.css";
52
53                //Form Elements
54                //==============================================================
55                $theform = new phpbmsForm();
56
57                $theinput = new inputField("id",$therecord["id"],NULL,false,NULL,9,64);
58                $theinput->setAttribute("class","uneditable");
59                $theinput->setAttribute("readonly","readonly");
60                $theform->addField($theinput);
61
62                $theinput = new inputField("name",$therecord["name"],NULL,true,NULL,50,255,false);
63                $theinput->setAttribute("class","important");
64                $theform->addField($theinput);
65
66                $theinput = new inputDataTableList($db, "moduleid", $therecord["moduleid"], "modules", "uuid", "displayname",
67                                                                "", "", false, "module");
68                $theform->addField($theinput);
69
70                $theinput = new inputDataTableList($db, "tabledefid", $therecord["tabledefid"], "tabledefs", "uuid", "displayname",
71                                                                "", "", false, "table");
72                $theform->addField($theinput);
73
74                $theinput = new inputTextarea("fromclause",$therecord["fromclause"], "from clause" ,true, 3,80);
75                $theform->addField($theinput);
76
77                $theinput = new inputField("valuefield",$therecord["valuefield"],"value field",true,NULL,50,255);
78                $theform->addField($theinput);
79
80                $theinput = new inputTextarea("displayfield",$therecord["displayfield"], "display field" ,true, 3,80);
81                $theform->addField($theinput);
82
83                $theinput = new inputTextarea("secondaryfield",$therecord["secondaryfield"], "secondary field" ,true, 3,80);
84                $theform->addField($theinput);
85
86                $theinput = new inputTextarea("classfield",$therecord["classfield"], "class field" ,true, 3,80);
87                $theform->addField($theinput);
88
89                $theinput = new inputTextarea("rolefield",$therecord["rolefield"], "role field" ,false, 3,80);
90                $theform->addField($theinput);
91
92                $theinput = new inputTextarea("searchfields",$therecord["searchfields"], "search fields" ,true, 3,80);
93                $theform->addField($theinput);
94
95                $theinput = new inputTextarea("filterclause",$therecord["filterclause"], "filter clause" ,true, 3,80);
96                $theform->addField($theinput);
97
98                $thetable->getCustomFieldInfo();
99                $theform->prepCustomFields($db, $thetable->customFieldsQueryResult, $therecord);
100                $theform->jsMerge();
101                //==============================================================
102                //End Form Elements
103
104
105        $pageTitle="Smart Search";
106
107        include("header.php");
108?><div class="bodyline">
109        <?php $theform->startForm($pageTitle)?>
110
111        <div id="rightSideDiv">
112                <fieldset>
113                        <legend>attributes</legend>
114                        <p><?php $theform->showField("moduleid");?></p>
115                        <p><?php $theform->showField("tabledefid");?></p>
116                </fieldset>
117        </div>
118
119        <div id="leftSideDiv">
120
121                <fieldset>
122                        <legend><label for="name">name</label></legend>
123                        <p class="big"><?php $theform->showField("name"); ?></p>
124                        <p class="notes">Name must be unique.</p>
125                </fieldset>
126
127                <fieldset >
128                        <legend>sql</legend>
129
130                        <p><?php $theform->showField("fromclause"); ?></p>
131
132                        <p><?php $theform->showField("valuefield"); ?></p>
133
134                        <p><?php $theform->showField("searchfields"); ?></p>
135
136                        <p><?php $theform->showField("displayfield"); ?></p>
137
138                        <p><?php $theform->showField("secondaryfield"); ?></p>
139
140                        <p><?php $theform->showField("classfield"); ?></p>
141
142                        <p><?php $theform->showField("rolefield"); ?></p>
143
144                        <p><?php $theform->showField("filterclause"); ?></p>
145
146                </fieldset>
147
148                <?php $theform->showCustomFields($db, $thetable->customFieldsQueryResult) ?>
149
150        </div>
151        <?php
152                $theform->showGeneralInfo($phpbms,$therecord);
153                $theform->endForm();
154        ?>
155</div>
156<?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.