Example #1
0
File: pb.php Project: rkania/GS3
function write_alert($message, $alert_type = 'ERROR')
{
    xml('<' . '?xml version="1.0" encoding="UTF-8" ?' . '>');
    xml('<IppDisplay>');
    xml('<IppScreen ID="1" HiddenCount="0" CommandCount="0">');
    xml('  <IppAlert Type="' . htmlEnt($alert_type) . '" Delay="5000">');
    xml('    <Title>' . htmlEnt(__('Fehler')) . '</Title>');
    xml('    <Text>' . htmlEnt($message) . '</Text>');
    xml('    <Image></Image>');
    xml('  </IppAlert>');
    xml('</IppScreen>');
    xml('</IppDisplay>');
    xml_output();
}
Example #2
0
    } else {
        $api_status_code = 403;
        $api_status_txt = $api_upload->error;
    }
} else {
    $api_status_code = 403;
    $api_status_txt = $error;
}
$REST_API = array('status_code' => $api_status_code, 'status_txt' => $api_status_txt, 'data' => $api_data_array);
$OUTPUT_REST_API = array_filter($REST_API);
switch ($format) {
    default:
    case 'json':
    default:
        json_output($OUTPUT_REST_API, $callback);
        break;
    case 'xml':
        xml_output($OUTPUT_REST_API);
        break;
    case 'txt':
        echo $api_txt_output;
        break;
    case 'redirect':
        if ($OUTPUT_REST_API['status_code'] == 200) {
            $redirect_url = __CHV_BASE_URL__ . __CHV_VIRTUALFOLDER_IMAGE__ . '/' . $api_upload->image_info['image_id_public'];
            header("Location: {$redirect_url}");
        } else {
            die($OUTPUT_REST_API['status_txt']);
        }
        break;
}
Example #3
0
 public function xml_output()
 {
     return xml_output();
 }
                    }
                }
            }
        } else {
            //	echo $myplz ."#";
            //	echo $mycity ."#";
            //	echo $mystr ."#";
            //	echo $mynr ."#";
            //	echo $myzs ."#";
            //	print_r($both);
            checkSH($mystr, $mynr, $myzs, $myplz, $mycity);
        }
    }
}
//$fillSH = checkSH("Akazienweg",30,false,56075,"Koblenz");
xml_output();
function checkMinLength($str)
{
    if (strlen($str) < 3) {
        //errorOutput();
        null_output();
        die;
    }
}
//Strasse Hausnummer
function checkSH($s, $h, $z, $p, $o)
{
    global $bufferSH, $arraySH, $epsg;
    if ($o && $s) {
        $str_schl = array();
        $str_schl_gem = array();
Example #5
0
$header[] = intval(subStr($mac, 4, 2), 16);
$header[] = intval(subStr($mac, 6, 2), 16);
$header[] = intval(subStr($mac, 8, 2), 16);
$header[] = intval(subStr($mac, 10, 2), 16);
// 0c 0d 0e 0f - CR LF CR LF
$header[] = 0xd;
# CR
$header[] = 0xa;
# LF
$header[] = 0xd;
# CR
$header[] = 0xa;
# LF
if ($phone_model == 'gxp2110x') {
    ob_start();
    echo xml_output();
    if (!headers_sent()) {
        header('Content-Type: text/xml');
        # avoid chunked transfer-encoding
        header('Content-Length: ' . (int) @ob_get_length());
    }
    @ob_flush();
} else {
    #####################################################################
    #  output
    #####################################################################
    ob_start();
    echo grandstream_binary_output($header, $body);
    if (!headers_sent()) {
        header('Content-Type: application/octet-stream');
        # avoid chunked transfer-encoding