function GetBLOBFieldValue($prepared_query, $parameter, $blob, &$value) { for ($value = "0x"; !MetabaseEndOfLOB($blob);) { if (!MetabaseReadLOB($blob, $data, $this->lob_buffer_length)) { $value = ""; return $this->SetError("Get BLOB field value", MetabaseLOBError($blob)); } $value .= Bin2Hex($data); } return 1; }
#------------------------------------------------------------------------------- foreach ($Servers as $Server) { foreach (array('slaveserver.edit') as $Func) { $Array[] = SPrintF($XML, $Func, $Server['Login'], $Server['Password'], $Server['Params']['Url']); } } #------------------------------------------------------------------------------- } #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- # строим выхлопную XML'ину $Out = SPrintF('<?xml version="1.0" encoding="UTF-8"?><doc>%s</doc>', Implode('', $Array)); Debug(SPrintF('[comp/www/API/ISPswSettingURL]: Out XML = %s', $Out)); #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- $License = DB_Select('ISPswLicenses', array('LicKey'), array('UNIQ', 'Where' => SPrintF('`elid` = %u', $id))); switch (ValueOf($License)) { case 'error': return ERROR | @Trigger_Error(500); case 'exception': return new gException('LICENSE_NOT_FOUND', 'Лицензия не найдена'); case 'array': break; default: return ERROR | @Trigger_Error(101); } #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- echo Bin2Hex(xxtea_encrypt($Out, $License['LicKey'])); #------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
/** * Convert a text value into a DBMS specific format that is suitable to * compose query statements. * * @param resource $prepared_query query handle from prepare() * @param $parameter * @param $blob * @return string text string that represents the given argument value in * a DBMS specific format. * @access public */ function getBlobValue($prepared_query, $parameter, $blob) { $value = "0x"; while (!$this->endOfLob($blob)) { if (MDB::isError($result = $this->readLob($blob, $data, $this->options['lob_buffer_length']))) { return $result; } $value .= Bin2Hex($data); } return $value; }