phpBMS

root/trunk/phpbms/modules/api/push_records_ajax.php

Revision 703, 3.5 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: 643 $ | $LastChangedBy: nate $
4 $LastChangedDate: 2009-09-02 14:00:56 -0600 (Wed, 02 Sep 2009) $
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    require("../../include/session.php");
40   
41    if(!isset($_GET["id"]))
42        $error = new appError(300,"Passed variable not set (id)");
43   
44    $querystatement = "
45        SELECT
46            `name`,
47            `uuid`
48        FROM
49            `usersearches`
50        WHERE
51            `tabledefid` ='".mysql_real_escape_string($_GET["id"])."'
52            AND
53            `type` = 'SCH'
54        ";
55   
56    $queryresult = $db->query($querystatement);
57   
58    $thereturn = array();
59    $blankRecord = array("name"=>"&lt;none&gt;", "uuid"=>"");
60    $thereturn[] = $blankRecord;
61
62    while($therecord = $db->fetchArray($queryresult)){
63       
64        $addRecord = array(
65            "name" => $therecord["name"],
66            "uuid" => $therecord["uuid"]
67        );
68       
69        $thereturn[] = $addRecord;
70       
71    }//end while
72   
73    $thereturn = json_encode($thereturn);
74   
75    echo $thereturn;
76   
77?>
Note: See TracBrowser for help on using the browser.
phpBMS vulnerability assesment provided by Orvant Inc. Copyright © 2010 Kreotek, LLC. All Rights reserved.