It looks like you're new here. If you want to get involved, click one of these buttons!
$(document).ready(function() {
$('#photo').fileUpload({
'uploader': '<?php echo URL_SITE; ?>conf/js/jquery.uploadify-v1.6.2/uploader.swf',
'script': '<?php echo URL_SITE; ?>conf/js/jquery.uploadify-v1.6.2/add_photos2.php',
'cancelImg': '<?php echo URL_SITE; ?>conf/js/jquery.uploadify-v1.6.2/cancel.png',
'multi': true,
'buttonText': 'Sélectionner les fichiers à envoyer',
'fileDataName': 'screen',
'fileExt': '*.jpeg;*.jpg;*.png',
'fileDesc': 'Toutes les images',
'width': 135
});
});
$handle = new upload($_FILES['screen'], 'fr_FR');
if ($handle->uploaded) {
$handle->allowed = array('image/*');
$handle->file_max_size = '1048576'; // 1000 KB > 1 MO
$handle->image_resize = true;
$handle->image_ratio = true;
$handle->image_y = 600;
$handle->image_x = 800;
$handle->image_text = 'WWW.xxx.COM';
$handle->image_text_color = '#ffffff';
$handle->image_text_background = '#000000';
$handle->image_text_position = 'BR';
$handle->image_text_padding_x = 10;
$handle->image_text_padding_y = 1;
$handle->image_text_font = 2;
$handle->image_text_background_percent = 50;
$handle->image_reflection_height = '20px';
$handle->image_reflection_opacity = 100;
$nom_jeux = uniqid(rand());
$handle->file_new_name_body = $nom_jeux;
$handle->process('../photos/'.$nom_album);
if ($handle->processed) {
$handle->image_resize = true;
$handle->image_ratio = false;
$handle->image_ratio_fill = 'C';
$handle->image_y = 87;
$handle->image_x = 116;
$handle->image_background_color = '#000000';
$handle->file_new_name_body = $nom_jeux;
$handle->process('../photos/'.$nom_album.'apercu/');
if ($handle->processed) {
$handle->clean();
$id_album = sql_protect($_POST['id_album']);
$req_add_jeux = 'INSERT INTO photos SET photos_lien = \"'.$handle->file_dst_name.'\", photos_alb_id_photos = \"'.$id_album.'\"';
if(sql_query($req_add_jeux,'ADD CAT'))
{
my_redirect(3,'add_photos.php?id='.$_POST['id_album'],'Photo uploadé et redimensionné avec succès !',1);
die();
}
}
else
{
$msg = 'error : ' . $handle->error;
}
}
else
{
$msg = 'error : ' . $handle->error;
}
}
else
{
$msg = $handle->error;
}
onError: function (a, b, c, d) {
if (d.status == 404)
alert('Could not find upload script. Use a path relative to: '+'<?= getcwd() ?>');
else if (d.type === \"HTTP\")
alert('error '+d.type+\": \"+d.status);
else if (d.type ===\"File Size\")
alert(c.name+' '+d.type+' Limit: '+Math.round(d.sizeLimit/1024)+'KB');
else
alert('error '+d.type+\": \"+d.text);
},
Could not find upload script. Use a path relative to: /homez.34/...
switch ($_FILES['Filedata']['error'])
{
case 0:
$msg = \"No Error\";
break;
case 1:
$msg = \"The file is bigger than this PHP installation allows\";
break;
case 2:
$msg = \"The file is bigger than this form allows\";
break;
case 3:
$msg = \"Only part of the file was uploaded\";
break;
case 4:
$msg = \"No file was uploaded\";
break;
case 6:
$msg = \"Missing a temporary folder\";
break;
case 7:
$msg = \"Failed to write file to disk\";
break;
case 8:
$msg = \"File upload stopped by extension\";
break;
default:
$msg = \"unknown error \".$_FILES['Filedata']['error'];
break;
}
$stringData = \"path: \".$_GET['folder'].\"\n targetFile: \".$targetFile.\"\n Error: \".$_FILES['Filedata']['error'].\"\nError Info: \".$msg;
echo $stringData;
onComplete: function(a, b, c, d, e){
alert(d);
},
<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">
<html xmlns=\"http://www.w3.org/1999/xhtml\">
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />
<title>Accès sécurisé</title>
<link href=\"http://www.xxx.com/administration/style/css/transdmin.css\" rel=\"stylesheet\" type=\"text/css\"/>
<meta name=\"robots\" content=\"noindex,follow\" />
</head>
<body>
<table align=\"center\" width=\"600\" id=\"main\" style=\"margin-top:50px; float:none;\">
<tr>
<td>
<div id=\"containerHolder\">
<form method=\"post\">
Mot de passe : <input type=\"password\" name=\"mot_de_passe\" />&nbsp;
<input type=\"submit\" value=\"Se connecter\" />
</form>
</div>
</td>
</tr>
</table>
</body>
</html>