phpBMS

Changeset 635 for trunk/phpbms/common

Show
Ignore:
Timestamp:
08/10/09 12:02:41 (3 years ago)
Author:
nate
Message:
  • Sales Orders' addedit javascript now transfers lineitems via JSON and not a modified csv.
  • Sales Orders' prepareVariables method, which should only be used in the addedit pages, will take this lineitem information and make it into php array format.
  • Sales Orders' insertRecord and updateRecord only take php arrays now ( no need to parse the lineitem information in these methods ).
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/phpbms/common/javascript/common.js

    r631 r635  
    972972} 
    973973 
     974function addslashes (str) { 
     975    // Escapes single quote, double quotes and backslash characters in a string with backslashes 
     976    // 
     977    // version: 908.406 
     978    // discuss at: http://phpjs.org/functions/addslashes 
     979    // +   original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) 
     980    // +   improved by: Ates Goral (http://magnetiq.com) 
     981    // +   improved by: marrtins 
     982    // +   improved by: Nate 
     983    // +   improved by: Onno Marsman 
     984    // +   input by: Denny Wardhana 
     985    // +   improved by: Brett Zamir (http://brett-zamir.me) 
     986    // *     example 1: addslashes("kevin's birthday"); 
     987    // *     returns 1: 'kevin\'s birthday' 
     988 
     989    return (str+'').replace(/([\\"'])/g, "\\$1").replace(/\u0000/g, "\\0"); 
     990} 
     991 
     992function stripslashes (str) { 
     993    // +   original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) 
     994    // +   improved by: Ates Goral (http://magnetiq.com) 
     995    // +      fixed by: Mick@el 
     996    // +   improved by: marrtins 
     997    // +   bugfixed by: Onno Marsman 
     998    // +   improved by: rezna 
     999    // +   input by: Rick Waldron 
     1000    // +   reimplemented by: Brett Zamir (http://brett-zamir.me) 
     1001    // *     example 1: stripslashes('Kevin\'s code'); 
     1002    // *     returns 1: "Kevin's code" 
     1003    // *     example 2: stripslashes('Kevin\\\'s code'); 
     1004    // *     returns 2: "Kevin\'s code" 
     1005    return (str+'').replace(/\\(.?)/g, function (s, n1) { 
     1006        switch (n1) { 
     1007            case '\\': 
     1008                return '\\'; 
     1009            case '0': 
     1010                return '\0'; 
     1011            case '': 
     1012                return ''; 
     1013            default: 
     1014                return n1; 
     1015        } 
     1016    }); 
     1017} 
     1018 
    9741019 
    9751020/* Function Overloads and Extensions --------------------- */ 
phpBMS vulnerability assesment provided by Orvant Inc. Copyright © 2010 Kreotek, LLC. All Rights reserved.