Exemple #1
0
 * 
 * @author     Dan Ward <*****@*****.**>
 * @copyright  2014
 * @version    1.0
 * @since      1.0
 * @license http://opensource.org/licenses/gpl-3.0.html GNU General Public License v3
 */
ini_set('display_errors', 'On');
error_reporting(E_ALL | E_STRICT);
include_once "zipCodeRanges.php";
$StateFound = "";
$StateSelected = "AL";
$StateRangeCheck = "";
//POST find state by zipcode.
if (isset($_POST["findstate"])) {
    $StateFound = findState($_POST["findstate_zipcode"]);
}
//POST check state vs zipcode.
if (isset($_POST["checkrange"])) {
    $StateSelected = $_POST["checkrange_state"];
    if (checkStateZip($StateSelected, $_POST["checkrange_zipcode"])) {
        $StateRangeCheck = "State and Zipcode match!";
    } else {
        $StateRangeCheck = "State and Zipcode do not match!";
    }
}
?>
<html>
    <head>
        <title>Zipcode Range Checker</title>
        <link rel="stylesheet" href="css/style.css" />
Exemple #2
0
$findstate3_sig = $wrapper->wrapPhpFunction(array('xmlrpcServerMethodsContainer', 'findState'));
$obj = new xmlrpcServerMethodsContainer();
$findstate4_sig = $wrapper->wrapPhpFunction(array($obj, 'findstate'));
$findstate5_sig = $wrapper->wrapPhpFunction('xmlrpcServerMethodsContainer::findState', '', array('return_source' => true));
eval($findstate5_sig['source']);
$findstate6_sig = $wrapper->wrapPhpFunction('inner_findstate', '', array('return_source' => true));
eval($findstate6_sig['source']);
$findstate7_sig = $wrapper->wrapPhpFunction(array('xmlrpcServerMethodsContainer', 'findState'), '', array('return_source' => true));
eval($findstate7_sig['source']);
$obj = new xmlrpcServerMethodsContainer();
$findstate8_sig = $wrapper->wrapPhpFunction(array($obj, 'findstate'), '', array('return_source' => true));
eval($findstate8_sig['source']);
$findstate9_sig = $wrapper->wrapPhpFunction('xmlrpcServerMethodsContainer::findState', '', array('return_source' => true));
eval($findstate9_sig['source']);
$findstate10_sig = array("function" => function ($req) {
    return findState($req);
}, "signature" => $findstate_sig, "docstring" => $findstate_doc);
$findstate11_sig = $wrapper->wrapPhpFunction(function ($stateNo) {
    return inner_findstate($stateNo);
});
$c = new xmlrpcServerMethodsContainer();
$moreSignatures = $wrapper->wrapPhpClass($c, array('prefix' => 'tests.', 'method_type' => 'all'));
$returnObj_sig = $wrapper->wrapPhpFunction(array($c, 'returnObject'), '', array('encode_php_objs' => true));
// used to test signatures with NULL params
$findstate12_sig = array(array(Value::$xmlrpcString, Value::$xmlrpcInt, Value::$xmlrpcNull), array(Value::$xmlrpcString, Value::$xmlrpcNull, Value::$xmlrpcInt));
function findStateWithNulls($req)
{
    $a = $req->getParam(0);
    $b = $req->getParam(1);
    if ($a->scalartyp() == Value::$xmlrpcNull) {
        return new PhpXmlRpc\Response(new Value(inner_findstate($b->scalarval())));