A PHP Error was encountered

Severity: 8192

Message: Function create_function() is deprecated

Filename: geshi/geshi.php

Line Number: 4698

Backtrace:

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 4698
Function: _error_handler

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 4621
Function: _optimize_regexp_list_tokens_to_string

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 1655
Function: optimize_regexp_list

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 2029
Function: optimize_keyword_group

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 2168
Function: build_parse_cache

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/Process.php
Line: 45
Function: parse_code

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/models/Pastes.php
Line: 517
Function: syntax

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/controllers/Main.php
Line: 693
Function: getPaste

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/index.php
Line: 315
Function: require_once

Re: Re: falalalalalala23 - Stikked
From Ema, 5 Years ago, written in JavaScript.
This paste is a reply to Re: falalalalalala23 from falalalalalala - view diff
Embed
  1. function agregarArchivoAAdjuntos(archivo) {
  2.     var opcion = document.createElement('option');
  3.     opcion.value = GLOBAL.PlateformPublicationPath + decodeURIComponent(archivo.replace(new RegExp('\\+', 'g'), ' ').replace(new RegExp('\\/', 'g'), '\\'));
  4.     opcion.text = decodeURIComponent(archivo.substring(archivo.lastIndexOf('/') + 1).replace(new RegExp('\\+', 'g'), ' '));
  5.     opcion.selected = true;
  6.     document.getElementById('liAdjuntos').appendChild(opcion);
  7. }
  8.  
  9. ////Aca deberiamos poner un minador de falalacoins
  10.  
  11. function adjuntarArchivo() {
  12.     $("#btUpload").prop("disabled", true);
  13.     var form = document.getElementById("fileUploadForm");
  14.     var formData = new FormData(form);
  15.     formData.append("sessionId", GLOBAL.USER);
  16.     $.ajax({
  17.         type: "POST",
  18.         url: "../../../../ChatFileUpload/api/fileupload/",
  19.         enctype: "multipart/form-data",
  20.         contentType: false,
  21.         processData: false,
  22.         cache: false,
  23.         data: formData,
  24.         success: function (data, textStatus, xhr) {
  25.             if (data != "ERROR") {
  26.                 $("#btUpload").prop("disabled", false);
  27.                 agregarArchivoAAdjuntos(data);
  28.             } else {
  29.                 alert("Error al subir el archivo.");
  30.                 $("#btUpload").prop("disabled", false);
  31.             }
  32.         },
  33.         error: function (xmlHttpRequest, textStatus, errorThrown) {
  34.             alert(textStatus + ": " + errorThrown);
  35.             $("#btUpload").prop("disabled", false);
  36.         }
  37.     });
  38. }
  39. // OMG WORKS GREAT!!!!! :O