<?php
// +-------------------------------------------------+
// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: abts_abonnements.tpl.php,v 1.47 2025/10/21 14:13:19 dgoron Exp $

if (stristr($_SERVER['REQUEST_URI'], ".tpl.php")) die("no access");

global $abonnement_view,$abonnement_form;
global $msg, $current_module, $tpl_calendrier, $abonnement_serialcirc_empr_list_empr, $abonnement_serialcirc_empr_list_group, $abonnement_serialcirc_empr_list_group_elt;
global $pmb_serialcirc_active;
global $creation_abonnement_js_form, $edition_abonnement_js_form;

$abonnement_view = "
<table width='100%' role='presentation'>
	<tr>
		<td>".$msg["abonnements_modele_lie"].": !!modele_lie!!</td>
		<td></td>
	</tr>
	<tr>
		<td>".$msg["abonnements_duree_abonnement"].": !!duree_abonnement!!</td>
		<td>!!fournisseur!!</td>
	</tr>
	<tr>
		<td>".$msg["abonnements_date_debut"].": !!date_debut!!</td>
		<td>".$msg["abonnements_date_fin"].": !!date_fin!!</td>
	</tr>
	<tr>
		<td>".$msg["abonnements_nombre_de_series"].": !!nombre_de_series!!</td>
		<td>".$msg["abonnements_nombre_de_horsseries"].": !!nombre_de_horsseries!!</td>
	</tr>
	<tr>
		<td>".$msg["4050"].": !!prix!!</td>
        <td></td>
	</tr>
	!!commentaire!!
	!!serialcirc_empr_list!!
</table>
";

$abonnement_script1 = "
<script type='text/javascript'>
function test_form(form)
{
	if(form.abt_name.value.replace(/^\s+|\s+$/g, '').length == 0)
	{
		alert(\"$msg[326]\");
		form.abt_name.focus();
		return false;
	}
	!!test_liste_modele!!
	return true;
}
</script>
";

$creation_abonnement_js_form = "
<script type='text/javascript' src='./javascript/tablist.js'></script>
$abonnement_script1
";

$edition_abonnement_js_form = "
<script type='text/javascript' src='./javascript/tablist.js'></script>
<script type='text/javascript'>
<!--

	function calcule_section(selectBox) {
		for (i=0; i<selectBox.options.length; i++) {
			id=selectBox.options[i].value;
		    list=document.getElementById(\"docloc_section\"+id);
		    list.style.display=\"none\";
			}
			
		id=selectBox.options[selectBox.selectedIndex].value;
		list=document.getElementById(\"docloc_section\"+id);
		list.style.display=\"block\";
		}
		
		function gere_statut(obj) {
			var obj_check=document.getElementById(obj+'_check');
			
			if(obj_check.checked == true){
				document.getElementById(obj).disabled = false;
			}else{
				document.getElementById(obj).disabled = true;
			}
		}
		
		function expl_part_display() {
			if(document.getElementById('abt_numeric').checked){
				document.getElementById('abt_numeric').checked = 'checked';
				document.getElementById('expl_part').style.display='none';
			} else {
				document.getElementById('abt_numeric').checked = '';
				document.getElementById('expl_part').style.display='';
			}
		}
-->
</script>
$abonnement_script1
";

$tpl_calendrier = "
<form class='form-$current_module' id='form_abonnement' name='form_abonnement' method='post' action='!!action!!'>
	<h3>!!libelle_form!!</h3>
	<div class='form-contenu'>
	<input type='hidden' name='abonnement_id' value='!!abonnement_id!!'/>
	!!calendrier!!
	</div> <!-- Fin du contenu -->
	<div class='row'>
		<input type='hidden' id='act' name='act' value='' />
		<div class='left'><input type=\"submit\" class='bouton' value='".$msg["77"]."' onClick=\"document.getElementById('act').value='update';this.form.submit();\"/>&nbsp;<input type='button' class='bouton' value='".$msg["76"]."' onClick=\"document.location='./catalog.php?categ=serials&sub=view&serial_id=!!serial_id!!&view=abonnement';\"/>&nbsp;<input type='button' class='bouton' value='".$msg["abts_abonnements_copy_abonnement"]."'/></div><div class='right'>!!del_button!!</div>
	</div>
	<div class='row'></div>
</form>
";

$abonnement_serialcirc_empr_list_empr = "
<br />
<div class='row'><a href='!!empr_view_link!!'>!!empr_name!!</a></div>
";

$abonnement_serialcirc_empr_list_group = "
<br />
<div class='row' >
	<div id='group_circ!!id_diff!!' >
    	<img src='".get_url_icon('plus.gif')."' class='img_plus' name='imEx' id='group_circ!!id_diff!!Img' title='".addslashes($msg['plus_detail'])."' onClick=\"expandBase('group_circ!!id_diff!!', true); recalc_recept();return false;\" />
	    <a href='#' >!!empr_name!!</a>
	</div>
	<div id='group_circ!!id_diff!!Child' class='notice-child' style='margin-bottom:6px;display:none;'>
		!!empr_list!!
	</div>
</div>
";

$abonnement_serialcirc_empr_list_group_elt="
<br />
<div class='row'>!!empr_libelle!!</div>
";

