This is what im work on for like n dislike for V2 profiles

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    This is what im work on for like n dislike for V2 profiles

    HTML Code:
    <?php
    define('WCS',true);
    include('./core/main.inc');
    //include('./core/functions.inc');
    header_type();
    cleardata();
    if(ipbanned(ip(),browser())){
    if(!shield(getuid_sid($sid))){
    echo head_tag("Ip Blocked!!!",0,0);
    echo ipbanned_msg();
    echo foot_tag();
    exit();
    }
    }
    if(!islogged($sid)){
    echo head_tag("Error!!!",0,0);
    echo session_expired();
    echo foot_tag();
    exit();
    }
    if(banned(getuid_sid($sid))){
    echo head_tag("Error!!!",1,getnick_sid($sid));
    echo banned_msg($sid);
    echo foot_tag();
    exit();
    }
    if($pass!=""){$pw="&amp;pass=$pass";}
    if($rid!=""){
    $rooms=mysql_fetch_array(mysql_query("SELECT id, name FROM chatrooms WHERE id='".$rid."'"));
    $rname=$rooms[1];
    $chatlink="&amp;rid=$rid$pw";
    }
    mysql_query("UPDATE users SET browser='".browser()."', ipaddress='".ip()."', host='".subno()."' WHERE id='".getuid_sid($sid)."'");
    
    /////////////////////////DISLIKE/////////////////////////
    if($action=="dislikeprof")
    {
    
    
    $main.="<p align=\"center\">";
         $main.="<div class=\"box_cen\" align=\"center\">";
      $main.="<b>I dislike this profile</b>";
     $main.="<div class=\"box_sub\" align=\"left\">";
    $dislikeswho = getuid_sid($sid);
    setaction($uid, "$dislikeswho being disliked");
    $stampiti = mysql_fetch_array(mysql_query("SELECT dislike FROM users WHERE id='$likeswho'"));
    
    mysql_query("UPDATE users SET dislike='$stampit' WHERE id='$dislikeswho'");
    $dislikeswho = $_REQUEST["who"];
    
    mysql_query("UPDATE users SET dislikes=dislikes+1 WHERE id='$dislikeswho'");
    $dislikenick = getnick_sid($sid);
    $msg = "ahw $dislikenick dont like your profile!!! U better go and improve it....[br/][small]p.s: this is an automated pm[/small]";
    autopm($msg, $givewho);
    print "You have now given your dislikes for this profile!</br>";
    
    /////////////////////////LIKE/////////////////////////
    if($action=="likeprof")
    {
    
    
    $main.="<p align=\"center\">";
         $main.="<div class=\"box_cen\" align=\"center\">";
      $main.="<b>I like this profile</b>";
     $main.="<div class=\"box_sub\" align=\"left\">";
    $likeswho = getuid_sid($sid);
    setaction($uid, "$likeswho being liked");
    $stampiti = mysql_fetch_array(mysql_query("SELECT likes FROM users WHERE id='$likeswho'"));
    
    mysql_query("UPDATE users SET likes='$stampit' WHERE id='$likeswho'");
    $likeswho = $_REQUEST["who"];
    
    mysql_query("UPDATE users SET likes=likes+1 WHERE id='$likeswho'");
    $likenick = getnick_sid($sid);
    $msg = "congratulations $likenick has sent you his/her like for your profile today[br/][small]p.s: this is an automated pm[/small]";
    autopm($msg, $givewho);
    print "You have now given your likes for this profile!";
    
    
      $L1="$sixkey<a $key6 href=\"../profile.php?who=$who&amp;sid=$sid\">Back</a>"; 
    $L2="$sixkey<a $key6 href=\"../inbox/inbox.php?sid=$sid\">Inbox</a>"; 
    $L3="$sevenkey<a $key7 href=\"../buds/buds.php?sid=$sid\">BuddyList</a>"; 
    $L4="$eightkey<a $key8 href=\"../chat/public.php?sid=$sid\">Chat</a>"; 
    $L5="$ninekey<a $key9 href=\"../forums/forums.php?sid=$sid\">Forums</a>"; 
    $L6="$zerokey<a $key0 href=\"../main.php?sid=$sid\"><img src=\"./images/home.gif\" alt=\"\"/>Main Menu</a>";
    ?>
    I am getting this Parse error: syntax error, unexpected $end in /home/teddywap/public_html/likendislike.php on line 86 its the very last line so may anyone plz help once i got it working I will share the code.. I got it from Riderz post but his is for lava so im editing so it works on V2 as well.. Thanks..

    #2
    Try to change this $main.= with echo and all of this make just html tags, don't place those in vars:

    PHP Code:
      $L1="$sixkey<a $key6 href=\"../profile.php?who=$who&amp;sid=$sid\">Back</a>"
    $L2="$sixkey<a $key6 href=\"../inbox/inbox.php?sid=$sid\">Inbox</a>"
    $L3="$sevenkey<a $key7 href=\"../buds/buds.php?sid=$sid\">BuddyList</a>"
    $L4="$eightkey<a $key8 href=\"../chat/public.php?sid=$sid\">Chat</a>"
    $L5="$ninekey<a $key9 href=\"../forums/forums.php?sid=$sid\">Forums</a>"
    $L6="$zerokey<a $key0 href=\"../main.php?sid=$sid\"><img src=\"./images/home.gif\" alt=\"\"/>Main Menu</a>"
    If i catching it right these are big differences between those scripts.

    Here stampiti and stampit...
    PHP Code:
    $stampiti mysql_fetch_array(mysql_query("SELECT dislike FROM users WHERE id='$likeswho'"));

    mysql_query("UPDATE users SET dislike='$stampit' WHERE id='$dislikeswho'"); 
    Last edited by arnage; 13.01.12, 01:00.
    <!DOCTYPE html PUBLIC "-//WAPFORUM.RS

    Comment


      #3
      HTML Code:
      <?php
      define('WCS',true);
      include('./core/main.inc');
      //include('./core/functions.inc');
      header_type();
      cleardata();
      if(ipbanned(ip(),browser())){
      if(!shield(getuid_sid($sid))){
      echo head_tag("Ip Blocked!!!",0,0);
      echo ipbanned_msg();
      echo foot_tag();
      exit();
      }
      }
      if(!islogged($sid)){
      echo head_tag("Error!!!",0,0);
      echo session_expired();
      echo foot_tag();
      exit();
      }
      if(banned(getuid_sid($sid))){
      echo head_tag("Error!!!",1,getnick_sid($sid));
      echo banned_msg($sid);
      echo foot_tag();
      exit();
      }
      if($pass!=""){$pw="&amp;pass=$pass";}
      if($rid!=""){
      $rooms=mysql_fetch_array(mysql_query("SELECT id, name FROM chatrooms WHERE id='".$rid."'"));
      $rname=$rooms[1];
      $chatlink="&amp;rid=$rid$pw";
      }
      mysql_query("UPDATE users SET browser='".browser()."', ipaddress='".ip()."', host='".subno()."' WHERE id='".getuid_sid($sid)."'");
      
      /////////////////////////DISLIKE/////////////////////////
      else if($action=="dislikeprof")
      {
      
      
      $main.="<p align=\"center\">";
           $main.="<div class=\"box_cen\" align=\"center\">";
        $main.="<b>I dislike this profile</b>";
       $main.="<div class=\"box_sub\" align=\"left\">";
      $dislikeswho = getuid_sid($sid);
      setaction($uid, "$dislikeswho being disliked");
      $stampiti = mysql_fetch_array(mysql_query("SELECT dislike FROM users WHERE id='$likeswho'"));
      
      mysql_query("UPDATE users SET dislike='$stampit' WHERE id='$dislikeswho'");
      $dislikeswho = $_REQUEST["who"];
      
      mysql_query("UPDATE users SET dislikes=dislikes+1 WHERE id='$dislikeswho'");
      $dislikenick = getnick_sid($sid);
      $msg = "ahw $dislikenick dont like your profile!!! U better go and improve it....[br/][small]p.s: this is an automated pm[/small]";
      autopm($msg, $givewho);
      print "You have now given your dislikes for this profile!</br>";
      
       $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM users WHERE id='".$uid."'"));
          $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM iconset WHERE id='".$thid[0]."'"));
          $unick = getnick_uid($who);
              include ("footer.php");
        $main.="</p></div>";
      
      exit();
      }
      /////////////////////////LIKE/////////////////////////
      else if($action=="likeprof")
      {
      
      
      $main.="<p align=\"center\">";
           $main.="<div class=\"box_cen\" align=\"center\">";
        $main.="<b>I like this profile</b>";
       $main.="<div class=\"box_sub\" align=\"left\">";
      $likeswho = getuid_sid($sid);
      setaction($uid, "$likeswho being liked");
      $stampiti = mysql_fetch_array(mysql_query("SELECT likes FROM users WHERE id='$likeswho'"));
      
      mysql_query("UPDATE users SET likes='$stampit' WHERE id='$likeswho'");
      $likeswho = $_REQUEST["who"];
      
      mysql_query("UPDATE users SET likes=likes+1 WHERE id='$likeswho'");
      $likenick = getnick_sid($sid);
      $msg = "congratulations $likenick has sent you his/her like for your profile today[br/][small]p.s: this is an automated pm[/small]";
      autopm($msg, $givewho);
      print "You have now given your likes for this profile!";
      
       $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM users WHERE id='".$uid."'"));
          $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM iconset WHERE id='".$thid[0]."'"));
          $unick = getnick_uid($who);
              include ("footer.php");
        $main.="</p></div>";
      
        $L1="$sixkey<a $key6 href=\"./profile.php?who=$who&amp;sid=$sid\">Back</a>"; 
      $L2="$sixkey<a $key6 href=\"./inbox/inbox.php?sid=$sid\">Inbox</a>"; 
      $L3="$sevenkey<a $key7 href=\"./buds/buds.php?sid=$sid\">BuddyList</a>"; 
      $L4="$eightkey<a $key8 href=\"./chat/public.php?sid=$sid\">Chat</a>"; 
      $L5="$ninekey<a $key9 href=\"./forums/forums.php?sid=$sid\">Forums</a>"; 
      $L6="$zerokey<a $key0 href=\"./main.php?sid=$sid\"><img src=\"./images/home.gif\" alt=\"\"/>Main Menu</a>";
       echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,$L6,0,0,$main); 
      echo foot_tag(); 
      exit; 
      }
      Do u main this

      Comment


        #4
        Nope. Where ever you see this: $main.=
        change it with this: echo
        istead this:
        PHP Code:
        $L1="$sixkey<a $key6 href=\"../profile.php?who=$who&sid=$sid\">Back</a>"
        write every line like this:
        Code:
        echo "<a href=\"../profile.php?who=$who&sid=$sid\">Back</a>";
        and $stampiti var at the next line missing letter i.
        <!DOCTYPE html PUBLIC "-//WAPFORUM.RS

        Comment


          #5
          $main is the only one that will work with WapD v2...

          Comment


            #6
            parse syntex error usually means your missing a closed } every tag u have open in code u must have a close statement

            PHP Code:
            if($action=="likeprof") {   $main.="<p align=\"center\">";      $main.="<div class=\"box_cen\" align=\"center\">";   $main.="<b>I like this profile</b>";  $main.="<div class=\"box_sub\" align=\"left\">"$likeswho getuid_sid($sid); setaction($uid"$likeswho being liked"); $stampiti mysql_fetch_array(mysql_query("SELECT likes FROM users WHERE id='$likeswho'"));  mysql_query("UPDATE users SET likes='$stampit' WHERE id='$likeswho'"); $likeswho $_REQUEST["who"];  mysql_query("UPDATE users SET likes=likes+1 WHERE id='$likeswho'"); $likenick getnick_sid($sid); $msg "congratulations $likenick has sent you his/her like for your profile today[br/][small]p.s: this is an automated pm[/small]"autopm($msg$givewho); print "You have now given your likes for this profile!";     $L1="$sixkey<a $key6 href=\"../profile.php?who=$who&amp;sid=$sid\">Back</a>";  $L2="$sixkey<a $key6 href=\"../inbox/inbox.php?sid=$sid\">Inbox</a>";  $L3="$sevenkey<a $key7 href=\"../buds/buds.php?sid=$sid\">BuddyList</a>";  $L4="$eightkey<a $key8 href=\"../chat/public.php?sid=$sid\">Chat</a>";  $L5="$ninekey<a $key9 href=\"../forums/forums.php?sid=$sid\">Forums</a>";  $L6="$zerokey<a $key0 href=\"../main.php?sid=$sid\"><img src=\"./images/home.gif\" alt=\"\"/>Main Menu</a>"; } // u are missing closed function here
            ?> 









            Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer..
            Want A Profesional Logo or Theme For Your wap site Pm Me.If I Have The Time Ill Make It For Free

            Comment


              #7
              Thanks Andy but tryed it with the closed } n still got an error on last line..

              Comment


                #8
                ok try this

                <?php
                define('WCS',true);
                include('./core/main.inc');
                //include('./core/functions.inc');
                header_type();
                cleardata();
                if(ipbanned(ip(),browser())){
                if(!shield(getuid_sid($sid))){
                echo head_tag("Ip Blocked!!!",0,0);
                echo ipbanned_msg();
                echo foot_tag();
                exit();
                }
                }
                if(!islogged($sid)){
                echo head_tag("Error!!!",0,0);
                echo session_expired();
                echo foot_tag();
                exit();
                }
                if(banned(getuid_sid($sid))){
                echo head_tag("Error!!!",1,getnick_sid($sid));
                echo banned_msg($sid);
                echo foot_tag();
                exit();
                }
                if($pass!=""){$pw="&amp;pass=$pass";}
                if($rid!=""){
                $rooms=mysql_fetch_array(mysql_query("SELECT id, name FROM chatrooms WHERE id='".$rid."'"));
                $rname=$rooms[1];
                $chatlink="&amp;rid=$rid$pw";
                }
                mysql_query("UPDATE users SET browser='".browser()."', ipaddress='".ip()."', host='".subno()."' WHERE id='".getuid_sid($sid)."'");

                /////////////////////////DISLIKE/////////////////////////
                else if($action=="dislikeprof")
                {


                $main.="<p align=\"center\">";
                $main.="<div class=\"box_cen\" align=\"center\">";
                $main.="<b>I dislike this profile</b>";
                $main.="<div class=\"box_sub\" align=\"left\">";
                $dislikeswho = getuid_sid($sid);
                setaction($uid, "$dislikeswho being disliked");
                $stampiti = mysql_fetch_array(mysql_query("SELECT dislike FROM users WHERE id='$likeswho'"));

                mysql_query("UPDATE users SET dislike='$stampit' WHERE id='$dislikeswho'");
                $dislikeswho = $_REQUEST["who"];

                mysql_query("UPDATE users SET dislikes=dislikes+1 WHERE id='$dislikeswho'");
                $dislikenick = getnick_sid($sid);
                $msg = "ahw $dislikenick dont like your profile!!! U better go and improve it....[br/][small]p.s: this is an automated pm[/small]";
                autopm($msg, $givewho);
                print "You have now given your dislikes for this profile!</br>";

                $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM users WHERE id='".$uid."'"));
                $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM iconset WHERE id='".$thid[0]."'"));
                $unick = getnick_uid($who);
                include ("footer.php");
                $main.="</p></div>";

                exit();
                }
                /////////////////////////LIKE/////////////////////////
                else if($action=="likeprof")
                {


                $main.="<p align=\"center\">";
                $main.="<div class=\"box_cen\" align=\"center\">";
                $main.="<b>I like this profile</b>";
                $main.="<div class=\"box_sub\" align=\"left\">";
                $likeswho = getuid_sid($sid);
                setaction($uid, "$likeswho being liked");
                $stampiti = mysql_fetch_array(mysql_query("SELECT likes FROM users WHERE id='$likeswho'"));

                mysql_query("UPDATE users SET likes='$stampit' WHERE id='$likeswho'");
                $likeswho = $_REQUEST["who"];

                mysql_query("UPDATE users SET likes=likes+1 WHERE id='$likeswho'");
                $likenick = getnick_sid($sid);
                $msg = "congratulations $likenick has sent you his/her like for your profile today[br/][small]p.s: this is an automated pm[/small]";
                autopm($msg, $givewho);
                print "You have now given your likes for this profile!";

                $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM users WHERE id='".$uid."'"));
                $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM iconset WHERE id='".$thid[0]."'"));
                $unick = getnick_uid($who);
                include ("footer.php");
                $main.="</p></div>";

                $L1="$sixkey<a $key6 href=\"./profile.php?who=$who&amp;sid=$sid\">Back</a>";
                $L2="$sixkey<a $key6 href=\"./inbox/inbox.php?sid=$sid\">Inbox</a>";
                $L3="$sevenkey<a $key7 href=\"./buds/buds.php?sid=$sid\">BuddyList</a>";
                $L4="$eightkey<a $key8 href=\"./chat/public.php?sid=$sid\">Chat</a>";
                $L5="$ninekey<a $key9 href=\"./forums/forums.php?sid=$sid\">Forums</a>";
                $L6="$zerokey<a $key0 href=\"./main.php?sid=$sid\"><img src=\"./images/home.gif\" alt=\"\"/>Main Menu</a>";
                echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,$L6,0,0,$m ain);
                echo foot_tag();
                exit;
                }}

                just tested it with my php editor and it gives the green light









                Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer..
                Want A Profesional Logo or Theme For Your wap site Pm Me.If I Have The Time Ill Make It For Free

                Comment


                  #9
                  Thanks Andy

                  Comment

                  Working...
                  X