MetalMan390
Regular Member
- Sep 26, 2009
- 284
- 18
I am trying to install the Elitius affiliate script on my site, but after the install I have a few errors. For reference, the installation instructions are here: http://www.elitius.com/docs/install.html
After I was prompted to remove the install directory (last line of the instructions, in RED), I hit next and when on this page: http://www.mydomain.com/affiliate/admin/ I was presented with these errors:
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/xxxxxx/public_html/affiliate/classes/XpDb.php on line 185
Warning: Cannot modify header information - headers already sent by (output started at /home/xxxxxx/public_html/affiliate/classes/XpDb.php:185) in /home/xxxxxx/public_html/affiliate/admin/util.php on line 41
I have absolutely zero experience with scripting, programming, etc, so I have no idea what this means. I have included the lines of code in question below. Any help would be appreciated.
After I was prompted to remove the install directory (last line of the instructions, in RED), I hit next and when on this page: http://www.mydomain.com/affiliate/admin/ I was presented with these errors:
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/xxxxxx/public_html/affiliate/classes/XpDb.php on line 185
Warning: Cannot modify header information - headers already sent by (output started at /home/xxxxxx/public_html/affiliate/classes/XpDb.php:185) in /home/xxxxxx/public_html/affiliate/admin/util.php on line 41
I have absolutely zero experience with scripting, programming, etc, so I have no idea what this means. I have included the lines of code in question below. Any help would be appreciated.
Code:
/**
* Returns recordset as associative array where the key is the first field
*
* @param str $aSql sql query
*
* @return arr
*/
function getKeyValue($aSql)
{
$out = Array ();
$res = $this->query($aSql);
while ($temp = mysql_fetch_row($res))
{
$out[$temp[0]] = $temp[1];
}
return $out;
}
}
Code:
/**
* Checks if admin is logged in
*/
function admin_auth()
{
global $gXpAdmin;
if ($_COOKIE['admin_name'])
{
$admin = $gXpAdmin->getAdminByUsername($_COOKIE['admin_name']);
$pwd = crypt($admin['password'], 'secret_string');
if ($pwd != $_COOKIE['admin_pwd'])
{
header("Location: {$gXpConfig['base']}{$gXpConfig['dir']}{$gXpConfig['admin']}login.php");
exit;
}
}
else
{
header("Location: {$gXpConfig['base']}{$gXpConfig['dir']}{$gXpConfig['admin']}login.php");
exit;
}
}