phpBMS

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

Revision 703, 5.6 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
40        include("../../include/session.php");
41        include("include/tables.php");
42        include("include/fields.php");
43        include("include/usersearches.php");
44
45        $thetable = new userSearches($db, "tbld:e251524a-2da4-a0c9-8725-d3d0412d8f4a");
46        $therecord = $thetable->processAddEditPage();
47
48        if(isset($therecord["phpbmsStatus"]))
49                $statusmessage = $therecord["phpbmsStatus"];
50
51        if($therecord["userid"])
52                $username = $phpbms->getUserName($therecord["userid"], true);
53        else
54                $username = "global";
55
56
57        $pageTitle="Saved Searches";
58
59        $phpbms->cssIncludes[] = "pages/usersearches.css";
60
61                //Form Elements
62                //==============================================================
63                $theform = new phpbmsForm();
64
65                $theinput = new inputField("id", $therecord["id"], NULL, false, NULL, 5);
66                $theinput->setAttribute("class","uneditable");
67                $theinput->setAttribute("readonly","readonly");
68                $theform->addField($theinput);
69
70                $theinput = new inputBasicList("typeDisplay", $therecord["type"], array("Search"=>"SCH","Sort"=>"SRT"), "type");
71                $theinput->setAttribute("disabled","disabled");
72                $theform->addField($theinput);
73
74                if($therecord["userid"] === ""){
75
76                        $theinput = new inputRolesList($db,"roleid",$therecord["roleid"],"access (role)");
77                        $theform->addField($theinput);
78
79                }//endif
80
81                $theinput = new inputField("name",$therecord["name"],NULL,true,NULL,64,128);
82                $theinput->setAttribute("class","important");
83                $theform->addField($theinput);
84
85                $theform->jsMerge();
86                //==============================================================
87                //End Form Elements
88
89        include("header.php");
90
91?><div class="bodyline">
92        <?php $theform->startForm($pageTitle)?>
93
94        <fieldset id="fsAttributes">
95                <legend>attributes</legend>
96
97                <p><?php $theform->showField("id"); ?></p>
98
99                <p>
100                        <?php $theform->showField("typeDisplay"); ?>
101                        <input type="hidden" id="type" name="type" value="<?php echo $therecord["type"]?>" />
102                </p>
103
104                <p>
105                        <label for="tabledefid">table</label><br />
106                        <?php $thetable->showTableSelect("tabledefid",$therecord["tabledefid"]) ?>
107                </p>
108
109                <p>
110                        <label for="username">user</label><br />
111                        <input type="hidden" id="userid" name="userid" value="<?php echo $therecord["userid"]?>" />
112                        <input id="username" name="username" type="text" value="<?php echo htmlQuotes($username) ?>" size="32" readonly="readonly" class="uneditable" />
113                </p>
114
115                <?php if($therecord["userid"] != "") {?>
116                <p>
117                        <input id="makeglobal" name="makeglobal" type="checkbox" class="radiochecks" value="1" /><label for="makeglobal">make global</label>
118                </p>
119                <?php } else {?>
120
121                        <p><?php $theform->showField("roleid")?></p>
122
123                <?php } ?>
124        </fieldset>
125
126        <div id="leftSideDiv">
127                <fieldset>
128                        <legend>name / sql</legend>
129                        <p><?php $theform->showField("name");?></p>
130
131                        <p>
132                                <label for="sqlclause">SQL where clause</label><br />
133                                <textarea id="sqlclause" name="sqlclause" cols="62" rows="12"><?php echo htmlQuotes($therecord["sqlclause"])?></textarea>
134                        </p>
135                </fieldset>
136        </div>
137
138        <div id="createmodifiedby"><input id="cancelclick" name="cancelclick" type="hidden" value="0" />
139                <div id="savecancel2"><?php showSaveCancel(2)?></div>
140        </div>
141
142        <?php
143                $theform->endForm();
144        ?>
145</div>
146<?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.