I have an application in which reads the system date and if I increase the system date by 1year ,then the application expires and stops working.......
I have a javascript file in which functions for this expiration period.....
Kindly tell me how can I modify this code so that no expiration date is set........
where should i make the changes in that.....?
Here is my code of 1 year expiration:

function getWidth(){var width=(screen.width==1280)?800:720;return width;}
function getHeight(){var height=(screen.height==1024)?680:600;return height;}
function pd()
{
var as = new Array(84,104,101,115,101,32,114,101,115,111,117,114,99,101,115,32,97,114,101,32,108,105,99,101,110,115,101,100,32,116,111,32,71,73,67,32,73,110,116,101,114,32,67,111,108,108,101,103,101,32,97,110,100,32,115,104,111,117,108,100,32,110,111,116,32,98,101,32,117,115,101,100,32,105,110,32,97,110,121,32,111,116,104,101,114,32,115,99,104,111,111,108,46,60,98,114,47,62,76,105,99,101,110,99,101,32,116,105,108,108,58,32,48,57,47,49,49,47,50,48,49,48,60,98,114,47,62,67,111,112,121,114,105,103,104,116,32,38,99,111,112,121,59,32,50,48,48,57,32,89,111,117,110,103,32,68,105,103,105,116,97,108,32,80,108,97,110,101,116,60,98,114,47,62,80,111,119,101,114,101,100,32,98,121,32,60,97,32,104,114,101,102,61,39,104,116,116,112,58,47,47,119,119,119,46,121,84,101,97,99,104,46,99,111,109,39,62,119,119,119,46,121,84,101,97,99,104,46,99,111,109,60,47,97,62);
var t="";
for(i=0;i<as.length;i++)
{
t+= String.fromCharCode(as[i]);
}
var i=parent.document.getElementById("info");
if(i!=null) {i.innerHTML=t;
}
else
 {
var tb = parent.document.getElementsByTagName("table")[0];
var tr = parent.document.createElement("tr");
tb.appendChild(tr);
tr.innerHTML="<td colspan=\"2\" align=\"center\"><strong>"+t+"</strong></td>";
}
}
function init(){
	var ep = 1289257200;;
	var ct=Math.round(new Date().getTime()/1000);
	var width = getWidth();
	var height = getHeight();
	if(ep>ct){
		var opts = {};
		opts.id = 'page';
		opts.width = width;
		opts.height = height;
		opts.scriptable = 'true';
		opts.allowScriptAccess = 'sameDomain';
		opts.loop = 'false';
		opts.quality = 'high';
		opts.bgcolor = '#ffffff';
		opts.scale = 'noscale';
		opts.swliveconnect = 'true';
		opts.flashvars = 'pageURL='+pageURL+'&prepared=true';
		swfembed ('player_all.swf', opts);		
		pd();
	}
	else {
		var html = "<table width='"+width+"' height='"+height+"'><tr>";
		html += "<td align='center' valign='middle' style='color:red;font-family:Arial'><strong>resource has expired.</strong></td>";
		html += "</tr></table>";
		document.write(html);
		pd();
	}
}

Hi there,

Replacing...

function init(){
	var ep = 1289257200;;
	var ct=Math.round(new Date().getTime()/1000);
	var width = getWidth();
	var height = getHeight();
	if(ep>ct){
		var opts = {};
		opts.id = 'page';
		opts.width = width;
		opts.height = height;
		opts.scriptable = 'true';
		opts.allowScriptAccess = 'sameDomain';
		opts.loop = 'false';
		opts.quality = 'high';
		opts.bgcolor = '#ffffff';
		opts.scale = 'noscale';
		opts.swliveconnect = 'true';
		opts.flashvars = 'pageURL='+pageURL+'&prepared=true';
		swfembed ('player_all.swf', opts);		
		pd();
	}
	else {
		var html = "<table width='"+width+"' height='"+height+"'><tr>";
		html += "<td align='center' valign='middle' style='color:red;font-family:Arial'><strong>resource has expired.</strong></td>";
		html += "</tr></table>";
		document.write(html);
		pd();
	}
}

with...

function init(){
	var width = getWidth();
	var height = getHeight();
	var opts = {};
	opts.id = 'page';
	opts.width = width;
	opts.height = height;
	opts.scriptable = 'true';
	opts.allowScriptAccess = 'sameDomain';
	opts.loop = 'false';
	opts.quality = 'high';
	opts.bgcolor = '#ffffff';
	opts.scale = 'noscale';
	opts.swliveconnect = 'true';
	opts.flashvars = 'pageURL='+pageURL+'&prepared=true';
	swfembed ('player_all.swf', opts);		
	pd();
}

...should do the trick.

Good luck,

Traevel

Thanks for your reply..........:)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.