Viewing file: funct.php (2.03 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
function abbreDate2($date) {
list($yy, $mm, $dd) = split('[-.-]',$date);
if($dd=='01') { $dd='1'; }
else if($dd=='02') { $dd='2'; }
else if($dd=='03') { $dd='3'; }
else if($dd=='04') { $dd='4'; }
else if($dd=='05') { $dd='5'; }
else if($dd=='06') { $dd='6'; }
else if($dd=='07') { $dd='7'; }
else if($dd=='08') { $dd='8'; }
else if($dd=='09') { $dd='9'; }
if($mm=='01') { $mm='Á.¤.'; }
else if($mm=='02') { $mm='¡.¾.'; }
else if($mm=='03') { $mm='ÁÕ.¤.'; }
else if($mm=='04') { $mm='àÁ.Â.'; }
else if($mm=='05') { $mm='¾.¤.'; }
else if($mm=='06') { $mm='ÁÔ.Â.'; }
else if($mm=='07') { $mm='¡.¤.'; }
else if($mm=='08') { $mm='Ê.¤.'; }
else if($mm=='09') { $mm='¡.Â.'; }
else if($mm=='10') { $mm='µ.¤.'; }
else if($mm=='11') { $mm='¾.Â.'; }
else if($mm=='12') { $mm='¸.¤.'; }
return "$dd $mm $yy";
}
function confirmSubmit() {
?>
<script LANGUAGE="JavaScript">
<!--// Nannette Thacker http://www.shiningstar.net
function confirmSubmit(msg)
{
var agree=confirm(msg);
//var agree=confirm("¤Ø³µéͧ¡ÒÃź¢éÍÁÙÅá¹è¹Í¹ãªèËÃ×ÍäÁè?");
if (agree)
return true ;
else
return false ;
}
// -->
</script>
<?php
}
function openWindow() {
?>
<script language = "JavaScript">
function OpenWindow(FileName,nWidth,nHeight)
{
strOption = "scrollbars=yes,left=0,top=0,width=" + nWidth + ",height=" + nHeight;
SubWin = window.open(FileName,"",strOption);
}
</script>
<?php
}
function autotab() {
?>
<script>
function autotab(original, destination){
if (original.getAttribute && original.value.length==original.getAttribute("maxlength")) destination.focus();
}
</script>
<?php
}
function doCheckAll(){
?>
<script language="javascript">
function doCheckAll(form,do_check){
for (var i=0; i<form.length; i++)
{
if(form.elements[i].type == 'checkbox')
form.elements[i].checked = do_check;
}
}
</script>
<?php
}
function getNowDateTh() {
$yy = date('Y')+543;
$mm = date('m');
$dd = date('d');
return $yy.'-'.$mm.'-'.$dd;
}
?>
|