Php script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Montana
    Sergeant First Class

    • Dec 2005
    • 53

    Php script

    Hello,
    About Noha's classified

    When people respond to an add they get this message

    Notice: Undefined variable: www in /........./notification.php(280) : eval()'d code on line 5

    Notice: Undefined variable: nom in /.........gorum/notification.php(280) : eval()'d code on line 8

    I checked the script but I don't even know what a line of script looks like and where is line 5 and line 8

    The script is notification.php
    This one:

    <?php
    // A notificationok applikacionkent fixek. Az installibben kell oket
    // letrehozni. A user nem hozhat letre ujat es nem torolhet ki egyet
    // sem, maximum modosithatja oket
    $dbClasses[]="notification";
    $notification_typ =
    array(
    "attributes"=>array(
    "id"=>array(
    "type"=>"INT",
    "form hidden",
    ),
    "fixRecipent"=>array(
    "type"=>"INT",
    "bool",
    "default"=>"0",
    "form hidden"
    ),
    "fixCC"=>array(
    "type"=>"INT",
    "bool",
    "default"=>"1",
    "form hidden"
    ),
    "recipent"=>array(
    "type"=>"VARCHAR",
    "max" =>"255",
    "text",
    "mandatory",
    ),
    "cc"=>array(
    "type"=>"VARCHAR",
    "max" =>"255",
    "text",
    "details",
    ),
    "title"=>array(
    "type"=>"VARCHAR",
    "max" =>"120",
    "list",
    "details",
    "form readonly"
    ),
    "subject"=>array(
    "type"=>"VARCHAR",
    "max" =>"120",
    "min" =>"1",
    "text",
    "mandatory",
    "details",
    ),
    "variables"=>array(
    "type"=>"TEXT",
    "details",
    "form readonly",
    ),
    "body"=>array(
    "type"=>"TEXT",
    "textarea",
    "cols"=>50,
    "rows"=>5,
    "mandatory",
    "details",
    ),
    "active"=>array(
    "type"=>"INT",
    "bool",
    "default"=>"1",
    "list",
    "details",
    )
    ),
    "primary_key"=>"id",
    "sort_criteria_attr"=>"id",
    "sort_criteria_dir"=>"d"
    );
    // Egy ilyen objektumban adjuk at a send fuggvenynek azokat a
    // parametereket, amik a kuldeshez szuksegesek:
    class SendingParameters
    {
    var $to; // ez az egy mandatory
    var $cc;
    var $replyTo;

    function SendingParameters()
    {
    $this->to = $this->cc = $this->replyTo = "";
    }
    }
    class Notification extends Object
    {
    function hasObjectRights(&$hasRight, $method, $giveError=FALSE)
    {
    global $generalRight, $lll;
    hasAdminRights($isAdm);
    $hasRight = ($isAdm && $method==Priv_modify) || $method==Priv_load;
    $generalRight = TRUE;
    if( !$hasRight && $giveError )
    {
    handleError($lll["permission_denied"]);
    }
    return ok;
    }

    function showDetailsTool()
    {
    return "";
    }

    function showListVal($attr)
    {
    global $gorumroll, $lll;

    $s="";
    if( $attr=="active" ) {
    if ($this->active) $s=$lll["yes"];
    else $s=$lll["no"];
    }
    elseif ($attr=="title") {
    if( $gorumroll->method=="showhtmllist" )
    {
    $tempRoll = new Roll;
    $tempRoll->method = "showdetails";
    $tempRoll->list = "notification";
    $tempRoll->rollid = $this->id;
    saveInFromFrom($tempRoll);
    $s.=$tempRoll->generAnchor($this->title, "itemtitle");
    }
    else $s=htmlspecialchars($this->{$attr});
    }
    elseif ($attr=="body") {
    $s=nl2br(htmlspecialchars($this->{$attr}));
    }
    else
    {
    $s=htmlspecialchars($this->{$attr});
    }
    return $s;
    }

    function showDetails(&$s, $whereFields="", $withLoad=TRUE,$headText="")
    {
    global $notification_typ, $gorumroll;

    $this->id = $gorumroll->rollid;
    load($this);
    if( $this->fixRecipent )
    {
    $notification_typ["attributes"]["recipent"][]="details";
    }
    else
    {
    $notification_typ["attributes"]["recipent"][]="form invisible";
    }
    showDetails($this, $s, $whereFields, FALSE);
    }

    function generForm(&$s)
    {
    global $notification_typ, $gorumroll;

    if( $this->fixRecipent )
    {
    $notification_typ["attributes"]["recipent"][]="details";
    }
    else
    {
    $notification_typ["attributes"]["recipent"][]="form invisible";
    }
    generForm($this, $s);
    }

    function modify()
    {
    global $notification_typ;

    if( $this->fixRecipent )
    {
    $notification_typ["attributes"]["recipent"]["min"]=1;
    }
    privilegeModify($this);
    }
    /*
    function send()
    {
    global $adminEmail, $htmlNotifications;
    global $HTTP_SERVER_VARS;

    $from = $adminEmail ? "From: $adminEmail" : "";
    $variableNames = explode(", ", $this->variables);
    $variables = func_get_args();
    if( $this->fixRecipent ) $to = $this->recipent;
    else $to = array_shift($variables); // levagjuk a to-t
    if( $this->fixCC ) $cc = $this->cc;
    else $cc = array_shift($variables); // levagjuk a cc-t
    // Ha programozott cc is van es db-bol jovo cc is van:
    if( !$this->fixCC && $this->cc ) $cc = array($cc, $this->cc);
    foreach( $variableNames as $v ) $$v=array_shift($variables);
    // Kulonben nem lehetne eval-ozni:
    $withoutQuote = addcslashes ($this->body, '"');
    eval ("\$mailText = \"$withoutQuote\";");
    if( (defined("Notification_newsletterDeleted") &&
    $this->id==Notification_newsletterDeleted) ||
    $this->subject=="Your EzineListing has been DELETE." )
    {
    global $patrickInfo;
    $mailText.="\n\n";
    if( !isset($patrickInfo) )
    {
    $mailText.="A hivas nem a Newsletter->delete-bol jott\nnotification->id: $this->id";
    }
    else
    {
    $mailText.=$patrickInfo;
    }
    $err = gmail($adminEmail,"contact@phpoutsourcing.com", "Szopacs a Patricknel: $this->subject", $mailText,
    $htmlNotifications, "", "", $cc);
    }
    else
    {
    $err = gmail($adminEmail, $to, $this->subject, $mailText,
    $htmlNotifications, "", "", $cc);
    }
    if( $err )
    {
    }
    }
    */

    // param vagy egy SendingParameters objektum, vagy a visszafele
    // kompatibilitas miatt egy string ami a cimzett emailcimet
    // tartalmazza. Ha egy objektum, akkor magaban foglalja a kuldeshez
    // szukseges osszes parametert - vagyis a cimzetten kivul meg a
    // 'reply to'-t, a 'cc'-t, stb.
    //
    // param utan meg valtozo szamu tovabbi argumentumot kaphat a
    // fuggveny - ott jonnek a valtozok, amiket az email szovegbe be
    // kell helyettesiteni.
    function send( $param )
    {
    global $adminEmail, $htmlNotifications;
    $variableNames = explode(", ", $this->variables);
    $variables = func_get_args();
    array_shift($variables); // levagjuk a param-ot
    // levagjuk az osszes tobbi parametert es inicializaljuk
    // veluk a valtozokat:
    foreach( $variableNames as $v ) $$v=array_shift($variables);

    // a visszafele kompatibilitas miatt, arra az esetre, ha param
    // csak egy string:
    if( !is_object($param) )
    {
    $p = new SendingParameters;
    $p->to = $param;
    $param = $p;
    }

    if( $this->fixRecipent ) $param->to = $this->recipent;
    if( $this->fixCC ) $param->cc = $this->cc;
    // Ha programozott cc is van es db-bol jovo cc is van:
    if( !$this->fixCC && $this->cc )
    {
    $param->cc = array($param->cc, $this->cc);
    }

    // Ha a bodyban csak egy html file nev van, akkor betoltjuk es
    // azt vesszuk template-nek:
    if( ereg("\.html$",$this->body) )
    {
    $this->body=join('', file ($this->body));
    }
    // Kulonben nem lehetne eval-ozni:
    $withoutQuote = addcslashes ($this->body, '"');

    // behelyettesitjuk a valtozokat:
    eval ("\$mailText = \"$withoutQuote\";");
    $from = $adminEmail ? $adminEmail : "";
    $retpath = $param->replyTo ? $param->replyTo : "";
    //$f = fopen("mailtest.html", "a");
    //fputs($f, "<font color='darkgreen'><i>Sending mail: <ul><li>from: $from, <li>to: $param->to, <li>subject: $this->subject, <li>html: $htmlNotifications, <li>cc: $param->cc, <li>retpath: $retpath, <li>replyTo: $param->replyTo</ul></i></font>");
    ob_start();
    global $notifMailText;
    $notifMailText=$mailText;//a kulvilagnak. (csunya, tudom)
    $err = gmail($from, $param->to, $this->subject, $mailText,
    $htmlNotifications, 0, "", "", $param->cc,"","",
    $retpath, $param->replyTo);
    ob_end_clean();
    if( $err )
    {
    //fputs($f, "<font color='darkgreen'><i>Error occured during sending the mail, error code: $err</i></font><br><br>");
    }
    else
    {
    //fputs($f, "<font color='darkgreen'><i>Mail sent.</i></font><br><br>");
    }
    //fclose($f);
    }
    }
    ?>

    What do I have to change to resolve the problem...
    Hope someone have the answer...
    because...Noha's forum is absolutely useless...

    Thank you all
  • navaldesign
    General & Forum Moderator

    • Oct 2005
    • 12080

    #2
    Re: Php script

    5 $dbClasses[]="notification";
    6 $notification_typ =
    7 array(
    8 "attributes"=>array(
    9 "id"=>array(

    Good luck
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

    Comment

    • Montana
      Sergeant First Class

      • Dec 2005
      • 53

      #3
      Re: Php script

      NavalDesign...Grazie!
      Thank You!
      Merci!
      Gracias!

      Do you have an idea...about what I have to write on line 5 and 8?

      Is there any expert in php script around?

      By the way Naval Design I visited your site today....very well made...et tu fais un métier trés intéressant...J'espère que cela marche trés bien pour toi. Did you go to Monaco this year? I saw the last event on TV ..beautiful boats for sale...but I prefer the Vieux gréments -Old boats..-

      Arrivederci! Au revoir!

      Comment

      • navaldesign
        General & Forum Moderator

        • Oct 2005
        • 12080

        #4
        Re: Php script

        Originally posted by Montana
        NavalDesign...Grazie!
        Thank You!
        Merci!
        Gracias!

        Do you have an idea...about what I have to write on line 5 and 8?

        Is there any expert in php script around?

        By the way Naval Design I visited your site today....very well made...et tu fais un métier trés intéressant...J'espère que cela marche trés bien pour toi. Did you go to Monaco this year? I saw the last event on TV ..beautiful boats for sale...but I prefer the Vieux gréments -Old boats..-

        Arrivederci! Au revoir!
        Noah's script is absolutely strange to me. I'll have alook but can't really promisse anything. Did you install it in a subfolder or in the main directory?

        Thanks for the compliments
        Navaldesign
        Logger Lite: Low Cost, Customizable, multifeatured Login script
        Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
        DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
        Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

        Comment

        • Montana
          Sergeant First Class

          • Dec 2005
          • 53

          #5
          Re: Php script

          In a subfolder.

          You're welcome.

          Comment

          Working...
          X