本文整理汇总了PHP中hex2str函数的典型用法代码示例。如果您正苦于以下问题:PHP hex2str函数的具体用法?PHP hex2str怎么用?PHP hex2str使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了hex2str函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: HandleCallback
/**
* Function that processes the callback from the bank and returns CPayment objects with isSuccessful
* (and other applicable) parameters filled according to the answers from the bank.
*
* @return CPayment
*/
public function HandleCallback()
{
$rsField = array();
foreach ((array) $_REQUEST as $ixField => $fieldValue) {
$rsField[$ixField] = $fieldValue;
}
$sSignatureBase = sprintf("%03s", $rsField['ver']) . sprintf("%-10s", $rsField['id']) . sprintf("%012s", $rsField['ecuno']) . sprintf("%06s", $rsField['receipt_no']) . sprintf("%012s", $rsField['eamount']) . sprintf("%3s", $rsField['cur']) . $rsField['respcode'] . $rsField['datetime'] . sprintf("%-40s", $rsField['msgdata']) . sprintf("%-40s", $rsField['actiontext']);
function hex2str($hex)
{
for ($i = 0; $i < strlen($hex); $i += 2) {
$str .= chr(hexdec(substr($hex, $i, 2)));
}
return $str;
}
$mac = hex2str($rsField['mac']);
$sSignature = sha1($sSignatureBase);
$flKey = openssl_get_publickey(file_get_contents($this->flBankCertificate));
if (!openssl_verify($sSignatureBase, $mac, $flKey)) {
trigger_error("Invalid signature", E_USER_ERROR);
}
if ($rsField['receipt_no'] == 00) {
return new CPayment($rsField['ecuno'], $rsField['msgdata'], null, null, False);
} else {
return new CPayment($rsField['ecuno'], $rsField['msgdata'], $rsField['eamount'] / 100, $rsField['cur'], True);
}
}
开发者ID:vcgato29,项目名称:poff,代码行数:32,代码来源:EstCardLink.class.php
示例2: isSuccesful
public function isSuccesful()
{
foreach ((array) $_REQUEST as $ixField => $fieldValue) {
$this->responseFields[$ixField] = $fieldValue;
}
$sSignatureBase = sprintf("%03s", $this->responseFields['ver']) . sprintf("%-10s", $this->responseFields['id']) . sprintf("%012s", $this->responseFields['ecuno']) . sprintf("%06s", $this->responseFields['receipt_no']) . sprintf("%012s", $this->responseFields['eamount']) . sprintf("%3s", $this->responseFields['cur']) . $this->responseFields['respcode'] . $this->responseFields['datetime'] . $this->mb_sprintf("%-40s", $this->responseFields['msgdata']) . $this->mb_sprintf("%-40s", $this->responseFields['actiontext']);
function hex2str($hex)
{
$str = '';
for ($i = 0; $i < strlen($hex); $i += 2) {
$str .= chr(hexdec(substr($hex, $i, 2)));
}
return $str;
}
$mac = hex2str($this->responseFields['mac']);
$flKey = openssl_get_publickey(\Configuration::where('code', '=', 'estcard/pubkey')->first()->value);
if (!openssl_verify($sSignatureBase, $mac, $flKey)) {
// invalidSignature
return false;
}
if ($this->responseFields['receipt_no'] == 00) {
# Payment was cancelled
return false;
}
if ($this->responseFields['respcode'] == 00) {
# Payment success
return true;
}
}
开发者ID:Silxik,项目名称:banklink,代码行数:29,代码来源:Estcard.php
示例3: getMessage
function getMessage()
{
$message = $this->message;
$message = hex2str($message);
$message = wordwrap($message, 70);
$this->message = $message;
}
开发者ID:CarlosOVillanueva,项目名称:BIFROST,代码行数:7,代码来源:ArcEmail.php
示例4: main
function main()
{
global $VERSION, $key, $iv2;
$a = $_GET['a'];
switch ($a) {
default:
print '
<html>
<head>
<title>rsdf2txt ' . $VERSION . ' from fox21.at</title>
</head>
<body>
Copy and paste the content of the .rsdf file into this textarea.<br />
<form action="?a=decrypt" method="post">
<textarea name="content" rows="10" cols="60"></textarea><br /><br />
<input type="submit" value="Get" />
</form>
</body>
</head>
';
break;
case 'decrypt':
$content = $_POST['content'];
#$content = implode('', file($url));
$content = hex2str($content);
$links = explode("\r\n", $content);
$out = '';
foreach ($links as $link) {
if (strlen($link) != 0) {
$b64 = base64_decode($link);
$dec = mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $key, $b64, MCRYPT_MODE_CFB, $iv2);
$dec = substr($dec, strpos($dec, '/files/'));
if ($dec != '') {
$out .= "http://rapidshare.com{$dec}\n";
}
}
}
print '
<html>
<head>
<title>rsdf2txt ' . $VERSION . ' from fox21.at</title>
</head>
<body>
<textarea rows="20" cols="70">' . $out . '</textarea>
</body>
</head>
';
break;
}
}
开发者ID:TheFox,项目名称:rsdf2txt,代码行数:50,代码来源:rsdf2txt.php
示例5: color
/**
* @param number $factor
* @return string
*/
public function color($factor)
{
$factor = max(0.0, min(1.0, $factor));
$color1 = $color2 = $this->gradient['0.0'];
$f1 = 0;
foreach ($this->gradient as $f => $color) {
if ($factor <= $f) {
$color2 = $color;
if ($f1 != $f) {
$factor = ($factor - $f1) / ($f - $f1);
} else {
$factor = $f;
}
break;
}
$color1 = $color;
$f1 = $f;
}
return hex2str(interpolate($color1, $color2, $factor));
}
开发者ID:codeagent,项目名称:treemap,代码行数:24,代码来源:Gradient.php
示例6: concat
case 2:
$gdbo->sql = "delete from _srv_resolution where id_srv_resolution={$rid}";
$gdbo->dbTable = "_srv_resolution";
$gdbo->execQuery();
break;
}
$gdbo->sql = "update _srv set srv_du=current_timestamp where id_srv={$id}";
$gdbo->dbTable = "_srv";
$gdbo->execQuery();
$gdbo->sql = "SELECT\na.id_srv_resolution,\nscript2text(a.srv_resolution) as \"Notes\",\nFROM_UNIXTIME(UNIX_TIMESTAMP(a.srv_resolution_dc)+{$gmtOffset}) as \"srv_resolution_dc\",\nFROM_UNIXTIME(UNIX_TIMESTAMP(a.srv_resolution_du)+{$gmtOffset},'%M %D, %Y') as \"srv_resolution_du\",\nconcat(d.cust_contact_givenName,' ',d.cust_contact_familyName) as \"fullname\",\na.id_sys_user,\na.srv_resolution_privateBit,\n(SELECT concat('<img src=''/_avatar/thumb_',fso,''' height=''32'' width=''32''/>') as fso FROM _fso where fso_pkcol='id_cust_contact' AND fso_pk=b.id_cust_contact AND fso_originalname='avatar') as \"Avatar\"\nFROM\n_srv_resolution a\nLEFT JOIN _sys_user_emp b ON a.id_sys_user=b.id_sys_user\nLEFT JOIN _cust_contact d ON b.id_cust_contact=d.id_cust_contact\nWHERE a.id_srv=" . $id . "\nORDER BY\na.srv_resolution_dc DESC";
$gdbo->getRec();
$aResolution = $gdbo->dbData;
if (count($aResolution) > 0) {
$debug = 1;
foreach ($aResolution as $key => $row) {
$isPrivate = $row[6] == 1 ? " [Private Note]" : "";
$editRecord = $row[5] == $id_sys_user ? " onclick=\"editRow('resolution'," . $row[0] . ")\"" : "";
echo "<div class=\"frmrowh\" {$editRecord}>";
foreach ($row as $col => $value) {
if ($col == 1) {
$notes = $row[6] == 1 && $row[5] != $id_sys_user ? encrypt(hex2str($value)) : $value;
$notes = wordwrap($notes, 128, "\n", true);
echo "<div class=\"srvDate\" id=\"resolution_head_" . $row[0] . "\">\n<div class=\"flLeft\">" . $row[7] . " Last updated " . $row[3] . " by " . $row[4] . "</div><div class=\"flRight\">{$isPrivate}</div></div>";
echo "<div class=\"srvData\" id=\"resolution_" . $row[0] . "\">" . $notes . "</div>";
}
}
echo "</div>";
}
} else {
echo "";
}
开发者ID:CarlosOVillanueva,项目名称:BIFROST,代码行数:31,代码来源:sql_resolution.php
示例7: dosendsms
function dosendsms($msisdn, $sms_text)
{
// 短信中心号码
$smsc = "8613800755500";
// 短信最大长度70个汉字,Unicode表示需要280个字节
$max_len = 280;
$invert_smsc = InvertNumbers($smsc);
$len = 1;
$s = chr(13);
$msisdn = "86" . $msisdn;
$sms_text = $sms_text;
$pdu_text = hex2str(gb2unicode($sms_text));
echo gb2unicode($sms_text) . "\n";
$invert_msisdn = InvertNumbers($msisdn);
// 拆分发送超过70汉字的短信(todo: 没有判断全英文的情况)
$pdu_len = strlen($pdu_text);
if ($pdu_len > $max_len) {
$pdu_text1 = substr($pdu_text, 0, $max_len);
$pdu_text = substr($pdu_text, $max_len, $pdu_len - $max_len);
} else {
$pdu_text1 = $pdu_text;
$pdu_text = "";
}
$pdu_len1 = sprintf("%02X", strlen($pdu_text1) / 2);
$pdu_text1 = $pdu_len1 . $pdu_text1;
$pdu_text1 = "11000D91" . $invert_msisdn . "000800" . $pdu_text1;
$atcmd = "AT+CMGS=" . sprintf("%d", strlen($pdu_text1) / 2) . chr(13);
$l = strlen($atcmd);
echo $atcmd . "\n";
/*
$ll = @dio_write($fd,$atcmd);
while ($l != $ll) {
sleep(10);
$ll = @dio_write($fd,$atcmd);
}
if ($DEBUG) echo date("Y-m-d H:i:s")." DEBUG $atcmd\n";
do {
$data = dio_read($fd, $len);
echo $data;
} while ( $data != $s );
sleep(1);
*/
$pdu_text1 = "0891" . $invert_smsc . $pdu_text1 . chr(26) . chr(13);
$l = strlen($pdu_text1);
echo $pdu_text1 . "\n";
/*
$ll = @dio_write($fd,$pdu_text1);
while ($l != $ll) {
sleep(10);
$ll = @dio_write($fd,$pdu_text1);
}
if ($DEBUG) echo date("Y-m-d H:i:s")." DEBUG $pdu_text1\n";
do {
$data = dio_read($fd, $len);
echo $data;
} while ( $data != $s );
sleep(7);
*/
}
开发者ID:BackupTheBerlios,项目名称:flushcms,代码行数:63,代码来源:sms_pdu.php
示例8: ArcTbl
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
require_once "_lib/php/auth.php";
if (!isset($_POST["id_cfg"])) {
$_POST["id_cfg"] = "";
}
$device = new ArcTbl();
$device->dbConStr = $globalDBCON;
$device->dbLimit = 10;
$device->dbOffset = 0;
$device->dbType = $globalDBTP;
$device->dbSchema = $globalDB;
$device->recIndex = "id_cfg_device";
$device->recOrder = "asc";
$device->actionDestination = "popWindow";
$device->recOrderCol = "Label";
$device->recLink = $path . "edit_cfgdevice.php";
$device->actionFilterKey = "id_cfg_device";
$device->recQuery = "\nSELECT\na.cfg_device as \"Device Label\",\na.id_cfg_device,\nc.device_grp as \"Type\",\nb.device as \"Device\",\na.cfg_device_os as \"OS\",\nconcat(f.cust_contact_familyName,',',f.cust_contact_givenName) as \"Admin\",\na.cfg_device_serialnumber as \"Serial Number\",\nUNHEX(a.cfg_device_notes) as \"Notes\",\nFROM_UNIXTIME(UNIX_TIMESTAMP(a.cfg_device_dc)+" . $gmtOffset . ",'%Y-%m-%d') as \"Date Entered\",\nFROM_UNIXTIME(UNIX_TIMESTAMP(a.cfg_device_du)+" . $gmtOffset . ") as \"Last Update\",\nd.sys_status as \"Status\",\nCASE\nWHEN a.cfg_device_keyenabled = 1\nTHEN 'Yes'\nELSE 'No'\nEND as \"Manageable\",\na.id_cfg,\nconcat('\n<input type=\"button\" value=\"Interfaces\" onclick=\"arc(''popWindow'',''/_mod/smod_18/manage_interface.php'',''id_cfg=',cast(id_cfg as char),'&id_cfg_device=',cast(a.id_cfg_device as char),'&id_device=',cast(a.id_device as char),''',1,1)\"/>\n<input type=\"button\" value=\"Delete\" onclick=\"delCfgDevice(',cast(id_cfg as char),',',cast(a.id_cfg_device as char),')\"/>\n') as \"\" FROM _cfg_device a\nLEFT JOIN\n_device b ON a.id_device=b.id_device\nLEFT JOIN\n_device_grp c ON b.id_device_grp=c.id_device_grp\nLEFT JOIN\n_sys_status d ON a.id_sys_status=d.id_sys_status\nLEFT JOIN\n_hr_emp e ON a.id_hr_emp = e.id_hr_emp\nLEFT JOIN\n_cust_contact f ON e.id_cust_contact = f.id_cust_contact\nWHERE a.id_cfg=" . $_POST["id_cfg"] . " ORDER by a.cfg_device";
$device->ajDestination = "list18-0";
$device->ajPage = "/_mod/smod_18/list_cfgdevice.php";
$device->recOrder = "asc";
$device->recOrderCol = "Device";
$device->ignoreCols = array("id_cfg", "Notes", "Date Entered", "id_cfg_device");
$device->ignoreFilterCols = array("id_cfg", "id_cfg_device", "");
$device->build();
echo hex2str($device->tblNav);
echo $device->dataTable;
开发者ID:CarlosOVillanueva,项目名称:BIFROST,代码行数:31,代码来源:list_cfgdevice.php
示例9: snmp_hexstring
function snmp_hexstring($hex)
{
return hex2str(str_replace(' ', '', str_replace(' 00', '', $hex)));
}
开发者ID:syzdek,项目名称:librenms,代码行数:4,代码来源:functions.php
示例10: snmp_hexstring
function snmp_hexstring($str)
{
if (isHexString($str)) {
return hex2str(str_replace(' ', '', str_replace(' 00', '', $str)));
} else {
return $str;
}
}
开发者ID:rhizalpatrax64bit,项目名称:StacksNetwork,代码行数:8,代码来源:functions.inc.php
示例11: parsEmo
function parsEmo($matches)
{
return hex2str($matches[1]);
}
开发者ID:rsiva6,项目名称:WhatsAPI,代码行数:4,代码来源:example.php
示例12: decrypt
function decrypt($str)
{
$key = $GLOBALS['salt'];
$str = hex2str($str);
$str = mcrypt_decrypt(MCRYPT_DES, $key, $str, MCRYPT_MODE_ECB);
$block = mcrypt_get_block_size('des', 'ecb');
$pad = ord($str[($len = strlen($str)) - 1]);
return substr($str, 0, strlen($str) - $pad);
}
开发者ID:CarlosOVillanueva,项目名称:BIFROST,代码行数:9,代码来源:ArcCore.php
示例13: array
# Contract Type
require "_model/dboContractTp.php";
$gdbo->getRec();
$listContractTp = $gdbo->dbData;
# Contract Category
require "_model/dboContractCat.php";
$gdbo->getRec();
$listContractCat = $gdbo->dbData;
# Contract Status
require "_model/dboContractStatus.php";
$gdbo->getRec();
$listContractStatus = $gdbo->dbData;
# Fieldset Variables
$buttonDate = '<div class="elementIconBox" onclick="openCalendar(this,\'interface\',null,\'dateFld\')"><i class="fa fa-calendar"></i></div>';
# Fieldsets
$fsContract = array(array(array("*Organization", "id_cust_company", null, 1, $listCompany, $rec[0]["id_cust_company"]), array("*Status", "id_sys_status", null, 1, $listContractStatus, $rec[0]["id_sys_status"]), array(null, "id_contract", null, 3, null, $rec[0]["id_contract"])), array(array("*Type", "id_contract_tp", null, 1, $listContractTp, $rec[0]["id_contract_tp"]), array("*Category", "id_contract_cat", null, 1, $listContractCat, $rec[0]["id_contract_cat"])), array(array("*Contract", "contract", null, 0, null, $rec[0]["contract"]), array("*Label", "contract_label", null, 0, null, $rec[0]["contract_label"])), array(array("*Value", "contract_value", 'onblur="validateElement(\'money\',this)"', 0, null, $rec[0]["contract_value"]), array("Paid to Date", "paid", 'disabled="disabled"', 0, null, $rec[0]["contract_paid"])), array(array('Award Date', 'contract_da', 'class="dateFld elementIcon" onblur="validateElement(\'date\',this)"', 0, null, $rec[0]["contract_da"], null, $buttonDate, null, 'YYYY-MM-DD'), array("Date Updated", "contract_du", 'disabled="disabled"', 0, null, $rec[0]["contract_du"])), array(array('Execution Date', 'contract_ds', 'class="dateFld elementIcon" onblur="validateElement(\'date\',this)"', 0, null, $rec[0]["contract_ds"], null, $buttonDate, null, 'YYYY-MM-DD'), array("Date Terminated", "contract_dr", 'disabled="disabled"', 0, null, $rec[0]["contract_dr"])), array(array('Expiration Date', 'contract_de', 'class="dateFld elementIcon" onblur="validateElement(\'date\',this)"', 0, null, $rec[0]["contract_ds"], null, $buttonDate, null, 'YYYY-MM-DD')), array(array('General Notes', 'contract_notes', 'onkeydown="detectTab(this,event)"', 6, null, hex2str($rec[0]["contract_notes"]))), array(array('Billing Notes', 'contract_billingNotes', 'onkeydown="detectTab(this,event)"', 6, null, hex2str($rec[0]["contract_billingNotes"]))));
$requiredFields = "contract_value,id_cust_company,id_sys_status,contract_label,contract,id_contract_cat,id_contract_tp";
?>
<form method="post" id="frmContract" name="frmContract" action="javascript:submitFrmVals('content','/_mod/smod_08/sql.php','<?php
echo $requiredFields;
?>
','&form=frmContract&action=update','frmContract')">
<fieldset id="contract_detail">
<legend>Contract Detail</legend>
<?php
echo frmElements($fsContract);
?>
</fieldset>
</form>
<form action="#">
<fieldset id="Files">
开发者ID:CarlosOVillanueva,项目名称:BIFROST,代码行数:31,代码来源:edit.php
示例14: sendImage
public function sendImage($msgid, $to, $path, $size, $link, $b64thumb)
{
$thumb_length = hex2str(_hex(strlen($b64thumb)));
$to_length = chr(mb_strlen($to, "UTF-8"));
$msgid_length = chr(mb_strlen($msgid));
$path_length = chr(mb_strlen($path));
$size_length = chr(mb_strlen($size));
// in bytes
$link_length = chr(strlen($link));
$content = "ø] úü{$to_length}";
$content .= $to;
$content .= "Š¢Cü{$msgid_length}";
$content .= $msgid;
$content .= "øøº½OøøŒø\f\\½°¢Düfileü{$path_length}";
$content .= $path;
$content .= "üsizeü{$size_length}";
$content .= $size;
$content .= "¥ü{$link_length}";
$content .= $link;
$content .= "ý{$thumb_length}";
$content .= $b64thumb;
$total_length = hex2str(_hex(strlen($content)));
$msg = "";
$msg .= "{$total_length}";
$msg .= $content;
echo str2hex($msg);
$stream = $this->send($msg);
$this->read();
}
开发者ID:rprados,项目名称:WhatsAPI,代码行数:29,代码来源:whatsapp.v2.php
示例15: foreach
$inc = 1;
foreach ($dboData as $Column => $Data) {
$comma = $inc != 1 ? "," : "";
$dbo->{$Column} = $Data;
$inc = $inc + 1;
}
if (isset($dbo->dependents)) {
$dependents = json_decode($dbo->dependents);
foreach ($dependents as $element => $name) {
echo '<script>$("' . $name . '").prop("disabled",true);</script>';
}
}
$attributes = isset($dbo->attributes) ? $dbo->attributes : "";
$recID = isset($dbo->id) ? $dbo->id : "";
if (!empty($_POST["VAL"])) {
$dbo->sql = $dbo->sql . " " . $dbo->dbFilter . hex2str($_POST["VAL"]);
$dbo->getRec();
$results = $dbo->dbData;
$count = $dbo->dbRows;
$disabled = "";
} else {
$results = array();
$disabled = 'disabled="disabled"';
}
if ($count == 0) {
$disabled = 'disabled="disabled"';
$first = null;
$text = null;
} else {
$first = $results[0][0];
$text = $results[0][1];
开发者ID:CarlosOVillanueva,项目名称:BIFROST,代码行数:31,代码来源:ArcFilterRec.php
示例16: hex2str
$contactMethods = hex2str($_POST["contact_method_mText"]);
$contactMethods = json_decode($contactMethods);
$contactMethodsInsertStr = array2sqlstring($contactMethods, "0,2");
}
if (isset($_POST["degree_mText"])) {
$degree = hex2str($_POST["degree_mText"]);
$degree = json_decode($degree);
$degreeInsertStr = array2sqlstring($degree, "0,1,2,4,5,6");
}
if (isset($_POST["certification_mText"])) {
$certification = hex2str($_POST["certification_mText"]);
$certification = json_decode($certification);
$certificationInsertStr = array2sqlstring($certification, "3,4,5");
}
if (isset($_POST["insurance_mText"])) {
$insurance = hex2str($_POST["insurance_mText"]);
$insurance = json_decode($insurance);
$insuranceInsertStr = array2sqlstring($insurance, "0,2,3,4");
}
# Multi Form Columns
$contactMethodsCols = "contact_method,contact_method_notes,id_contact_method_tp,id_cust_contact";
$degreeCols = "hr_degree_hours,hr_degree,hr_degree_ds,hr_degree_da,id_hr_degree_status,id_hr_degree_level,id_cust_company,id_cust_branch,id_hr_emp";
$certificationCols = "hr_certification_hours,hr_certification_ds,hr_certification_da,id_hr_certification_status,id_hr_certification_provider,id_hr_certification_tp,id_hr_emp";
$insuranceCols = "hr_insurance_ds,hr_insurance_de,id_cust_company,id_hr_insurance_plan,id_hr_insurance_coverage,id_hr_emp";
# Parse Form Action
$action = $_POST['action'];
$form = $_POST['form'];
$formAction = $form . "," . $action;
# Begin SQL Functions
switch ($formAction) {
case "frmEmp,insert":
开发者ID:CarlosOVillanueva,项目名称:BIFROST,代码行数:31,代码来源:sql.php
示例17: json_decode
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
require_once "_lib/php/auth.php";
$arctbl = json_decode(hex2str($_POST["arctbl"]), TRUE);
$cols = json_decode(hex2str($_POST["arccols"]), TRUE);
foreach ($cols as $key => $col) {
$coltype[$key] = $col["type"];
$collabel[$key] = $col["name"];
}
array_multisort($collabel, SORT_ASC, $cols);
$colFullArray = array();
foreach ($cols as $column) {
$colFullArray[] = array($column["type"], $column["name"]);
}
?>
<div id="popBox">
<form method="POST" id="frmFilter" name="frmFilter" action="javascript:buildLocalFilter('<?php
echo $arctbl["ajPage"];
?>
','<?php
开发者ID:CarlosOVillanueva,项目名称:BIFROST,代码行数:31,代码来源:ArcDbFilter.php
示例18: and
.syntaxhighlighter table td.code .line {
white-space: pre-wrap !important;
word-wrap: break-word !important;
}
@media screen and (max-width: 680px) {
.syntaxhighlighter .gutter {
display:none;
}
</style>
<?php
/*
Copyright (C) © 2010-2013 BIFRÖST SOFTWARE LLC
Author: Carlos Omar Villanueva
*/
require "_lib/php/auth.php";
$data = hex2str($_POST["DBO"]);
?>
<html>
<head>
<title></title>
<link href="/_thirdparty/syntaxhighlighter_3.0.83/styles/shThemeDefault.css" rel="stylesheet" type="text/css"/>
<link href="/_thirdparty/syntaxhighlighter_3.0.83/styles/shCoreDefault.css" rel="stylesheet" type="text/css"/>
<script src="/_thirdparty/ckeditor/ckeditor.js" type="text/javascript"></script>
<script src="/_lib/jquery/0-jquery.js" type="text/javascript"></script>
<script src="/_lib/js/ArcJS.js" type="text/javascript"></script>
<script src="/_thirdparty/syntaxhighlighter_3.0.83/scripts/shCore.js" type="text/javascript"></script>
<script src="/_thirdparty/syntaxhighlighter_3.0.83/scripts/shLegacy.js" type="text/javascript"></script>
<script src="/_thirdparty/syntaxhighlighter_3.0.83/scripts/shBrushJScript.js" type="text/javascript"></script>
<script src="/_thirdparty/syntaxhighlighter_3.0.83/scripts/shBrushXml.js" type="text/javascript"></script>
</head><body>
<?php
开发者ID:CarlosOVillanueva,项目名称:BIFROST,代码行数:31,代码来源:ArcDocExport.php
示例19: hex2str
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
require_once "_lib/php/auth.php";
if (isset($_POST["uid"])) {
$uid = hex2str($_POST["uid"]);
$arrUser = explode(",", $uid);
# Find existing users
$gdbo->sql = "SELECT id_sys_user FROM _srv_res WHERE id_srv=" . $_POST["id_srv"];
$gdbo->getRec();
$recordset = $gdbo->dbData;
$existing = array_column($recordset, 0);
$newusers = array_diff($arrUser, $existing);
$users = "";
foreach ($newusers as $key => $value) {
if ($key != 0) {
$comma = ",";
} else {
$comma = "";
}
$users .= $comma . "(" . $_POST["id_srv"] . ",{$value})";
开发者ID:CarlosOVillanueva,项目名称:BIFROST,代码行数:31,代码来源:sql_resources.php
示例20: foreach
foreach ($_GET as $key => $value) {
$data_received[$key] = $value;
}
}
if (count($_POST) > 0) {
foreach ($_POST as $key => $value) {
$data_received[$key] = $value;
}
}
//Treating the whole frame
$frame = $data_received['frame'];
//Parsing:
$frame_type = hexdec(substr($frame, 6, 2));
$data_fields = hexdec(substr($frame, 8, 2));
//Converting all to ASCII
$frame_ascii = hex2str($frame);
//Exploding the frame by #
$array_data = explode('#', $frame_ascii);
$id_secret = $array_data[1];
$id_wasp = $array_data[2];
$frame_number = $array_data[3];
$Sensortype = $id_wasp;
$Sensorname = $id_secret;
//Now, we take all the sensors data: (BAT:89)
for ($index = 0; $index < $data_fields; $index++) {
$sensor = explode(':', $array_data[$index + 4]);
if ($debug) {
print_r($sensor);
echo '<br>';
}
$sensor_ascii = $sensor[0];
开发者ID:macano953,项目名称:MEngThesis,代码行数:31,代码来源:Parser_Web_Service.php
注:本文中的hex2str函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论