if ($ssm==101) // photos
$par = "&table=image";
elseif ($ssm==147) // photos pro
$par = "&table=imagepro";
elseif ($ssm==174) // doc pro
$par = "&table=ficpro";
else
$par = "";

<div id="fileupload">

<div class="fileupload-buttonbar">
<label class="fileinput-button">
<span>Ajouter fichiers...</span>

</label>
<button type="submit" class="start">Lancer upload</button>
<button type="reset" class="cancel">Annuler upload</button>
<button type="button" class="delete">Effacer fichiers</button>
</div>

<div class="fileupload-content">
<table class="files">
<div class="fileupload-progressbar"></div>
</div>
</div>
<script id="template-upload" type="text/x-jquery-tmpl">
<tr class="template-upload{{if error}} ui-state-error{{/if}}">
<td class="preview">
<td class="name">${name}
<td class="size">${sizef}
{{if error}}
<td class="error" colspan="2">Error:
{{if error === 'maxFileSize'}}File is too big
{{else error === 'minFileSize'}}File is too small
{{else error === 'acceptFileTypes'}}Filetype not allowed
{{else error === 'maxNumberOfFiles'}}Max number of files exceeded
{{else}}${error}
{{/if}}

{{else}}
<td class="progress"><div></div>
<td class="start"><button>Start</button>
{{/if}}
<td class="cancel"><button>Cancel</button>

</script>
<script id="template-download" type="text/x-jquery-tmpl">
<tr class="template-download{{if error}} ui-state-error{{/if}}">
{{if error}}

<td class="name">${name}
<td class="size">${sizef}
<td class="error" colspan="2">Error:
{{if error === 1}}File exceeds upload_max_filesize (php.ini directive)
{{else error === 2}}File exceeds MAX_FILE_SIZE (HTML form directive)
{{else error === 3}}File was only partially uploaded
{{else error === 4}}No File was uploaded
{{else error === 5}}Missing a temporary folder
{{else error === 6}}Failed to write file to disk
{{else error === 7}}File upload stopped by extension
{{else error === 'maxFileSize'}}File is too big
{{else error === 'minFileSize'}}File is too small
{{else error === 'acceptFileTypes'}}Filetype not allowed
{{else error === 'maxNumberOfFiles'}}Max number of files exceeded
{{else error === 'uploadedBytes'}}Uploaded bytes exceed file size
{{else error === 'emptyResult'}}Empty file upload result
{{else}}${error}
{{/if}}

{{else}}
<td class="preview">
{{if thumbnail_url}}
<a href="${url}" target="_blank"><img src="${thumbnail_url}"></a>
{{/if}}

<td class="name">
<a href="${url}"{{if thumbnail_url}} target="_blank"{{/if}}>${name}</a>

<td class="size">${sizef}
<td colspan="2">
{{/if}}
<td class="delete">
<button data-type="${delete_type}" data-url="${delete_url}&id= echo $id.$par; ">Delete</button>



</script>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/themes/base/jquery-ui.css" id="theme">
<link rel="stylesheet" href="jquery.fileupload-ui.css">
<link rel="stylesheet" href="style.css">