get_session(); $registry = $appbox->get_registry(); $request = http_request::getInstance(); $parm = $request->get_parms("srt", "ord", "act", "p0", "p1", "p2", "sta", 'admins', 'pub_wm'); $usr_id = $session->get_usr_id(); $base_id = (int) $parm['p1']; $ACL = User_Adapter::getInstance($usr_id, $appbox)->ACL(); if (!$ACL->has_access_to_base($base_id)) { phrasea::headers(403); } $collection = collection::get_from_base_id($parm['p1']); $sbas_id = $collection->get_databox()->get_sbas_id(); $distant_coll_id = $collection->get_coll_id(); $addr = $collection->get_databox()->get_serialized_server_info(); $msg = array(); $refreshFinder = false; if (is_array($parm['admins'])) { $admins = array(); foreach ($parm['admins'] as $a) { if (trim($a) == '') continue; $admins[] = $a; } if ($admins > 0) { set_exportorder::set_order_admins($admins, $base_id); } } switch ($parm['act']) { case 'ENABLED': $collection->enable($appbox); break; case 'DISABLED'; $collection->disable($appbox); break; case 'pub_wm': if ($ACL->has_right_on_base($base_id, 'canadmin') == 1) { $collection->set_public_presentation($parm['pub_wm']); } break; case 'APPLYNEWNAMECOLL': $collection->set_name($parm['p2']); $refreshFinder = true; break; case 'UMOUNTCOLL': $collection->unmount_collection($appbox); $msg['ACTDONE'] = $collection->get_name() . ' ' . _('forms::operation effectuee OK'); $refreshFinder = true; break; case 'DODELETECOLL': if ($collection->get_record_amount() > 0) { $msg['ACTDONE'] = _('admin::base:collection: vider la collection avant de la supprimer'); } else { $collection->unmount_collection($appbox); $collection->delete(); $msg['ACTDONE'] = _('forms::operation effectuee OK'); $refreshFinder = true; } break; case 'SENDMINILOGO': if (isset($_FILES['newLogo'])) { if ($_FILES['newLogo']['size'] > 65535) { $msg['SENDMINILOGO'] = '
' . _('admin::base:collection le fichier envoye est trop volumineux.') . ' 64Ko
'; } elseif ($_FILES['newLogo']['error']) { $msg['SENDMINILOGO'] = '
' . _('forms::erreur lors de l\'envoi du fichier') . '
'; } elseif (( $_FILES['newLogo']['error'] == UPLOAD_ERR_OK)) { try { $appbox->write_collection_pic($collection, new system_file($_FILES['newLogo']['tmp_name']), collection::PIC_LOGO); } catch (Exception $e) { $msg['SENDMINILOGO'] = $e->getMessage(); } } } break; case 'DELMINILOGO': try { $collection->update_logo(null); $appbox->write_collection_pic($collection, null, collection::PIC_LOGO); } catch (Exception $e) { $msg['DELMINILOGO'] = $e->getMessage(); } break; case 'SENDWM': case 'DELWM': $collection->reset_watermark(); if ($parm['act'] == 'SENDWM' && isset($_FILES['newWm'])) { if ($_FILES['newWm']['size'] > 65535) { $msg['SENDWM'] = '
' . _('admin::base:collection le fichier envoye est trop volumineux.') . " 64Ko" . "
"; } elseif ($_FILES['newWm']['error']) { $msg['SENDWM'] = '
' . _('forms::erreur lors de l\'envoi du fichier') . "
"; // par le serveur (fichier php.ini) } elseif (($_FILES['newWm']['error'] == UPLOAD_ERR_OK)) { try { $appbox->write_collection_pic($collection, new system_file($_FILES['newWm']["tmp_name"]), collection::PIC_WM); } catch(Exception $e) { $msg['SENDWM'] = '
' . $e->getMessage() . "
"; } unlink($_FILES['newWm']["tmp_name"]); } } elseif ($parm['act'] == "DELWM") { try { $appbox->write_collection_pic($collection, null, collection::PIC_WM); } catch(Exception $e) { $msg['DELWM'] = '
' . $e->getMessage() . "
"; } } break; case 'SENDSTAMPLOGO': if (isset($_FILES['newStampLogo'])) { if ($_FILES['newStampLogo']['size'] > 1024 * 1024) { $msg['SENDSTAMPLOGO'] = '
' . _('admin::base:collection le fichier envoye est trop volumineux.') . ' 1Mo
'; } elseif ($_FILES['newStampLogo']['error']) { $msg['SENDSTAMPLOGO'] = '
' . _('forms::erreur lors de l\'envoi du fichier') . '
'; // par le serveur (fichier php.ini) } elseif (( $_FILES['newStampLogo']['error'] == UPLOAD_ERR_OK)) { try { $appbox->write_collection_pic($collection, new system_file($_FILES['newStampLogo']["tmp_name"]), collection::PIC_STAMP); } catch(Exception $e) { $msg['SENDSTAMPLOGO'] = '
' . $e->getMessage() . "
"; } unlink($_FILES['newStampLogo']["tmp_name"]); } } break; case 'DELSTAMPLOGO': try { $appbox->write_collection_pic($collection, null, collection::PIC_STAMP); } catch(Exception $e) { $msg['DELSTAMPLOGO'] = '
' . $e->getMessage() . "
"; } break; case 'SENDPRESENTPICT': if (isset($_FILES['newPresentPict'])) { if ($_FILES['newPresentPict']['size'] > 1024 * 1024 * 2) { $msg['SENDPRESENTPICT'] = '
' . _('admin::base:collection le fichier envoye est trop volumineux.') . ' 2Mo
'; } elseif ($_FILES['newPresentPict']['error']) { $msg['SENDPRESENTPICT'] = '
' . _('forms::erreur lors de l\'envoi du fichier') . '
'; // par le serveur (fichier php.ini) } elseif ($_FILES['newPresentPict']['error'] == UPLOAD_ERR_OK) { try { $appbox->write_collection_pic($collection, new system_file($_FILES['newPresentPict']["tmp_name"]), collection::PIC_PRESENTATION); } catch(Exception $e) { $msg['SENDPRESENTPICT'] = '
' . $e->getMessage() . "
"; } unlink($_FILES['newPresentPict']["tmp_name"]); } } break; case 'DELPRESENTPICT': try { $appbox->write_collection_pic($collection, null, collection::PIC_PRESENTATION); } catch(Exception $e) { $msg['DELPRESENTPICT'] = '
' . $e->getMessage() . "
"; } @unlink($registry->get('GV_RootPath') . 'config/presentation/' . $base_id); break; } function showMsg($k) { global $msg; if (isset($msg[$k])) echo($msg[$k]); } phrasea::headers(); ?>

get_name(); ?>

:  
:  
is_active() ? _('admin::base:collection: activer la collection') : _('admin::base:collection: descativer la collection') ) ?> 
get_record_amount() . ' records' . "\n"; if ($parm["sta"] == "" || $parm["sta"] == NULL || $parm["sta"] == 0) { ?> ( )
get_record_details(); ?> ( )

0 || $last_k1 !== $vrow["coll_id"]) { if (extension_loaded("bcmath")) $midsiz = bcadd($midsiz, $vrow["size"], 0); else $midsiz += $vrow["size"]; if (extension_loaded("bcmath")) $mega = bcdiv($vrow["size"], 1024 * 1024, 5); else $mega = $vrow["size"] / (1024 * 1024); if (extension_loaded("bcmath")) $giga = bcdiv($vrow["size"], 1024 * 1024 * 1024, 5); else $giga = $vrow["size"] / (1024 * 1024 * 1024); ?>
 '); print(_('admin::base: objet')); ?> (Mo) (Go)
           
total            

total            
has_right_on_base($base_id, 'manage')) { $pub_wm = $collection->get_pub_wm(); ?>
on_base_ids(array($base_id)) ->who_have_right(array('order_master')) ->execute()->get_results(); foreach ($admins as $usr_id => $user) { ?>
" /> " /> " />
value='none' /> value='wm' /> value='stamp' />
" />
);return(false);"> is_active() ? _('admin::base:collection: descativer la collection') : _('admin::base:collection: activer la collection')) ?>
');return(false);">

:
has_right_on_base($base_id, 'manage')) { if (file_exists($registry->get('GV_RootPath') . 'config/minilogos/' . $base_id)) { ?>
getLogo($base_id) ?>
Watermark :
has_right_on_base($base_id, 'manage')) { if (file_exists($registry->get('GV_RootPath') . 'config/wm/' . $collection->get_base_id())) { ?>
getWatermark($base_id) ?>
StampLogo :
has_right_on_base($base_id, 'manage')) { if (file_exists($registry->get('GV_RootPath') . 'config/stamp/' . $base_id)) { ?>
getStamp($base_id) ?>
has_right_on_base($base_id, 'manage')) { if (file_exists($registry->get('GV_RootPath') . 'config/presentation/' . $base_id)) { ?>
getPresentation($base_id) ?>

( max : 650x200 )