コード例 #1
0
<?php

require "androidLib.php";
if (debug) {
    include 'logging.php';
    $log = new logging();
    $log->write("get_adress:\n" . print_r($_POST, true));
} else {
    $log = false;
}
$dbA = authDB();
$auth = userData($dbA, $_POST["sessid"], $_POST["ip"], $_POST['mandant'], $_POST["login"], $_POST["password"], $f);
if ($log) {
    $log->write("Auth:" . print_r($auth, true));
}
function mkwort($txt)
{
    $txt = strtr($txt, '?*', '_%');
    if (substr($txt, 0, 1) == '!') {
        return substr($txt, 1);
    }
    return '%' . $txt;
}
if ($auth["db"]) {
    $postarray = array("name", "city", "street", "phone");
    $custsql = array();
    $vendsql = array();
    $contsql = array();
    $rs = false;
    $db = $auth["db"];
    foreach ($postarray as $key) {
コード例 #2
0
ファイル: android.php プロジェクト: vanloswang/kivitendo-crm
<?php

require "androidLib.php";
if (debug) {
    include 'logging.php';
    $log = new logging();
} else {
    $log = false;
}
if ($log) {
    $log->write("android:" . print_r($_POST, true));
}
$db = authDB();
if ($db) {
    $session = authuser($db, $_POST['mandant'], $_POST["login"], $_POST["password"], $_POST["ip"]);
    if ($log) {
        $log->write("androit2\n" . print_r($session, true));
    }
}
if ($log) {
    $log->close();
}
if ($session) {
    echo "200:" . $session['sess'];
} else {
    echo false;
}