base_16_to_64 ($num)
{
$m = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_';
- $hex2bin = ['0000', # 0
- '0001', # 1
- '0010', # 2
- '0011', # 3
- '0100', # 4
- '0101', # 5
- '0110', # 6
- '0111', # 7
- '1000', # 8
- '1001', # 9
- '1010', # a
- '1011', # b
- '1100', # c
- '1101', # d
- '1110', # e
- '1111']; # f
+ $hex2bin = array ('0000', # 0
+ '0001', # 1
+ '0010', # 2
+ '0011', # 3
+ '0100', # 4
+ '0101', # 5
+ '0110', # 6
+ '0111', # 7
+ '1000', # 8
+ '1001', # 9
+ '1010', # a
+ '1011', # b
+ '1100', # c
+ '1101', # d
+ '1110', # e
+ '1111'); # f
$o = '';
$b = '';
$i = 0;
/* file informations */
$md5 = md5_file ($file['tmp_name']);
- $name = trim ($file['name']);
+ $name = str_replace (NL, '', trim ($file['name']));
$mime_type = $file['type'];
$size = $file['size'];
$p .= $ref;
$handle = fopen ($p, 'w');
fwrite ($handle,
- $filename . NL. $type . NL. $password . NL. $time . NL .
- ($one_time ? 'O' : 'R') . NL . $ip . NL . date ('U') . NL .
- $code . NL);
+ str_replace (NL, '', trim ($filename)) . NL .
+ str_replace (NL, '', trim ($type)) . NL . $password . NL .
+ $time . NL . ($one_time ? 'O' : 'R') . NL . $ip . NL .
+ date ('U') . NL . $code . NL);
fclose ($handle);
return $ref . NL . $code ;
jirafeau_async_delete ($ref);
return $md5_link . NL . $delete_link_code;
}
-?>
\ No newline at end of file
+?>