Add date() function?

justme1

No avatar

2007-10-29 15:20

i have added the date() funtion into the foot div. but i can't see any result. the function is invisible . What's wrong?

here is the code.
<div id="foot">
<p><?php
echo date("Y/m/d");
?></p>
<h1><a href="http://opensolution.org">Powered by Quick.Cart</a></h1>
</div>

» Quick.Cart v2.x

justme1

merci

No avatar

2007-10-30 07:39

justme1 - you can't put php code into tpl file.

dheghel

Avatar: dheghel

2007-10-30 16:34

Try this :
Open templates/page.tpl

After :
<div id="body">
<div id="column">

Put in this script :
<br><center>
<script>
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var dayarray=new Array("Minggu","Senin","Selasa","Rabu","Kamis","Jum'at& quot;,"Sabtu")
var montharray=new Array("Januari","Februari","Maret","April","Mei","Juni& quot;,"Juli","Agustus","September","Oktober","November",&quo t;Desember")
document.write("<small><font size=1.75px font color='black' face='Verdana'>"+dayarray[day]+", "+daym+" "+montharray[month]+" "+year+"</font></small>")
</script></center>

It is work in my web http://speedshop.web.id

Back to top
about us | contact