%%AC^ACA^ACAEDEF0%%LIST1710.tpl.php 10.1 KB
<?php /* Smarty version 2.6.26, created on 2017-07-12 17:08:15
         compiled from LIST1710.tpl */ ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META name="GENERATOR" content="Microsoft FrontPage 4.0">
<META http-equiv="Content-Type" content="text/html; charset=EUC-JP">
<META http-equiv="Content-Style-Type" content="text/css">
<link href="./css/style.css" rel="stylesheet" type="text/css">
<TITLE>め〜るNiポン!</TITLE>
<script type="text/javascript" src="./include/jkl-calendar.js" charset="Shift_JIS"></script>
<SCRIPT LANGUAGE="JavaScript">
<?php echo '
function ichiranBack(){
	document.Frm.action="LIST1000.php";
	document.Frm.submit();
}

function del_chk(){
	if (confirm("アラーム設定を解除します。\\nよろしいですか?")){
		document.Frm.action="LIST1712.php";
		document.Frm.submit();
	}
}

function input_chk(YYYY,MM,DD,HH){
	if(YYYY == 0){
		alert("開催日時が設定されていません。配信情報閲覧画面へ戻ります。");
		document.Frm.action="LIST1000.php";
		document.Frm.submit();
	}else{
		if(isNaN(document.Frm.alarm_yyyy.value)){
			window.alert("年は数値で入力してください。");
			document.Frm.alarm_yyyy.focus();
			return false;
		}else if(!document.Frm.alarm_yyyy.value){
			window.alert("年を入力してください。"); 
			document.Frm.alarm_yyyy.focus();
			return false;
		}else if(document.Frm.alarm_mm.value==""){
			window.alert("月を選択して下さい");
			document.Frm.alarm_mm.focus();
			return false;
		}else if(document.Frm.alarm_dd.value==""){
			window.alert("日を選択して下さい");
			document.Frm.alarm_dd.focus();
			return false;
		}else if(document.Frm.alarm_hh.value==""){
			window.alert("時を選択して下さい");
			document.Frm.alarm_hh.focus();
			return false;
		}else if(document.Frm.alarm_time_mm.value==""){
			window.alert("分を選択して下さい");
			document.Frm.alarm_time_mm.focus();
			return false;
		}else if(YYYY < document.Frm.alarm_yyyy.value){
			window.alert("開催日時よりも後の日時に、アラームを設定することはできません。"); 
			document.Frm.alarm_yyyy.focus();
			return false;
		}else if(YYYY == document.Frm.alarm_yyyy.value){
			if(MM < document.Frm.alarm_mm.value){
				window.alert("開催日時よりも後の日時に、アラームを設定することはできません。"); 
				document.Frm.alarm_mm.focus();
				return false;
			}else if(MM == document.Frm.alarm_mm.value){
				if(DD < document.Frm.alarm_dd.value){
					window.alert("開催日時よりも後の日時に、アラームを設定することはできません。"); 
					document.Frm.alarm_dd.focus();
					return false;
				}else if(DD == document.Frm.alarm_dd.value){
					if(HH!=""){
						if(HH < document.Frm.alarm_hh.value){
							window.alert("開催日時よりも後の日時に、アラームを設定することはできません。"); 
							document.Frm.alarm_hh.focus();
							return false;
						}else if(HH == document.Frm.alarm_hh.value){
							if(TIME <= document.Frm.alarm_time_mm.value){
								window.alert("開催日時よりも後の日時に、アラームを設定することはできません。"); 
								document.Frm.alarm_time_mm.focus();
								return false;
							}
						}
					}
				}
			}
		}

		chkCnt = 0;
		if (document.Frm.alarm_id.length >= 2) {
			for (i=0; i< document.Frm.alarm_id.length;i++){
				if (document.Frm.alarm_id[i].checked) {
					chkCnt++;
				}
			}
			if (chkCnt==0) {
				alert("チェックがされていません");
				return false;
			}
		}else{
			if (document.Frm.alarm_id.checked==false) {
				alert("チェックがされていません");
				return false;
			}
		}
		if (confirm("この内容でアラーム設定します。\\nよろしいですか?")){
			document.Frm.action="LIST1711.php";
			document.Frm.submit();
		}
	}
}

function DayMax(DATE_YYYY,DATE_MM,DAY_MAX,cnt){
	DATE_MM=eval(DATE_MM);
	if(DATE_MM==1 || DATE_MM==3 || DATE_MM==5 || DATE_MM==7 || DATE_MM==8 || DATE_MM==10 || DATE_MM==12){
		DAY_MAX=31;
	}else if(DATE_MM==4 || DATE_MM==6 || DATE_MM==9 || DATE_MM==11){
		DAY_MAX=30;
	}else if(DATE_MM==2){
		if((DATE_YYYY%4)==0){
			DAY_MAX=29;
		}else{
			DAY_MAX=28;
		}
	}

	document.Frm.alarm_dd.options[cnt].text = "--";
	document.Frm.alarm_dd.options[cnt].value = "";
	for(intCount = 0; intCount < DAY_MAX; intCount++){
		cnt++;
		document.Frm.alarm_dd.length = cnt+1;
		if(cnt>=10){
			document.Frm.alarm_dd.options[cnt].text = cnt;
			document.Frm.alarm_dd.options[cnt].value = cnt;
		}else{
			document.Frm.alarm_dd.options[cnt].text = "0"+cnt;
			document.Frm.alarm_dd.options[cnt].value = "0"+cnt;
		}	
	}

}
//カレンダー表示
function cal_get(sTRDate, divid){

	arrYMD = sTRDate.split("/");
	if(divid == "calid1"){
		objY = document.Frm.alarm_yyyy;
		objM = document.Frm.alarm_mm;
		objD = document.Frm.alarm_dd;
	}
	
	//年
	objY.value=arrYMD[0];
	//月
	for(i=0;i<objM.options.length;i++){
		if(objM.options[i].value == arrYMD[1]){
			objM.selectedIndex = i;
			break;
		}
	}
	//日
	for(i=0;i<objD.options.length;i++){
		if(objD.options[i].value == arrYMD[2]){
			objD.selectedIndex = i;
			break;
		}
	}

	cal1 = new JKL.Calendar("calid1","Frm","colname1");
}
'; ?>

</SCRIPT>
<script>
<?php echo '
	var cal1 = new JKL.Calendar("calid1","Frm","colname1");
'; ?>

</SCRIPT>
</HEAD>
<BODY bgcolor="White">
<FORM METHOD="POST" name="Frm">
<!-- ヘッダー表示 -->
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'header.tpl', 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<!-- メニュー表示 -->
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'menu.tpl', 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<!-- 一覧表示 -->
<TABLE width="100%" border="0">
	<TR>
		<TH><B><FONT color="blue" size="5">アラーム設定</FONT></B></TH>
	</TR>
</TABLE>
<hr />
<CENTER>
	<BR>
	<TABLE border=1 bordercolor="#008080" width="544">
		<TR>
			<TD bgcolor="#FFCC99"><B><FONT size="2">アラーム日時</FONT></B></TD>
			<TD>
				<INPUT size="5" maxlength="4" type="text" name="alarm_yyyy" Value="<?php echo $this->_tpl_vars['ALARM_YEAR']; ?>
"><FONT size="2">年</FONT>
				<SELECT name="alarm_mm" onchange="JavaScript:DayMax(alarm_yyyy.value,alarm_mm.value,0,0);">
					<?php echo $this->_tpl_vars['opt_date_mm']; ?>

				</SELECT><FONT size="2">月</FONT>
				<SELECT name="alarm_dd">
					<?php echo $this->_tpl_vars['opt_date_dd']; ?>

				</SELECT><FONT size="2">日</FONT>
				<SELECT name="alarm_hh">
					<?php echo $this->_tpl_vars['opt_time_hh']; ?>

				</SELECT><FONT size="2">時</FONT>
				<SELECT name="alarm_time_mm">
					<?php echo $this->_tpl_vars['opt_time_mm']; ?>

				</SELECT><FONT size="2">分</FONT> 
				<!--カレンダー表示-->
				<A HREF="javascript:cal1.write();">
					<img id="dateLink1" src="./include/cl001.gif" alt="日付選択" border="0" style="vertical-align:middle;margin:5px"/>
				</A>
				<INPUT type="hidden" name="colname1" value="<?php echo $this->_tpl_vars['calYMD1']; ?>
">
				<DIV id="calid1"></DIV>
			</TD>
		</TR>
	</TABLE>
	<BR>
	<B><FONT size="2" color=#FF0000>※どの回答時にアラーム配信を行なうか選択してください</FONT></B>
	<TABLE border=1 bordercolor="#008080" width="544">
		<TR bgcolor="#FFCC99">
			<TD ALIGN="CENTER" WIDTH="400"><FONT size=2><B>回答文言</B></FONT></TD>
			<TD ALIGN="CENTER" WIDTH="144"><FONT size=2><B>設 定</B></FONT></TD>
		</TR>
		<?php unset($this->_sections['cnt']);
$this->_sections['cnt']['name'] = 'cnt';
$this->_sections['cnt']['loop'] = is_array($_loop=$this->_tpl_vars['kaito']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['cnt']['show'] = true;
$this->_sections['cnt']['max'] = $this->_sections['cnt']['loop'];
$this->_sections['cnt']['step'] = 1;
$this->_sections['cnt']['start'] = $this->_sections['cnt']['step'] > 0 ? 0 : $this->_sections['cnt']['loop']-1;
if ($this->_sections['cnt']['show']) {
    $this->_sections['cnt']['total'] = $this->_sections['cnt']['loop'];
    if ($this->_sections['cnt']['total'] == 0)
        $this->_sections['cnt']['show'] = false;
} else
    $this->_sections['cnt']['total'] = 0;
if ($this->_sections['cnt']['show']):

            for ($this->_sections['cnt']['index'] = $this->_sections['cnt']['start'], $this->_sections['cnt']['iteration'] = 1;
                 $this->_sections['cnt']['iteration'] <= $this->_sections['cnt']['total'];
                 $this->_sections['cnt']['index'] += $this->_sections['cnt']['step'], $this->_sections['cnt']['iteration']++):
$this->_sections['cnt']['rownum'] = $this->_sections['cnt']['iteration'];
$this->_sections['cnt']['index_prev'] = $this->_sections['cnt']['index'] - $this->_sections['cnt']['step'];
$this->_sections['cnt']['index_next'] = $this->_sections['cnt']['index'] + $this->_sections['cnt']['step'];
$this->_sections['cnt']['first']      = ($this->_sections['cnt']['iteration'] == 1);
$this->_sections['cnt']['last']       = ($this->_sections['cnt']['iteration'] == $this->_sections['cnt']['total']);
?>  
			<?php echo $this->_tpl_vars['kaito'][$this->_sections['cnt']['index']]; ?>

		<?php endfor; endif; ?> 
	</TABLE>
	<BR>
	<TABLE border="0" width="544">
		<TR>
			<TD>
				<CENTER>
					<FONT SIZE=2>  アラームを設定する場合はこのボタンを押してください⇒</FONT>
					<INPUT type="button" value=" 設 定 " onClick="return input_chk(<?php echo $this->_tpl_vars['kaisai_yy']; ?>
,<?php echo $this->_tpl_vars['kaisai_mm']; ?>
,<?php echo $this->_tpl_vars['kaisai_dd']; ?>
,<?php echo $this->_tpl_vars['kaisai_hh']; ?>
);">
					<BR><BR>
					<FONT SIZE=2>アラーム設定を解除する場合はこのボタンを押してください⇒</FONT>
					<INPUT type="button" value=" 解 除 " onClick="return del_chk();">
				</CENTER>
			</TD>
		</TR>
	</TABLE>
	<BR>
	<INPUT type="button" name="back" value="戻 る" onClick="JavaScript:ichiranBack();">
</CENTER>
<BR>
<!-- フッター表示 -->
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'footer.tpl', 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>

<INPUT type="hidden" name="mail_id" value="<?php echo $this->_tpl_vars['mail_id']; ?>
">
<INPUT type="hidden" name="ALARM_FLG" value="<?php echo $this->_tpl_vars['ALARM_FLG']; ?>
">

<INPUT type="hidden" name="YYYY" value="">
<INPUT type="hidden" name="MM" value="">
<INPUT type="hidden" name="DD" value="">
<INPUT type="hidden" name="HH" value="">

</FORM>
</BODY>
</HTML>