Follow along with the video below to see how to install our site as a web app on your home screen.
Nota: This feature may not be available in some browsers.
raga avete presente in badoo alcune ragazze mettono le loro foto un pò più spinte protette da password! vi viene in mente niente per scoprire quelle password o per bypassarle?
Devil_Nemesis ha detto:adesso la gente mi viene anche a dire ke noi facciamo "favoritismi" lasciando aperte discussioni di "gente che conosciamo" e chiudiamo le altre...
raga avete presente in badoo alcune ragazze mettono le loro foto un pò più spinte protette da password! vi viene in mente niente per scoprire quelle password o per bypassarle?
Il topic è stato aperto con questo messaggio. il messaggio di un'allupato che vuole sbirciare tra i cazzi di una ragazza. quindi non mi si venga a dire ke non è quello il punto del topic. se poi il contenuto è cambiato vuol dire ke la discussione è andata ot quindi se dovete fare qualcosa di moralmente sano prego, aprite pure un'altro topic e tenetelo pulito.
web_depraved ha detto:Devil_Nemesis ha detto:adesso la gente mi viene anche a dire ke noi facciamo "favoritismi" lasciando aperte discussioni di "gente che conosciamo" e chiudiamo le altre...
raga avete presente in badoo alcune ragazze mettono le loro foto un pò più spinte protette da password! vi viene in mente niente per scoprire quelle password o per bypassarle?
Il topic è stato aperto con questo messaggio. il messaggio di un'allupato che vuole sbirciare tra i cazzi di una ragazza. quindi non mi si venga a dire ke non è quello il punto del topic. se poi il contenuto è cambiato vuol dire ke la discussione è andata ot quindi se dovete fare qualcosa di moralmente sano prego, aprite pure un'altro topic e tenetelo pulito.
scusa la prossima volta scriverò "alcune persone mettono alcune foto" se è quel tipo di foto che dovevo scrivere per farmi capire? comunque devil non prenderla come una cosa personale, "amici" come prima, non è per fare casino che ti ho scritto quelle frasi
ramses ha detto:Per quanto rigurada le pass di badoo come per qualsiasi altro sito internet si possono recuperare tramite un dsniff ad esempio utilizzando un emulatore V102 (tipo telnet per intendersi) ma dovete usare ATERM ovviamente sotto distro linux e non windows vi ho indicato la strada adesso potete vedere come continuare anche soli perche francamente quasta discussione è abbastanza STUPIDA e il mio contributo pensia sia stato sufficiente con queste dritte
ATERM + LINUX + SNIFF SU FTP SERVER (SU FTP PERCHE E PIU DIFFICILE CHE QUALCUNO VI BECCHI....)
malossi_trofeo ha detto:si però è stata trovata la soluzione questo è un esempio di riesumazione utile....
Robertof ha detto:Che novità-.-
Secondo te ci interessa qualcosa sapere che "stavolta abbiano fatto le cose per bene"? Mah.
// entry-closed.js
// photo-upload.js [vital]
// uploader.js
// <@--# if expr="$uploader!=1" -->
// <@--# set var="uploader" value="1" -->
var mmSWFUpload =
{
is_ready : false,
webcam : false,
ready : function(a) // from flash
{
this.webcam = a;
this.is_ready = true;
if ($('addFilesLoader'))
$('addFilesLoader').style.display = 'none';
},
init : function(settings, target)
{
target = target || 'SWFUpload2';
var params = '';
for (var i in settings) {
params += '&' + i + '=' + encodeURIComponent(settings[i]);
}
if (typeof(is_web_cam)!='undefined' && is_web_cam) {
$(target).innerHTML = Flash.draw(JSRoot + 'flash/campicture.swf', '400', // 570, 640
'300', // 472, 530
'', 'ask=' + params, true, target + 'Field');
} else {
$(target).innerHTML = Flash.draw(JSRoot + 'flash/uploadtest.swf', '100%', '100%', '', 'ask=' + params, true, target + 'Field');
}
},
// Default error handling.
handleErrors : function(errcode, file, msg)
{
switch(errcode){
case -10: // HTTP error
// alert(errcode + ", " + file + ", " + msg);
break;
case -20: // No backend file specified
break;
case -30: // IOError
break;
case -40: // Security error
break;
case -50: // Filesize too big
break;
}
},
callSWF : function(remain, target)
{
var target = target || 'SWFUpload2';
if (this.is_ready) Flash.get(target + 'Field').uploadImage(remain);
},
cancelAll : function()
{
if (this.is_ready) Flash.get('SWFUpload2Field').cancelAll();
},
cancelUpload : function(id)
{
// if (this.webcam)
Flash.get('SWFUpload2Field').cancelUpload(id);
},
createSnapshots : function(num_shots, timestep)
{
if (this.webcam) Flash.get('SWFWebcamField').createSnapshots(num_shots || 4, timestep || 100);
},
saveSnapshot : function()
{
if (this.webcam) Flash.get('SWFWebcamField').saveSnapshot();
},
webcamSound : function(click)
{
if (this.webcam) Flash.get('SWFWebcamField').sound(click);
},
webcamAgain : function()
{
if (this.webcam) Flash.get('SWFWebcamField').tryAgain();
}
};
mmSWFUpload=new ($class(mmSWFUpload));
// <@--# endif -->
if (Flash.init(8)) {
$u.add_css('#add_photos_form{display:none}');
}
var PhotoUpload =
{
strings:[ 'Internal Error', 'Upload error or unsupported format', 'File too large, max size: 100Mb', 'Loading...;', 'No rated yet', 'Images', 'Video Files', 'Images and Video', 'All files', 'Done', 'Upload in progress. Would you like to leave this page unsaved?' ],
types :
{
'images':'*.jpg; *.jpeg; *.jpe; *.jfif; *.jfi; *.gif; *.jp2, *.jpc; *.wdp; *.hdp; *.png; *.bmp; *.tiff; *.tif',
'video' :'*.flv; *.avi; *.mpg; *.mov; *.3gp; *.mpeg; *.mp4; *.wmv'
},
cache:{},
progress:false,
serv:[],
sess:'',
to_remove:{},
timers:{},
counters :
{
now :0,
total:0
},
last_percent:0,
loading :
{
file:'',
time:0
},
fom:false,
inited:false,
started:false,
tpl :
{
'process' :'<tr id="l#id#"><th class="thumb"><div class="nothumb"></div></th><th class="name"><div>#filename#</div></th><td class="icon"><a href="#" id="fid#fid#" class="cancel"></a></td><td class="status"><div class="upload_bar"><span></span></div></td></tr>',
'error' :'<tr><th class="thumb"><div class="nothumb"></div></th><th class="name"><div>#filename#</div></th><td class="icon"><span class="note"></span></td><td class="status">#status#</td></tr>',
'done' :'<tr id="l#id#"><th class="thumb"><div class="thumb"><img src="#url#" alt="" width="#w#" height="#h#" /></div></th><th class="description"><div><a href="#" class="description emptydesc">#add_str#</a></div></th><td class="icon"><span class="ok"></span></td><td class="status uploaded">#uploaded_str#</td></tr>',
'descview':'<tr id="l#id#"><th class="thumb"><div class="thumb"><img src="#url#" alt="" width="#w#" height="#h#" /></div></th><th class="description"><div><a href="#" class="description" title="#edit_str#">#description#</a></div></th><td class="icon"><span class="ok"></span></td><td class="status uploaded">#uploaded_str#</td></tr>',
'descedit':'<tr id="l#id#"><th class="thumb"><div class="thumb"><img src="#url#" alt="" width="#w#" height="#h#" /></div></th><th colspan="3" class="description"><form action="" class="photodescr" id="frm#id#"><button type="button" class="escape_action cancel_descr">#descr_cancel#</button><button type="button" class="approve">#descr_save#</button><div class="photodescr_input"><div><input id="lin#id#" type="text" size="50" value="#description#" /></div></div></form></th></tr>'
},
init:function()
{
if (!Flash.init(8)) return false;
PhotoUpload.clear_timers();
if(!$('js_str')) return;
PhotoUpload.strings=$('js_str').title.split('|');
//PhotoUpload.popup='<div id="p_upload">' + $('p_upload_content').innerHTML + '</div>';
PhotoUpload.tpl.done=PhotoUpload.replacer('done', [ 'add_str', 'uploaded_str' ], [ vars.upload_str.click_str[0], vars.upload_str.uploaded_str ]);
PhotoUpload.tpl.descview=PhotoUpload.replacer('descview', [ 'edit_str', 'uploaded_str' ], [ vars.upload_str.click_str[1], vars.upload_str.uploaded_str ]);
PhotoUpload.tpl.descedit=PhotoUpload.replacer('descedit', [ 'descr_cancel', 'descr_save' ], vars.upload_str.descr_str);
vars.upload_str.delete_str[4]=$u.tpl('<div>{html}</div>', { html:vars.upload_str.delete_str[4] });
PhotoUpload.serv=vars.photo_service;
PhotoUpload.sess='?' + $('session_name').name + '=' + $('session_name').value;
PhotoUpload.fom=($('photoset') && $('photoset').className == 'is_fom');
// PhotoUpload.init_flash();
window.onbeforeunload=PhotoUpload.check_progress;
$e.on({
'.add_more_photos':PhotoUpload.open_popup,
'.add_photo':PhotoUpload.open_popup,
'.take_webcam':PhotoUpload.open_webcam,
'* .add_photo':PhotoUpload.open_popup
}, PhotoUpload);
$e.onclick(PhotoUpload.click_event);
$u.app.on('upload_photo',PhotoUpload.open_popup,PhotoUpload);
$u.app.on('webcam_link',PhotoUpload.open_webcam,PhotoUpload);
},
once:false,
init_flash:function(webcam)
{
is_web_cam=webcam||false;
$('SWFUpload').innerHTML='';
if(!webcam){
var w=$('SWFUpload2');
var bn1=$('addFilesDialog');
if(w && bn1)
w.clonePosition(bn1);
}
mmSWFUpload.init(
{
uploadBackend :(($('upload_ws_url')?$('upload_ws_url').value:$('upload_form').action).replace('/upload/', '/upload-ws/') + '?slot=' + Math.random() + '&' + $('session_name').name + '=' + $('session_name').value),
allowedFilesize :'100',
imageTypesDescription :PhotoUpload.strings[5],
imageTypesExtension :PhotoUpload.types.images,
videoTypesDescription :PhotoUpload.strings[6],
videoTypesExtension :PhotoUpload.types.video,
mediaTypesDescription :PhotoUpload.strings[7],
allTypesDescription :PhotoUpload.strings[8],
uploadStartCallback :'PhotoUpload.start',
uploadProgressCallback :'PhotoUpload.loaded',
uploadCompleteCallback :'PhotoUpload.complete',
uploadErrorCallback :'PhotoUpload.error',
uploadCancelCallback :'PhotoUpload.cancel',
uploadQueueCompleteCallback:'PhotoUpload.queue_complete',
webcamReady :'PhotoUpload.webcam_ready',
webcamSnapshotsReady :'PhotoUpload.webcam_snapshots_ready',
txt1 :vars.upload_str.webcam_str[0],
txt2 :vars.upload_str.webcam_str[1],
txt3 :vars.upload_str.webcam_str[2],
txt4 :vars.upload_str.webcam_str[3],
txt5 :vars.upload_str.webcam_str[4]
},
webcam?'SWFWebcam':'SWFUpload2');
},
webcam_ready:function()
{
$('takeShot').disabled=false;
mmSWFUpload.webcam=true;
},
webcam_snapshots_ready:function()
{
// remove white screen
PhotoUpload.white_screen(0);
$('save_shot').removeClassName('hidden');
},
clear_timers:function(now)
{
PhotoUpload.timers =
{
file_name :'',
file_time :0,
queue_time :(now?new Date().getTime():0),
queue_size :0,
queue_loaded:0
};
},
switch_progress:function(s)
{
if (PhotoUpload.progress == s) return;
if (!s) PhotoUpload.started=false;
// if ($('simpleHint')) $('simpleHint').hide();
PhotoUpload.clear_timers(s);
var disable_buttons=[ 'save', 'finishUpload' ];
for (var i=0; i<disable_buttons.length; i++)
{
var b=$(disable_buttons[i]);
if (b) b.disabled=s;
}
PhotoUpload.uploading_hint(s);
PhotoUpload.progress=s;
},
check_progress:function()
{
if (PhotoUpload.progress) return PhotoUpload.strings[11];
},
click_event:function(e)
{
var el=Event.element(e);
if (el.tagName == 'B' && el.up('a')) el=el.up('a');
if (el.tagName == 'A' && el.hasClassName('description') && el.up('th'))
{
Event.stop(e);
var lid=el.up('tr');
var id=lid.id.substr(1);
var a=lid.down('a');
var desc='';
if (!a.hasClassName('emptydesc')) {
desc=a.innerHTML.replace('"', '"');
}
new Insertion.After(lid, PhotoUpload.replacer('descedit', [ 'url', 'w', 'h', 'id', 'description' ], PhotoUpload.cache[id].slice(0, 4).concat([ desc ])));
lid.remove();
$('lin'+id).focus();
var frm=$('frm' + id);
Event.observe(frm, 'submit', PhotoUpload.input);
}
else if (el.id)
{
switch(el.id)
{
case 'try_classic':
Event.stop(e);
PhotoUpload.close(e);
$('add_photos_form').show();
break;
/* case 'addFiles':
Event.stop(e);
// if (!mmSWFUpload.is_ready) return;
PhotoUpload.open_popup();
break; */
case 'addFilesDialog':
case 'addMoreFilesDialog':
Event.stop(e);
if (!mmSWFUpload.is_ready) return;
mmSWFUpload.callSWF(vars.photos_limit[1]);
break;
case 'simpleForm':
Event.stop(e);
$u.add_css('#add_photos_form{display:block}');
if ($('submit_to'))
{
$('submit_to').value=$('upload_form').old_action;
$('upload_form').action=$('upload_form').old_action;
}
PhotoUpload.close(e);
break;
case 'finishUpload':
PhotoUpload.close(e);
$u.app.set(vars.PhotoUpload && vars.PhotoUpload.onComplete_url || '');
break;
case 'tryShot':
mmSWFUpload.webcamAgain();
$('take_shot').removeClassName('hidden');
$('progress_shot').addClassName('hidden');
$('save_shot').addClassName('hidden');
break;
case 'takeShot':
PhotoUpload.progress_shot();
break;
case 'saveShot':
$('save_shot').addClassName('hidden');
$('uploading_shot').removeClassName('hidden');
mmSWFUpload.saveSnapshot();
break;
default:
if (el.tagName == 'A' && el.id.substr(0, 3) == 'fid')
{
Event.stop(e);
el.up('tr').remove();
mmSWFUpload.cancelUpload(el.id.substr(3));
}
break;
}
}
else if (el.className)
{
switch(el.className)
{
case 'webcam_link':
case 'webcam':
Event.stop(e);
PhotoUpload.open_webcam();
break;
case 'email':
Event.stop(e);
$('upload-start').addClassName('hidden');
$('webcam-shooter').addClassName('hidden');
$('email-uploader').removeClassName('hidden');
$('take_shot').addClassName('hidden');
$('progress_shot').addClassName('hidden');
$('save_shot').addClassName('hidden');
dOvl.center();
break;
case 'files':
Event.stop(e);
PhotoUpload.open_files();
break;
case 'tClose':
Event.stop(e);
PhotoUpload.close(e);
break;
case 'approve':
var tr=el.up('tr');
if (tr) {
PhotoUpload.description_save(tr.id.substr(1));
}
break;
}
if (el.hasClassName('cancel_descr'))
{
var tr=el.up('tr');
if (tr)
{
var id=tr.id.substr(1);
var lid=$('l' + id);
new Insertion.After(lid, PhotoUpload.replacer((PhotoUpload.cache[id][4] == ''?'done':'descview'), [ 'url', 'w', 'h', 'id', 'description' ], PhotoUpload.cache[id]));
lid.remove();
}
}
}
},
open_webcam:function()
{
if(!PhotoUpload._opened) PhotoUpload.open_popup();
$('upload-start').addClassName('hidden');
$('email-uploader').addClassName('hidden');
$('webcam-shooter').removeClassName('hidden');
$('take_shot').removeClassName('hidden');
$('progress_shot').addClassName('hidden');
$('save_shot').addClassName('hidden');
PhotoUpload.init_flash(true);
dOvl.center();
},
progress_shot:function(num)
{
if($('takeShot').disabled) return;
if (typeof num == 'undefined')
{
$('take_shot').addClassName('hidden');
$('progress_shot').removeClassName('hidden');
$('save_shot').addClassName('hidden');
mmSWFUpload.webcamSound(1);
window.setTimeout('PhotoUpload.progress_shot(2)', 1000);
}
else
{
if (num < 1)
{
$('progress_shot').addClassName('hidden');
$('progress_shot').down().className='cipher1';
PhotoUpload.white_screen(1);
mmSWFUpload.webcamSound(0);
mmSWFUpload.createSnapshots();
}
else
{
$('progress_shot').down().className='cipher' + (4 - num);
mmSWFUpload.webcamSound(num == 1?2:1);
window.setTimeout('PhotoUpload.progress_shot(' + (num - 1) + ')', 1000);
}
}
},
white_screen:function(on)
{
if (on && !$('white_screen'))
{
var w=$u.el('div',{id:'white_screen'});
document.body.appendChild(w);
}
else if (!on && $('white_screen'))
{
var o=new Fx.Opacity('white_screen',
{
duration:500,
transition:Fx.Transitions.linear,
onComplete:function() {
this.element.remove();
}
}); // opacity: true
o.toggle();
}
},
open_popup:function()
{
PhotoUpload._opened=true;
if(!PhotoUpload.once){
PhotoUpload.popup='<div id="p_upload">' + $('p_upload_content').innerHTML + '</div>';
PhotoUpload.once=true;
}
if($('slideshow'))
$('slideshow').addClassName('noflash');
dOvl.open({
html:PhotoUpload.popup,
hide_close:true,
onClose:function()
{
PhotoUpload._opened=false;
if ($('slideshow')) $('slideshow').removeClassName('noflash');
},
onLoad:function()
{
PhotoUpload.init_flash();
}
});
},
open_files:function()
{
is_web_cam=false;
$('upload-start').removeClassName('hidden');
$('webcam-shooter').addClassName('hidden');
$('email-uploader').addClassName('hidden');
dOvl.center();
},
close:function(e, close)
{
if (close)
{
mmSWFUpload.cancelAll();
PhotoUpload.queue_complete();
dOvl.close();
PhotoUpload.counters =
{
now :0,
total:0
};
return false;
}
if (PhotoUpload.progress) {
dConfirm.show({
x:(Event.pointerX(e) - 241),
y:(Event.pointerY(e) - 100),
type:'br_tail zindex7001',
text:dConfirm.wrap(vars.upload_str.delete_str),
onOk:PhotoUpload.close.bind(PhotoUpload,0,1)
});
}
else
{
dOvl.close();
PhotoUpload.counters =
{
now :0,
total:0
};
}
return false;
},
input:function(e)
{
Event.stop(e);
var el=Event.element(e);
PhotoUpload.description_save(el.id.substr(3));
},
description_cancel:function(id) {},
description_save:function(id)
{
var myAjax=new Ajax.Request(PhotoUpload.serv[1] + id + '/description-ws/',
{
method:'post',
parameters:'description=' + encodeURIComponent($('lin' + id).value.strip()),
onComplete:function®
{
var res=eval('(' + r.responseText + ')');
if (res.errno == 0)
{
$('p' + res.data.photo_id).childNodes[0].childNodes[0].lastChild.childNodes[1].nodeValue=res.data.description.unescapeHTML();
var lid=$('l' + res.data.photo_id);
var id=lid.id.substr(1);
PhotoUpload.cache[id][4]=res.data.description;
new Insertion.After(lid, PhotoUpload.replacer((res.data.description == ''?'done':'descview'), [ 'url', 'w', 'h', 'id', 'description' ], PhotoUpload.cache[id]));
lid.remove();
}
else if (res.auth)
{
window.location.href=res.auth;
}
}
});
},
check_photo_counter:function(count)
{
vars.photos_limit[1] += count;
if ($('addMore')) if (vars.photos_limit[1] < 1) {
$('addMore').addClassName('hidden');
} else {
$('addMore').removeClassName('hidden');
}
PhotoUpload.uploading_hint(1);
},
idify:function(name)
{
if (!name) return;
var ret="i";
for (var i=0; i<name.length; i++) {
ret += name.charCodeAt(i).toString(16);
}
return ret;
},
// Default upload start function.
start:function(fileObj)
{
PhotoUpload.switch_progress(true);
if (is_web_cam) return;
if ($('upload-start')) $('upload-start').addClassName('hidden');
if ($('upload-process')) $('upload-process').removeClassName('hidden');
if (!PhotoUpload.started) {
dOvl.center();
}
var w=$('SWFUpload2');
var bn2=$('addMoreFilesDialog');
if(w && bn2)
w.clonePosition(bn2);
PhotoUpload.started=true;
PhotoUpload.create_loader(fileObj);
PhotoUpload.counters.total++;
if ($('files_toupload_num')) $('files_toupload_num').innerHTML=PhotoUpload.counters.total;
PhotoUpload.timers.queue_size += fileObj.size;
},
loaded:function(fileObj, bytesLoaded)
{
if (is_web_cam) return;
var now=new Date().getTime();
if ((PhotoUpload.loading.file == fileObj.name) && (bytesLoaded != fileObj.size) && ((now - PhotoUpload.loading.time) < 1000)) return;
PhotoUpload.loading.file=fileObj.name;
PhotoUpload.loading.time=now;
PhotoUpload.create_loader(fileObj);
var percent=Math.ceil((bytesLoaded / fileObj.size) * 100);
var queue_percent='';
if(PhotoUpload.timers.queue_size)
queue_percent=Math.ceil(((PhotoUpload.timers.queue_loaded + bytesLoaded) / PhotoUpload.timers.queue_size) * 100);
// count total progress
var elapsed=now - PhotoUpload.timers.queue_time;
var t='';
/*
if (elapsed>5000)
{
t=Math.round((PhotoUpload.timers.queue_time+Math.round((elapsed*100)/queue_percent)-now)/1000);
h=Math.floor(t/3600);
m=Math.floor((t-h*3600)/60);
s=Math.floor(t-h*3600-m*60);
t=' (remain: '+(h<10?'0':'') +h + ':' + (m<10?'0':'')+m + ':' + (s<10?'0':'') + s+')';
}
*/
if ($('loaded_percent')) $('loaded_percent').innerHTML=queue_percent?(queue_percent + '%'):'...' + t;
if (PhotoUpload.last_percent == percent) return;
PhotoUpload.last_percent=percent;
// count file progress
var t='';
if (percent != 100)
{
if (PhotoUpload.timers.file_name != fileObj.name)
{
PhotoUpload.timers.file_name=fileObj.name;
PhotoUpload.timers.file_time=new Date().getTime();
}
}
var tr=$('l' + PhotoUpload.idify(fileObj.name));
var sp=tr.getElementsByTagName('span')[0];
sp.style.width=Math.round((189 * percent) / 100) + 'px';
},
create_loader:function(fileObj, file_name)
{
if (is_web_cam) return;
var fname=file_name || fileObj.name || false;
var id=PhotoUpload.idify(fname);
if (!$('l' + id) && fname && $('upload-filelist')) {
new Insertion.Bottom($('upload-filelist'), PhotoUpload.replacer('process', [ 'id', 'filename', 'fid' ], [ PhotoUpload.idify(fname), fname.escapeHTML(), fileObj.id || false ]));
}
},
replacer:function(str, tpl, values)
{
var str=PhotoUpload.tpl[str];
var reg=false;
for (var i=0; i<tpl.length; i++)
{
reg=new RegExp('#' + tpl[i] + '#', 'gi');
str=str.replace(reg, values[i]);
}
return str;
},
complete:function(fileObj)
{
if (!fileObj.result) return;
PhotoUpload.counters.now++;
if ($('files_uploaded_num')) $('files_uploaded_num').innerHTML=PhotoUpload.counters.now;
PhotoUpload.timers.queue_loaded += fileObj.size;
if (fileObj.result.indexOf('|') != -1)
{
var res=fileObj.result.split('|');
var s=res[4].split('x');
var v=res[3].split('x');
var is_video=(v.length > 2);
PhotoUpload.file_info(fileObj.name, '', 0, [ s[0], s[1], res[1], res[0] ]);
if(typeof(EntryEdit)!='undefined')
EntryEdit.draw_uploaded_photo(res,s,is_video)
}
else
{
PhotoUpload.file_info(fileObj.name, fileObj.result, 1);
}
if(typeof(PhotoEdit)!='undefined')
PhotoEdit.updateLinks();
},
remove:function(id)
{
var el=$('p' + id);
el.remove();
EntryEdit.init_sortable();
},
uploading_hint:function(first)
{
first=first?1:0;
var upl=$('upload-process');
if(!upl) return;
var pclose=upl.select('p.close').toArray();
var l=pclose[first].addClassName('hidden');
PhotoUpload.recount_string(l);
var l=pclose[1-first].removeClassName('hidden');
PhotoUpload.recount_string(l);
},
recount_string:function(el)
{
var l1=el.down();
if (l1.down('i')) l1.down('i').update(vars.photos_limit[1]);
l1[vars.photos_limit[1] > 1?'removeClassName':'addClassName']('hidden');
l1.next()[vars.photos_limit[1] == 1?'removeClassName':'addClassName']('hidden');
l1.next(1)[vars.photos_limit[1] < 1?'removeClassName':'addClassName']('hidden');
},
queue_complete:function(fileObj)
{
if ($('loaded_percent')) $('loaded_percent').innerHTML='100%';
PhotoUpload.switch_progress(false);
if ($('share') && (EntryView.ph.length > 0)) {
$('share').removeClassName('hidden');
}
if (is_web_cam) {
window.setTimeout('PhotoUpload.open_files();PhotoUpload.close();', 300);
}
},
error:function(errcode, file, msg)
{
// alert(errcode+':'+ file + ':'+ msg);
switch(errcode)
{
case -10: // HTTP error
if (msg == 500) {
PhotoUpload.file_info(file.name, PhotoUpload.strings[1], 1);
} else {
PhotoUpload.file_info(file.name, PhotoUpload.strings[0], 1);
}
break;
case -20: // No backend file specified
PhotoUpload.file_info(file.name, PhotoUpload.strings[0], 1);
break;
case -30: // IOError
PhotoUpload.file_info(file.name, PhotoUpload.strings[0], 1);
break;
case -40: // Security error
PhotoUpload.file_info(file.name, PhotoUpload.strings[0], 1);
break;
case -50: // Filesize too big
PhotoUpload.file_info(file.name, PhotoUpload.strings[2], 1);
break;
case -60: // Too much files
PhotoUpload.file_info(file.name, PhotoUpload.strings[0], 1);
break;
}
return true;
},
file_info:function(filename, info, err, photo)
{
if (is_web_cam) return;
PhotoUpload.create_loader(false, filename);
var id=PhotoUpload.idify(filename);
var lid=$('l' + id);
if (lid)
{
var id=PhotoUpload.idify(filename);
if (err) {
new Insertion.After(lid, PhotoUpload.replacer('error', [ 'status', 'filename' ], [ info, filename ]));
}
else
{
var rw=photo[0] / 34;
var rh=photo[1] / 24;
var ratio=(rh > rw?rh:rw);
rw=Math.ceil(photo[0] / ratio);
rh=Math.ceil(photo[1] / ratio);
PhotoUpload.cache[photo[3]]=[ photo[2], rw, rh, photo[3], '' ];
new Insertion.After(lid, PhotoUpload.replacer('done', [ 'url', 'w', 'h', 'id' ], [ photo[2], rw, rh, photo[3] ]));
}
lid.remove();
}
},
cancel:function() {
PhotoUpload.switch_progress(false);
},
get_limit:function()
{
return parseInt(vars.photos_limit[1]);
}
};
$e.onload(PhotoUpload.init,PhotoUpload);
var EntryClosed =
{
init : function()
{
var oid = $('f_entry_password');
if (oid)
{
Event.observe(oid, 'focus', EntryClosed.focus);
Event.observe(oid, 'blur', EntryClosed.blur);
var oil = oid.previousSibling;
if (oil && oil.nodeName == 'LABEL')
{
if (!oid.value) oil.style.display = 'block';
Event.observe(oil, 'click', EntryClosed.click);
if (SafariBrowser) oil.className = 'safari';
}
}
},
click : function(e)
{
var el = Event.element(e);
if (el.nodeName == 'LABEL' && el.parentNode.className && el.parentNode.className == 'entry_password')
{
var nextel = el.next();
if (nextel && !nextel.disabled) nextel.focus();
}
},
focus : function(e)
{
var el = Event.element(e);
if (el.id == 'f_entry_password')
{
var prevel = el.previousSibling;
if (prevel) prevel.style.display = 'none';
}
},
blur : function(e)
{
var el = Event.element(e);
if (el.id == 'f_entry_password')
{
var prevel = el.previousSibling;
if (prevel && !el.value) prevel.style.display = 'block';
}
}
};
$e.onload(EntryClosed.init,EntryClosed);