Program E bug another ?

View: New views
1 Messages — Rating Filter:   Alert me  

Program E bug another ?

by gregor205 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

First that to be clear:
I'm using last version of Program E 0.9.
Istalled in MySQL 4 version and last PHP language version.

My questions:

1. Is it possible to put SQL query to AIML code in Program E ? If it is, how to include it in template tag?

2. I'd like to put some javascript into aiml in template tag. For example:

<?xml version="1.0" encoding="UTF-8"?>
<aiml version="1.0.1">

<category>
<pattern>TELL BOT AGE</pattern>
<template>I am
<javascript><![CDATA[
var now = new java.util.Date()
var birth = new java.util.Date(bot("birthday"))
var difference = now.getTime() - birth.getTime()
var daysDifference = Math.floor(difference/1000/60/60/24)
difference -= daysDifference*1000*60*60*24
var hoursDifference = Math.floor(difference/1000/60/60)
difference -= hoursDifference*1000*60*60
var minutesDifference = Math.floor(difference/1000/60)
difference -= minutesDifference*1000*60
var secondsDifference = Math.floor(difference/1000)
daysDifference + " days, " + hoursDifference + " hours, " +
minutesDifference + " minutes and " + secondsDifference + " seconds old."
]]></javascript>
</template>
</category>

</aiml>

But this code doesn't work. I'm little bit confiusing. And asking myself why it isn't work.