Can someone help me please? Client wants to move their hosting to my account, however there is a PHP countdown ticker that counts down to the next game. The database is hidden, and the company its hosted with went out of business and changed hands twice and the new company refuses to respond to our inquiry. I do have the ticker PHP and corresponding javascript file. I will post here, but where do I begin with the database? Any help would be greatly appreciated. Thanks
This is the ticker.php file
<? $query = " SELECT DATE_FORMAT( DTTM, '%c/%d/%Y %r' ) as DTM, DTTM as ndate , Opponent FROM game_countdown WHERE DTTM > CURDATE( ) ORDER BY DTTM ASC LIMIT 1 "; $db->execute($query); $db->move_cursor(0); @extract($db->get_results()); ?><script language="javascript">
var cd1 = new countdown('cd1');
cd1.TargetDate = "<?=$DTM ?>";
</script>
Here is the corresponding JS file
function countdown(obj)
{
this.obj = obj;
this.TargetDate = “12/31/2020 5:00 AM”;
this.CountActive = true;
this.DisplayStr;
this.Calcage = cd_CalcTime;
this.CountBack = cd_CountBack;
this.Setup = cd_Setup;
}
function cd_CalcTime(secs, num1, num2)
{
s = ((Math.floor(secs/num1))%num2).toString();
if (s.length < 2) s = “0” + s;
return (s);
}
function cd_CountBack(secs)
{
document.getElementById(‘day’).innerHTML = this.Calcage(secs,86400,100000);
document.getElementById(‘hour’).innerHTML = this.Calcage(secs,3600,24);
document.getElementById(‘min’).innerHTML = this.Calcage(secs,60,60);
document.getElementById(‘sec’).innerHTML = this.Calcage(secs,1,60);
if (this.CountActive) setTimeout(this.obj +".CountBack(" + (secs-1) + “)”, 990);
}
function cd_Setup()
{
var dthen = new Date(this.TargetDate);
var dnow = new Date();
ddiff = new Date(dthen-dnow);
gsecs = Math.floor(ddiff.valueOf()/1000);
this.CountBack(gsecs);
}