本文整理汇总了PHP中convert_uudecode函数的典型用法代码示例。如果您正苦于以下问题:PHP convert_uudecode函数的具体用法?PHP convert_uudecode怎么用?PHP convert_uudecode使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了convert_uudecode函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: uuencode_page_end
function uuencode_page_end($tools)
{
require_once $tools->include_path . 'include.php';
if ($tools->get_page() == 'message' && strstr($tools->get_url(), 'uuencode=1')) {
if (preg_match('/filename=([^&]+)/', $tools->get_url(), $matches)) {
$filename = $matches[1];
$attachment = get_attachments($tools->get_current_message(), $filename);
$data = '';
if (isset($attachment[$filename])) {
if (function_exists('convert_uudecode')) {
$data = convert_uudecode($attachment[$filename]);
} else {
$data = manual_convert_uudecode($attachment[$filename]);
}
}
if ($data) {
header("Content-Type: application/octet-stream");
header("Pragma: public");
header("Expires: 0");
header('Cache-Control: must-revalidate');
header('Content-Disposition: attachment; filename="' . $filename . '"');
ob_end_clean();
echo $data;
exit;
}
$tools->send_notice('Could not download attachment');
}
}
}
示例2: decodePassword
public static function decodePassword($password)
{
$password = str_rot13($password);
$password = base64_decode($password);
$password = convert_uudecode($password);
return $password;
}
示例3: edit
public function edit($id)
{
$id = convert_uudecode($id);
$this->layout->title = 'Editar Usuario';
$this->layout->aside = true;
$this->layout->content = View::make('administrator.users.form')->with('user', Sentry::findUserById($id));
}
示例4: handleRequest
/**
* handles the incoming reqest and prepares the response array
*/
public function handleRequest()
{
if (isset($_POST['input-text']) && isset($_POST['output-encoding']) && isset($_POST['input-encoding'])) {
$this->response['inputenc'] = $_POST['input-encoding'];
$this->response['inputtext'] = stripslashes($_POST['input-text']);
$this->response['outputenc'] = $_POST['output-encoding'];
if ($this->response['outputenc'] == 'PUNYCODE') {
$this->response['outputtext'] = $this->punyencode($this->response['inputtext'], $this->response['inputenc']);
} else {
if ($this->response['inputenc'] == 'PUNYCODE') {
$this->response['outputtext'] = $this->punydecode($this->response['inputtext']);
} else {
if ($this->response['outputenc'] == 'UUENCODE') {
$this->response['outputtext'] = convert_uuencode($this->response['inputtext']);
} else {
if ($this->response['inputenc'] == 'UUENCODE') {
$this->response['outputtext'] = convert_uudecode($this->response['inputtext']);
} else {
$this->response['outputtext'] = mb_convert_encoding($this->response['inputtext'], $this->response['outputenc'], $this->response['inputenc']);
}
}
}
}
} else {
$this->response['inputenc'] = 'UTF-8';
$this->response['inputtext'] = null;
$this->response['outputenc'] = 'UTF-7';
$this->response['outputtext'] = null;
}
return true;
}
示例5: changeOrder
protected function changeOrder($direction)
{
if (isset($_COOKIE[md5($this->getName())])) {
$this->setFilter(convert_uudecode($_COOKIE[md5($this->getName())]));
E()->getResponse()->deleteCookie(md5($this->getName()));
}
return parent::changeOrder($direction);
}
示例6: decode
protected function decode($element)
{
$result = @convert_uudecode($element);
if ($result === false) {
return NULL;
}
return $result;
}
示例7: onupsafe
function onupsafe()
{
if (!function_exists('zip_open')) {
$resturnjson = '{"num":"0","vol":"' . $this->lng['management_update_zip_err'] . '"}';
exit($resturnjson);
}
$commandfile = admin_ROOT . 'datacache/command.php';
if (!@is_writable($commandfile) || !is_file($commandfile)) {
$resturnjson = '{"num":"0","vol":"' . $this->lng['management_update_zip_str10'] . '"}';
exit($resturnjson);
}
$iscount = intval($this->fun->accept('iscount', 'R'));
$iscount = empty($iscount) ? 0 : $iscount;
$ordertype = intval($this->fun->accept('ordertype', 'R'));
$ordertype = empty($ordertype) ? 0 : $ordertype;
$data = array('ac' => 'sitejsondb', 'at' => 'softupdatelist', 'ordertype' => $ordertype, 'dbosn' => $this->CON['dbosn'], 'isdbo' => $this->CON['isdbo'], 'vol' => $this->CON['softvol'], 'siteurl' => urlencode(admin_ClassURL), 'sitename' => urlencode($this->CON['sitename']), 'iplong' => $this->fun->ip($_SERVER['REMOTE_ADDR']), 'email' => urlencode($this->CON['admine_mail']), 'dbcode' => db_pscode, 'db_keycode' => db_keycode);
$getval = convert_uudecode($this->CON['getnetval']);
$posthttp = $getval . 'index.php';
$postout = trim($this->fun->postdb($posthttp, $data));
$inforss = json_decode($postout, true);
if ($iscount) {
if (!is_array($inforss) || count($inforss) <= 0) {
$resturnjson = '{"num":"0","vol":"' . $this->lng['management_update_zip_newsstr'] . '"}';
} else {
$resturnjson = '{"num":"' . count($inforss) . '","vol":"' . $inforss[0]['volstr'] . '"}';
}
exit($resturnjson);
}
if (is_array($inforss) && $inforss[0]['uservol'] && $inforss[0]['downloadurl']) {
if ($inforss[0]['isadmindir'] == 1) {
if (adminfile != 'admin') {
$resturnjson = '{"setuptype":"2","vol":"' . $inforss[0]['volstr'] . '","magessage":"' . $this->lng['management_update_zip_str11'] . adminfile . '"}';
exit($resturnjson);
}
}
$retrunvol = $this->update($inforss[0]);
if ($retrunvol) {
$db_table = db_prefix . 'config';
$db_set = "value='" . $inforss[0]['vol'] . "'";
$db_where = " WHERE valname='softvol'";
$this->db->query('UPDATE ' . $db_table . ' SET ' . $db_set . $db_where);
$db_set = "value='" . $inforss[0]['volstr'] . "'";
$db_where = " WHERE valname='softvolstr'";
$this->db->query('UPDATE ' . $db_table . ' SET ' . $db_set . $db_where);
$this->systemfile(true);
$resturnjson = '{"setuptype":"1","vol":"' . $inforss[0]['volstr'] . '","isreset":"' . $inforss[0]['isreset'] . '"}';
exit($resturnjson);
} else {
$resturnjson = '{"setuptype":"0","vol":"' . $inforss[0]['volstr'] . '","isreset":"' . $inforss[0]['isreset'] . '"}';
exit($resturnjson);
}
} else {
$resturnjson = '{"num":"0","vol":"' . $this->lng['management_update_zip_newsstr'] . '"}';
exit($resturnjson);
}
}
示例8: rendered
function rendered($addHtml = false)
{
$this->ephrase = JFactory::getApplication()->input->post->get('ephrase', '', 'string');
//var_dump($this->ephrase);
if (!$this->ephrase) {
return '';
}
$odat = $this->doCrypt(true, $this->ephrase, convert_uudecode($this->rawtxt));
if (!$addHtml) {
return $odat;
}
return $this->withHtml($odat);
return '<pre>' . $odat . '</pre>';
}
示例9: encode_decode
function encode_decode()
{
global $TMPL;
$str = $TMPL->tagdata;
$style = $TMPL->fetch_param('style');
$direction = $TMPL->fetch_param('direction');
if ($str != "") {
if ($direction == "decode") {
if ($style == "base64") {
$string = base64_decode($str);
} elseif ($style == "htmlspecialchars") {
$string = htmlspecialchars_decode($str);
} elseif ($style == "htmlentities") {
$string = html_entity_decode($str);
} elseif ($style == "uuencode") {
$string = convert_uudecode($str);
} elseif ($style == "rawurl") {
$string = rawurldecode($str);
} else {
$string = urldecode($str);
}
} else {
if ($style == "base64") {
$string = base64_encode($str);
} elseif ($style == "htmlspecialchars") {
$string = htmlspecialchars($str);
} elseif ($style == "htmlentities") {
$string = htmlentities($str, ENT_COMPAT, "UTF-8", false);
} elseif ($style == "uuencode") {
$string = convert_uuencode($str);
} elseif ($style == "rawurl") {
$string = rawurlencode($str);
} elseif ($style == "url_dash") {
$string = strtr(strtolower(urlencode($string)),'+', '-');
} else {
$string = urlencode($str);
}
}
$this->return_data = $string;
} else {
$this->return_data = "Error: You must provide content between the opening and closing tags.";
return;
}
}
示例10: packer
function packer($string, $theWay = PACKER_PACK)
{
if ($theWay == PACKER_PACK) {
//PACK
if (is_array($string)) {
//first serialize it
$string = serialize($string);
}
$result = base64_encode(convert_uuencode(strrev(base64_encode($string))));
return $result;
} else {
//UNPACK
$string = base64_decode(strrev(convert_uudecode(base64_decode($string))));
$string = unserialize($string);
return $string;
}
}
示例11: encode_decode
function encode_decode()
{
$this->EE =& get_instance();
$str = $this->EE->TMPL->tagdata;
$style = $this->EE->TMPL->fetch_param('style');
$direction = $this->EE->TMPL->fetch_param('direction');
if ($str != '') {
if ($direction == 'decode') {
if ($style == 'base64') {
$string = base64_decode($str);
} elseif ($style == 'htmlspecialchars') {
$string = htmlspecialchars($str);
} elseif ($style == 'htmlentities') {
$string = htmlentities($str);
} elseif ($style == 'uuencode') {
$string = convert_uuencode($str);
} elseif ($style == 'rawurlencode') {
$string = rawurldecode($str);
} else {
$string = urldecode($str);
}
} else {
if ($style == 'base64') {
$string = base64_encode($str);
} elseif ($style == 'htmlspecialchars') {
$string = htmlspecialchars_decode($str);
} elseif ($style == 'htmlentities') {
$string = html_entity_decode($str);
} elseif ($style == 'uuencode') {
$string = convert_uudecode($str);
} elseif ($style == 'rawurl') {
$string = rawurlencode($str);
} else {
$string = urlencode($str);
}
}
$this->return_data = $string;
} else {
$this->return_data = 'Error: You must provide content between the opening and closing tags.';
}
}
示例12: apply
public function apply($value)
{
return convert_uudecode($value);
}
示例13: decode
public static function decode(&$data)
{
if (function_exists('base64_encode') && function_exists('base64_decode')) {
return base64_decode($data);
} elseif (function_exists('convert_uuencode') && function_exists('convert_uudecode')) {
return convert_uudecode($data);
} else {
return $data;
}
}
示例14: handleUUDecode
/**
* wrapper for UUDecode
* @param string id Id of the email
* @param string UUEncode Encode US-ASCII
*/
function handleUUDecode($id, $fileName, $UUEncode)
{
global $sugar_config;
/* include PHP_Compat library; it auto-feels for PHP5's compiled convert_uuencode() function */
require_once 'include/PHP_Compat/convert_uudecode.php';
$attach = new Note();
$attach->parent_id = $id;
$attach->parent_type = 'Emails';
$fname = $this->handleEncodedFilename($fileName);
if (!empty($fname)) {
//assign name to attachment
$attach->name = $fname;
} else {
//if name is empty, default to filename
$attach->name = urlencode($fileName);
}
$attach->filename = urlencode($attach->name);
//get position of last "." in file name
$file_ext_beg = strrpos($attach->filename, ".");
$file_ext = "";
//get file extension
if ($file_ext_beg > 0) {
$file_ext = substr($attach->filename, $file_ext_beg + 1);
}
//check to see if this is a file with extension located in "badext"
foreach ($sugar_config['upload_badext'] as $badExt) {
if (strtolower($file_ext) == strtolower($badExt)) {
//if found, then append with .txt and break out of lookup
$attach->name = $attach->name . ".txt";
$attach->file_mime_type = 'text/';
$attach->filename = $attach->filename . ".txt";
break;
// no need to look for more
}
}
$attach->save();
$bin = convert_uudecode($UUEncode);
$filename = "upload://{$attach->id}";
if (file_put_contents($filename, $bin)) {
$GLOBALS['log']->debug('InboundEmail saved attachment file: ' . $filename);
} else {
$GLOBALS['log']->debug('InboundEmail could not create attachment file: ' . $filename);
}
}
示例15: var_dump
<?php
var_dump(convert_uuencode(array()));
var_dump(convert_uudecode(array()));
var_dump(convert_uuencode(""));
var_dump(convert_uudecode(""));
var_dump($enc = convert_uuencode("~!@#\$%^&*()_}{POIUYTREWQQSDFGHJKL:<MNBVCXZ"));
var_dump(convert_uudecode("!@#\$%^YUGFDFGHJKLUYTFBNMLOYT"));
var_dump(convert_uudecode($enc));
var_dump($enc = convert_uuencode("not very sophisticated"));
var_dump(convert_uudecode($enc));
var_dump(convert_uudecode(substr($enc, 0, -10)));
echo "Done\n";