phpBMS

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

Revision 703, 5.7 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: 205 $ | $LastChangedBy: brieb $
4 $LastChangedDate: 2007-03-26 15:50:25 -0700 (Mon, 26 Mar 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
44        $thetable = new phpbmsTable($db, "tbld:7e75af48-6f70-d157-f440-69a8e7f59d38");
45        $therecord = $thetable->processAddEditPage();
46
47        if(isset($therecord["phpbmsStatus"]))
48                $statusmessage = $therecord["phpbmsStatus"];
49
50        $pageTitle="Tab";
51        $phpbms->cssIncludes[] = "pages/tabs.css";
52
53                //Form Elements
54                //==============================================================
55                $theform = new phpbmsForm();
56
57                $theinput = new inputField("name",$therecord["name"],NULL,true,NULL,32,64);
58                $theinput->setAttribute("class","important");
59                $theform->addField($theinput);
60
61                $theinput = new inputField("displayorder",$therecord["displayorder"],"display order",true,NULL,10,10);
62                $theform->addField($theinput);
63
64                $theinput = new inputRolesList($db,"roleid",$therecord["roleid"],"access (role)");
65                $theform->addField($theinput);
66
67                $theinput = new inputChoiceList($db,"tabgroup",$therecord["tabgroup"],"tabgroups", "tab group");
68                $theform->addField($theinput);
69
70                $theinput = new inputCheckbox("enableonnew",$therecord["enableonnew"],"enable on new");
71                $theform->addField($theinput);
72
73                $thetable->getCustomFieldInfo();
74                $theform->prepCustomFields($db, $thetable->customFieldsQueryResult, $therecord);
75                $theform->jsMerge();
76                //==============================================================
77                //End Form Elements
78
79        include("header.php");
80
81?><div class="bodyline">
82        <?php $theform->startForm($pageTitle)?>
83        <fieldset id="fsAttributes">
84                <legend>attributes</legend>
85
86                <p>
87                        <?php $theform->showField("displayorder"); ?><br />
88                        <span class="notes">Lower numbers are displayed first.</span>
89                </p>
90
91                <p><?php $theform->showField("roleid")?></p>
92
93                <p><?php $theform->showField("enableonnew")?></p>
94
95        </fieldset>
96
97        <div id="leftSideDiv">
98                <fieldset>
99                        <legend>details</legend>
100
101                        <p class="big"><?php $theform->showField("name"); ?></p>
102
103                        <p><?php $theform->showField("tabgroup"); ?></p>
104
105                        <p>
106                                <label for="location">location</label><br />
107                                <input id="location" name="location" value="<?php echo htmlQuotes($therecord["location"])?>" size="64" maxlength="128" /><br />
108                                <span class="notes">location should be relative to application root.</span>
109                        </p>
110
111                        <p>
112                                <label for="tooltip">tool tip</label><br />
113                                <input id="tooltip" name="tooltip" value="<?php echo htmlQuotes($therecord["tooltip"])?>" size="64" maxlength="128" />
114                        </p>
115                </fieldset>
116                <fieldset>
117                        <legend><label for="notificationsql">Notification SQL</label></legend>
118                        <span class="notes">SQL statement used to determine display of notification icon on tab.  SQL statment should return a single record, with field "theresult" - a number.  Use {{id]}} for id substitution.</span><br />
119                        <textarea id="notificationsql" name="notificationsql" cols="40" rows="5"><?php echo htmlQuotes($therecord["notificationsql"])?></textarea>
120                </fieldset>
121
122                <?php $theform->showCustomFields($db, $thetable->customFieldsQueryResult) ?>
123
124        </div>
125
126        <?php
127                $theform->showGeneralInfo($phpbms,$therecord);
128                $theform->endForm();
129        ?>
130</div>
131<?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.