1
hi
i am use a XOOPS 2.10 stable but i see this error messages on php debug mode :
this error code
http://www.site.com/modules/tellafriend/index.php?target_uri=http%3A%2F%2Fwww.site.com%2Fmodules%2Fnews%2Farticle.php%3Fstoryid%3D17&subject=
ERROR [Xoops]: Undefined index: PATH in file C:webhomevhostssite.comhttpdocsmodulestellafriendincludegtickets.php line 41
this interesting code [error line is bold and underline]
// create a token
list( $usec , $sec ) = explode( " " , microtime() ) ;
[b][u] $token = crypt( $salt . $usec . $_SERVER['PATH'] . $sec ) ;[/b][/u]
$this->_latest_token = $token ;
if( empty( $_SESSION['XOOPS_G_STUBS'] ) ) $_SESSION['XOOPS_G_STUBS'] = array() ;
// limit max stubs 10
if( sizeof( $_SESSION['XOOPS_G_STUBS'] ) > 10 ) {
$_SESSION['XOOPS_G_STUBS'] = array_slice( $_SESSION['XOOPS_G_STUBS'] , -10 ) ;
}
and
this error code
http://www.site.com/banners.php
ERROR [Xoops]: Undefined variable: xoopsUser in file http://www.site.com/header.php line 68
this interesting code [error line is bold and underline]
function bannerstats($login, $pass)
{
global $xoopsDB, $xoopsConfig, $xoopsLogger;
if ($login == "" || $pass == "") {
redirect_header("banners.php",2);
exit();
}
$result = $xoopsDB->query(sprintf("SELECT cid, name, passwd FROM %s WHERE login=%s", $xoopsDB->prefix("bannerclient"), $xoopsDB->quoteString($login)));
list($cid, $name, $passwd) = $xoopsDB->fetchRow($result);
if ( $pass==$passwd ) {
include "header.php";
echo "
Current Active Banners for
$name
ID |
Imp. Made |
Imp. Total |
Imp. Left |
Clicks |
% Clicks |
Functions |
";
[b][u] $result = $xoopsDB->query("select bid, imptotal, impmade, clicks, date from ".$xoopsDB->prefix("banner")." where cid=$cid");[/b][/u]
while ( list($bid, $imptotal, $impmade, $clicks, $date) = $xoopsDB->fetchRow($result) ) {
if ( $impmade == 0 ) {
$percent = 0;
} else {
$percent = substr(100 * $clicks / $impmade, 0, 5);
}
if ( $imptotal == 0 ) {
$left = "Unlimited";
} else {
$left = $imptotal-$impmade;
}
echo "$bid |
$impmade |
$imptotal |
$left |
$clicks |
$percent% |
$login&pass=$pass&cid=$cid&bid=$bid&t=".$GLOBALS['xoopsSecurity']->createToken()."'>E-mail Stats |
";
}
echo "
Following are your running Banners in ".$xoopsConfig['sitename']."
";
$result = $xoopsDB->query("select bid, imageurl, clickurl, htmlbanner, htmlcode from ".$xoopsDB->prefix("banner")." where cid=$cid");
while ( list($bid, $imageurl, $clickurl,$htmlbanner, $htmlcode) = $xoopsDB->fetchRow($result) ) {
$numrows = $xoopsDB->getRowsNum($result);
if ($numrows>1) {
echo "
";
}
if (!empty($htmlbanner) && !empty($htmlcode)){
echo $myts->displayTarea($htmlcode);
}else{
if(strtolower(substr($imageurl,strrpos($imageurl,".")))==".swf") {
echo "";
} else {
echo "$imageurl' border='1' alt='' />";
}
}
echo"Banner ID: $bid
Send $login&cid=$cid&bid=$bid&pass=$pass&t=".$GLOBALS['xoopsSecurity']->createToken()."'>E-Mail Stats for this Banner
";
if (!$htmlbanner){
$clickurl = htmlspecialchars($clickurl, ENT_QUOTES);
echo "This Banner points to $clickurl'>this URL
";
}
}
where is problem ?
thanks for help