コード例 #1
0
ファイル: nexttransfer.php プロジェクト: kibblerz/medinaud
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}
$id = $_SESSION['id'];
if ($_POST['submit'] == 'next') {
    $id = $id + 50;
} else {
    if ($_POST['submit'] === 'previous') {
        $id = $_SESSION['id'] - 50;
    }
}
$ifRan = true;
$Query = $_SESSION['Query'];
if ($ifRan == true) {
    echo $Query . ' limit ' . $id . ',50';
    $fQuery = $conn->Query($Query . ' limit ' . $id . ',49');
    echo '<table border=1>';
    echo '<th>Transfer Date <br />&<br />Parcel Number</th> 
    <th>Conveyance <br /> Number</th> 
    <th>To <br />& <br /> From</th> 
    <th>Acres,<br /> Legal Description<br /> & <br /> Property Address </th> 
    <th>Sale Amount<br /> &<br /> Land Use </th>';
    for ($i = 0; $i < $fQuery->num_rows; ++$i) {
        $result = $fQuery->fetch_array();
        echo '<tr>';
        echo '<td>';
        echo $result['mtransferDate'] . "<br />";
        echo $result['SourceParcel'];
        echo '</td>';
        echo '<td>';
        echo $result['mconveyanceNumber'];
コード例 #2
0
ファイル: growth-group-import.cli.php プロジェクト: alcf/chms
<?php

$objParameters = new QCliParameterProcessor('growth-group-import', 'ALCF Growth Group Importer Script');
$objParameters->AddDefaultParameter('server', QCliParameterType::String, 'Server/Host of the MySQL Database');
$objParameters->AddDefaultParameter('dbname', QCliParameterType::String, 'Database Name of the MySQL Database');
$objParameters->AddDefaultParameter('username', QCliParameterType::String, 'Username of the MySQL user');
$objParameters->Run();
$objMySqli = new mysqli($objParameters->GetDefaultValue('server'), $objParameters->GetDefaultValue('username'), null, $objParameters->GetDefaultValue('dbname'));
$objMinistry = Ministry::LoadByToken('growth');
if (!$objMinistry) {
    exit('No GG Ministry Found');
}
$objResult = $objMySqli->Query('SELECT * FROM growth_group_structure order by id;');
while ($objRow = $objResult->fetch_array()) {
    $objStructure = new GrowthGroupStructure();
    $objStructure->Name = $objRow['name'];
    $objStructure->Save();
}
$objResult = $objMySqli->Query('SELECT * FROM growth_group_location order by id;');
$objParentGroupArray = array();
while ($objRow = $objResult->fetch_array()) {
    $objGrowthGroupLocation = new GrowthGroupLocation();
    $objGrowthGroupLocation->Location = $objRow['location'];
    $objGrowthGroupLocation->Longitude = $objRow['longitude'];
    $objGrowthGroupLocation->Latitude = $objRow['latitude'];
    $objGrowthGroupLocation->Zoom = $objRow['zoom'];
    $objGrowthGroupLocation->Save();
    $strTokens = explode('(', $objGrowthGroupLocation->Location);
    $objParentGroup = Group::CreateGroupForMinistry($objMinistry, GroupType::GroupCategory, trim($strTokens[0]), 'Growth Groups in ' . $objGrowthGroupLocation->Location);
    $objGroupCategory = new GroupCategory();
    $objGroupCategory->Group = $objParentGroup;
コード例 #3
0
ファイル: functions.php プロジェクト: kibblerz/medinaud
function transferSearch()
{
    //Connect to database and initialize variables
    $conn = new mysqli("172.16.11.120", "auditorlook", "lookup4prop", "webdata");
    if ($conn->connect_error) {
        die("Connection failed: " . $conn->connect_error);
    }
    $AmountMin = $_POST['AmountMin'];
    $AmountMax = $_POST['AmountMax'];
    $Grantor = $_POST['Grantor'];
    $Grantee = $_POST['Grantee'];
    $Parcel = $_POST['Parcel'];
    $City = $_POST['City'];
    $Tax = $_POST['Tax'];
    $Street = $_POST['Street'];
    $Building = $_POST['Building'];
    $Valid = $_POST['Valid'];
    $DTE = $_POST['DTE'];
    $ifRan = false;
    if ($_POST['Year'] != null && $_POST['Month'] != null) {
        $Year = $_POST['Year'] . "%' \n\t\t\t\t\tAND mtransferDate LIKE '_____" . $_POST['Month'];
    } else {
        if ($_POST['Year'] == null && $_POST['Month'] != null) {
            $Year = $_POST['Month'];
        } else {
            if ($_POST['Year'] != null && $_POST['Month'] == null) {
                $Year = $_POST['Year'];
            } else {
                if ($_POST['Year'] == null && $_POST['Month'] == null) {
                    $Year = null;
                }
            }
        }
    }
    $querys = "SELECT ge.*, det.* FROM governmaxextract AS ge \n\t\n\tLEFT JOIN detinfo AS det \n\tON ge.mpropertyNumber = det.mpropertyNumber \t\t\n\t\n\tWHERE ge.mpropertyNumber = '{$Parcel}'";
    $conn->query($querys);
    $Query = 'select * from governmaxtransferhistoryextract where ';
    runQuery('mtransferDate', $Year, " LIKE ", "%'");
    runQuery('msalesAmount', $AmountMin, ' >= ', "'");
    runQuery('msalesAmount', $AmountMax, '<=', "'");
    runQuery('FromDeededOwner', $Grantor, ' LIKE ', "%'");
    runQuery('ToDeededOwner', $Grantee, ' LIKE ', "%'");
    runQuery('SourceParcel', $Parcel, ' = ', "'");
    runQuery('mlocCity', $City, ' LIKE ', "%'");
    runQuery('mcamaId', $Tax, ' LIKE ', "%'");
    runQuery('mlocStrName', $Street, ' LIKE ', "%'");
    runQuery('LandOnlySale', $Building, ' = ', "'");
    runQuery('msaleValid', $Valid, ' = ', "'");
    runQuery('UseCode', $DTE, ' = ', "'");
    if ($ifRan = true) {
        echo $Query;
        $fQuery = $conn->Query($Query);
        echo '<table border=1>';
        for ($i = 0; $i <= $fQuery->num_rows; $i++) {
            $result = $fQuery->fetch_array();
            echo '<tr>';
            echo '<td>';
            echo $result['mtransferDate'] . "<br />";
            echo $result['SourceParcel'];
            echo '</td>';
            echo '<td>';
            echo $result['mconveyanceNumber'];
            echo '</td>';
            echo '<td>';
            echo "To: " . $result['ToDeededOwner'] . "<br />";
            echo "From: " . $result['FromDeededOwner'];
            echo '</td>';
            echo '<td>';
            echo "Acres: " . $result['macres'] . "<br />";
            echo "Legal: " . $result['mlegalDescription'] . "<br />";
            echo "Location: " . $result['LocationAddress'];
            echo '</td>';
            echo '<td>';
            echo 'Sale Amount: ' . $result['msalesAmount'] . '<br />';
            echo 'Building: ' . $result['LandOnlySale'] . '<br />';
            echo 'DTE: ' . $result['UseCode'];
            echo '</td>';
            echo '</tr>';
        }
        echo '</table>';
    } else {
        echo 'please enter data';
    }
    function runQuery($field, $fieldData, $Operator, $wildcard)
    {
        global $Query;
        global $ifRan;
        if ($fieldData != null && $ifRan == false) {
            $Query = $Query . $field . $Operator . "'" . $fieldData . $wildcard;
            $ifRan = true;
        } else {
            if ($fieldData != null && $ifRan == true) {
                $Query = $Query . ' and ' . $field . $Operator . "'" . $fieldData . $wildcard;
            } else {
                if ($fieldData == null) {
                    return;
                }
            }
        }
    }
}
コード例 #4
0
<?php

ini_set('memory_limit', '1024M');
$objMySqli = new mysqli('localhost', 'root', '', 'alcf_address');
QDataGen::DisplayForEachTaskStart('Cleaning Addresses', Address::CountAll());
foreach (Address::LoadAll() as $objAddress) {
    QDataGen::DisplayForEachTaskNext('Cleaning Addresses');
    $strQuery = sprintf("SELECT id FROM address WHERE address_1 %s AND address_2 %s AND address_3 %s AND city %s AND state %s AND zip_code %s;", is_null($objAddress->Address1) ? 'IS NULL' : "='" . $objMySqli->escape_string($objAddress->Address1) . "'", is_null($objAddress->Address2) ? 'IS NULL' : "='" . $objMySqli->escape_string($objAddress->Address2) . "'", is_null($objAddress->Address3) ? 'IS NULL' : "='" . $objMySqli->escape_string($objAddress->Address3) . "'", is_null($objAddress->City) ? 'IS NULL' : "='" . $objMySqli->escape_string($objAddress->City) . "'", is_null($objAddress->State) ? 'IS NULL' : "='" . $objMySqli->escape_string($objAddress->State) . "'", is_null($objAddress->ZipCode) ? 'IS NULL' : "='" . $objMySqli->escape_string($objAddress->ZipCode) . "'");
    $objResult = $objMySqli->Query($strQuery);
    if ($objRow = $objResult->fetch_array()) {
        $objResult = $objMySqli->Query('SELECT * FROM corrected_address WHERE address_id=' . $objRow['id']);
        $objRow = $objResult->fetch_array();
        if ($objRow['status_flag'] == 1) {
            $objAddress->Address1 = $objRow['address_1'];
            $objAddress->Address2 = $objRow['address_2'];
            $objAddress->City = $objRow['city'];
            $objAddress->State = $objRow['state'];
            $objAddress->ZipCode = $objRow['zip_code'];
            $objAddress->InvalidFlag = false;
            $objAddress->VerificationCheckedFlag = true;
        } else {
            $objAddress->InvalidFlag = true;
        }
        $objAddress->Save();
    } else {
        if (!$objAddress->ValidateUsps()) {
            print "NONE FOUND FOR - " . $objAddress->Id . "\r\n";
            $objAddress->InvalidFlag = true;
            $objAddress->Save();
        }
    }
コード例 #5
0
ファイル: transwidget.php プロジェクト: kibblerz/medinaud
$Query = 'select * from governmaxtransferhistoryextract where ';
runQuery('mtransferDate', $Year, " LIKE ", "%'");
runQuery('msalesAmount', $AmountMin, ' >= ', "'");
runQuery('msalesAmount', $AmountMax, '<=', "'");
runQuery('FromDeededOwner', $Grantor, ' LIKE ', "%'");
runQuery('ToDeededOwner', $Grantee, ' LIKE ', "%'");
runQuery('SourceParcel', $Parcel, ' = ', "'");
runQuery('mlocCity', $City, ' LIKE ', "%'");
runQuery('mcamaId', $Tax, ' LIKE ', "%'");
runQuery('mlocStrName', $Street, ' LIKE ', "%'");
runQuery('LandOnlySale', $Building, ' = ', "'");
runQuery('msaleValid', $Valid, ' = ', "'");
runQuery('UseCode', $DTE, ' = ', "'");
if ($ifRan = true) {
    echo $Query;
    $fQuery = $conn->Query($Query);
    echo '<table border=1>';
    for ($i = 0; $i <= $fQuery->num_rows; $i++) {
        $result = $fQuery->fetch_array();
        echo '<tr>';
        echo '<td>';
        echo $result['mtransferDate'] . "<br />";
        echo $result['SourceParcel'];
        echo '</td>';
        echo '<td>';
        echo $result['mconveyanceNumber'];
        echo '</td>';
        echo '<td>';
        echo "To: " . $result['ToDeededOwner'] . "<br />";
        echo "From: " . $result['FromDeededOwner'];
        echo '</td>';