Private Profile for Wapdesire v2 error

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

    Private Profile for Wapdesire v2 error

    hey all, im working on coding from lava - v2, its the private profile code, cant seem to get it to work at all,

    When i recoded it to work on v2, and put my profile on private, it does work but for some reason not even i can view my profile... ooops!!

    Something deffo wrong, heres the code's im using, can anybody help?


    in funtions.php:
    PHP Code:
    function shad0w($uid$who)
    {

    $pm mysql_fetch_array(mysql_query("SELECT viewpro FROM users WHERE id='".$who."'"));
    if(
    $pm[0]=='2')
    {
    if (
    ismod($uid))
    {
    return 
    true;
    }else{

    return 
    false;
    }
    return 
    false;
    }else if(
    $pm[0]=='1')
    {
    if(
    $uid==$who||arebuds($uid,$who)||ismod($uid))
    {
    return 
    true;
    }else{
    return 
    false;
    }
    }else if(
    $pm[0]=='0')
    {
    return 
    true;
    }


    In privatepro.php
    PHP Code:
    if($action=="viewpro")
    {
    addonline(getuid_sid($sid),"Profile","");
    $act $_GET["act"];
    $acts = ($act=="dis" 1);
    $main.="<card id=\"main\" title=\"Site\">";
    $main.="<p align=\"center\">";
    //$uid = getuid_sid($sid);
    $res mysql_query("UPDATE users SET viewpro='".$acts."' WHERE id='".$uid."'");
    if(
    $res)
    {
    $main.="<img src=\"images/ok.gif\" alt=\"o\"/>Profile changed!<br/>";
    }else{
    $main.="<img src=\"images/notok.gif\" alt=\"x\"/>
    It's impossible to update your profile!<br/>"
    ;
    }
    $main.="<br/><a href=\"main.php?sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
    $main.="Home</a>";
    $main.="</p></card>";

    Settings.php
    PHP Code:
    $viewpro mysql_fetch_array(mysql_query("SELECT viewpro FROM users WHERE id = '".$uid."'"));

    if(
    $viewpro[0]=="1")
    {
    $main.="<a href=\"privatepro.php?action=viewpro&amp;sid=$sid&amp;act=dis\">Make Profile Public </a><br/>";
    }else{
    $main.="<a href=\"privepro.php?action=viewpro&amp;sid=$sid&amp;act=enb\">Make Profile Private </a><br/>";

    Profile.php

    PHP Code:
    if (shad0w($uid,$who)) {

    >>>
    code profile<<<

    }else{
    $main.="<b>Private Profile !!!</ b> <br/> Ya cant view this profile as it is private, ya Daft Pervert!!<br/>You will need to add this geezer to ya budlist first!!<br/> ";

    SQL

    PHP Code:
    add in users

    viewpro int 1 
    default 
    Last edited by DeViLzHeLpEr; 25.05.12, 13:36.

    #2
    Well

    Im looking from my iPhone but what I can see is wml code in a XHTML script cards are wml and I'm not sure since ive never looked at wapdesire v2 but yeah pretty sure that will force u 2 download the page instead of it rendering it


    Ps sorry had a bit to drink
    Creator of
    Epix.Mobi

    Keep an Eye on us Big things coming soon!!!!
    Need something for your site hit me up here

    http://coding-talk.com/forum/main-fo...r-your-wapsite

    Comment


      #3
      this should work

      put this in profile.php
      PHP Code:
      $private mysql_fetch_array(mysql_query("SELECT viewpro FROM users WHERE id='".$who."'"));
      if((
      $private[0]=='1') && (buds(getuid_sid($sid), $who)!=2)  && (!ismod(getuid_sid($sid))) && (getuid_sid($sid)!=$who))
      {
      $unick getnick_uid($who);
      $main.="$unick 's Profile is Private<br/>\n";
      }
      else 
      {
      //profile code here

      privatepro.php
      PHP Code:
      <?php
      define
      ('WCS',true);
      include(
      '../core/main.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();
      }
      mysql_query("UPDATE users SET browser='".browser()."', ipaddress='".ip()."', host='".subno()."' WHERE id='".getuid_sid($sid)."'");

      /////////////////////////PRIVATE PROFILE/////////////////////////

      addonline(getuid_sid($sid),"Settings","");
      echo 
      head_tag(getnick_sid($sid)."@Settings",1,getnick_sid($sid));
      $title="<b>Private Profile</b>";
      $main="<p align=".align().">";
      $res=mysql_query("UPDATE users SET viewpro='".$id."' WHERE id='".getuid_sid($sid)."'");
      if((
      $res)&&($id==1)){$main.="<img src=\"../images/ok.gif\" alt=\"o\"/><br/>Private Profile On\n";}
      else if((
      $res)&&($id==0)){$main.="<img src=\"../images/ok.gif\" alt=\"o\"/><br/>Private Profile Off\n";}
      else{
      $main.="<img src=\"../images/error.gif\" alt=\"o\"/><br/>Database Error!\n";}
      $main.="<br/>
      <br/>
      $fivekey<a $key5 href=\"./settings.php?sid=$sid\">Settings</a>
      </p>\n"
      ;
      $L1="$sixkey<a $key6 href=\"../inbox/inbox.php?sid=$sid\">Inbox</a>";
      $L2="$sevenkey<a $key7 href=\"../buds/buds.php?sid=$sid\">BuddyList</a>";
      $L3="$eightkey<a $key8 href=\"../chat/public.php?sid=$sid\">Chat</a>";
      $L4="$ninekey<a $key9 href=\"../forums/forums.php?sid=$sid\">Forums</a>";
      $L5="$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,0,0,0,$main);
      echo 
      foot_tag();
      exit();
      ?>
      in settings.php
      PHP Code:
      if($row_users[viewpro]==0){$main.="<a href=\"./privatepro.php?id=1&amp;sid=$sid\">Make Profile Private</a><br/>\n";}
      else{
      $main.="<a href=\"./privatepro.php?id=0&amp;sid=$sid\">Make Profile Public</a><br/>\n";} 
      Last edited by arnage; 26.05.12, 08:33.

      Comment


        #4
        hello lads , fullcircle im away tonight so wil get it in morning, what do i add in the database buddy

        Comment


          #5
          my profile edit

          i thank you very much

          PHP Code:
          <?php
           define
          ('WCS',true);
           include(
          './core/main.inc');
           
          header_type();
           
          cleardata();
           if(
          ipbanned(ip(),browser())){
           if(!
          shield(getuid_sid($sid))){
           echo 
          head_tag("Ip Bloke!!!",0,0);
           echo 
          ipbanned_msg();
           echo 
          foot_tag();
           exit();
           }
           }
           if(!
          islogged($sid)){
           echo 
          head_tag("Hata!!!",0,0);
           echo 
          session_expired();
           echo 
          foot_tag();
           exit();
           }
           if(
          banned(getuid_sid($sid))){
           echo 
          head_tag("Hata!!!",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)."'");

           
          /////////////////////////VIEW PROFILE/////////////////////////

           
          if($usersbyip==1)
           {
           
          $nick=getnick_uid($who).htmlspecialchars("'",ENT_Q UOTES)."s";
           if(
          getuid_sid($sid)==$who)$nick="$nick";
           
          addonline(getuid_sid($sid),"$nick Profil'de","");
           echo 
          head_tag(getnick_sid($sid)."$nick@Profil",1,getnic k_sid($sid));
           
          $title="<strong>Kullanıcı Ip/Browser KarşılaÅŸtırma</strong>";
           
          $main="<p align=".align().">\n";
           if(
          user_info(getuid_sid($sid))){
           
          $main.="<strong>ip ve browseri Aynı Olan Kullanıcılar</strong><br />
           <br />\n"
          ;
           
          $whoinfo=mysql_fetch_array(mysql_query("SELECT ipaddress, browser FROM users WHERE id='".$who."'"));
           if(
          $page==""||$page<=0)$page=1;
           
          $num_items=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM users WHERE ipaddress='".$whoinfo[0]."' AND browser='".$whoinfo[1]."'"));
           
          $items_per_page=10;
           
          $num_pages=ceil($num_items[0]/$items_per_page);
           if(
          $page>$num_pages)$page=$num_pages;
           
          $limit_start=($page-1)*$items_per_page;
           
          $sql="SELECT id, username FROM users 
           WHERE ipaddress='"
          .$whoinfo[0]."' 
           AND browser='"
          .$whoinfo[1]."' 
           ORDER BY username LIMIT 
          $limit_start$items_per_page";
           
          $items=mysql_query($sql);
           
          $main.=mysql_error();
           while(
          $item=mysql_fetch_array($items))
           {
           
          $sex=mysql_fetch_array(mysql_query("SELECT sex FROM profiles WHERE uid='".$item[0]."'"));
           if(
          $sex[0]=="M"){$usersex="<img src=\"./images/male.gif\" alt=\"(M)\"/>";$color=" style=\"color:#0000FF\"";}
           if(
          $sex[0]=="F"){$usersex="<img src=\"./images/female.gif\" alt=\"(F)\"/>";$color=" style=\"color:#FF0066\"";}
           if(
          $sex[1]!=""){$usersex=getbbcode($sex[1],$sid,1);}
           
          $main.=$usersex."<a href=\"./profile.php?who=$item[0]&amp;sid=$sid\"$color>".$item[1]."</a><br />\n";
           }
           if(
          $page>1){
           
          $main.="<br /><a href=\"./profiles.php?usersbyip=1&amp;page=".($page-1)."&amp;sid=$sid\">&lt;-Geri</a> ";
           }
           if(
          $page<$num_pages){
           if(
          $page==1)$main.="<br />";
           
          $main.="<a href=\"./profiles.php?usersbyip=1&amp;page=".($page+1)."&am p;sid=$sid\">Ä°leri-&gt;</a>\n";
           }
           
          $main.="<br />Sayfa - $page/$num_pages\n";
           if(
          $num_pages>2){$main.=getjumper("online","","",$ sid);}
           }else{
           
          addonline(getuid_sid($sid),"Yasak Bölge!","");
           
          $main.="<img src=\"./images/error.gif\" alt=\"x\"/><br />Bu Sayfaya EriÅŸiminiz Kısıtlanmış!\n</p>\n";
           }
           
          $main.="
           <br /><img src=\"./images/banner_2.gif\" alt=\"-------\"/><br />
           [<a 
          $key6 href=\"./profile.php?who=$who&amp;sid=$sid\">Geri</a>]<br />
           [<a 
          $key6 href=\"./inbox/inbox.php?sid=$sid\">mesajlar</a>]
           [<a 
          $key7 href=\"./buds/buds.php?sid=$sid\">ArkadaÅŸ List</a>]<br />
           [<a 
          $key8 href=\"./chat/public.php?sid=$sid\">Chat</a>]
           [<a 
          $key9 href=\"./forums/forums.php?sid=$sid\">Forum</a>]<br />
           [<a 
          $key0 href=\"./main.php?sid=$sid\"><img src=\"./images/home.gif\" alt=\"\"/>Aana Sayfa</a>]\n";
           
          $main.="</p>\n";
           echo 
          xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,$L6,0,0,$m ain);
           echo 
          foot_tag();
           exit;
           }

           echo 
          head_tag(getnick_sid($sid)."@Profil",1,getnick_sid ($sid));
           if((
          $who=="")||($who==0)||!isuser($who)){
           
          $main="<p align=".align().">
           <img src=\"./images/error.gif\" alt=\"[x]\"/> Böyle Bir Kullanıcı Yok Yada Kullanıcı SilinmiÅŸ.<br />\n"
          ;
           
          $main.="
           <br /><img src=\"./images/banner_2.gif\" alt=\"-------\"/><br />
           [<a 
          $key6 href=\"./inbox/inbox.php?sid=$sid\">mesajlar</a>]
           [<a 
          $key7 href=\"./buds/buds.php?sid=$sid\">ArkadaÅŸ List</a>]<br />
           [<a 
          $key8 href=\"./chat/public.php?sid=$sid\">Chat</a>]
           [<a 
          $key9 href=\"./forums/forums.php?sid=$sid\">Forum</a>]<br />
           [<a 
          $key0 href=\"./main.php?sid=$sid\"><img src=\"./images/home.gif\" alt=\"\"/>Aana Sayfa</a>]\n";
           
          $main.="</p>\n";
           echo 
          xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,0,0,0,$mai n);
           echo 
          foot_tag();
           exit;
           }
           
          $nick=getnick_uid($who).htmlspecialchars("'",ENT_Q UOTES)."s";
           if(
          getuid_sid($sid)==$who)$nick="";
           
          addonline(getuid_sid($sid),"$nick Profil","profile.php?who=$who");
           
          $info=mysql_fetch_array(mysql_query("SELECT * FROM users a INNER JOIN profiles b ON a.id = b.uid WHERE a.id='".$who."'"));
           
          $wapsite=mysql_fetch_array(mysql_query("SELECT * FROM wapsite WHERE uid='".$who."'"));
           
          $title="<strong>".getnick_uid($who)."</strong><br />";
           
          $main="<div align=".align().">\n";

           if(
          $info[picture]!=""){
           
          $main.="<img src=\"$info[picture]\"width=\"100\" height=\"100\" alt=\".getnick_sid.\"/><br />\n";
           }
           else{
          $main.="<img src=\"./images/avataryok.jpeg\"width=\"100\" height=\"100\" alt=\"no avatar\"/><br />";}
           
          $private mysql_fetch_array(mysql_query("SELECT viewpro FROM users WHERE id='".$who."'"));
           if((
          $private[0]=='1') && (buds(getuid_sid($sid), $who)!=2) && (!ismod(getuid_sid($sid))) && (getuid_sid($sid)!=$who))
           {
           
          $main.="".rating($who)."<br />\n";
           
          $unick getnick_uid($who);
           
          $main.="$unick ' Profilinin Görünmesini Ã„°stemiyor<br />\n";
           }
           else {
           
          $main.="".status($who,1)."<br />\n";
           
          $main.="".rating($who)."<br />\n";
           
          $main.="<strong>Kimlik:</strong> $who<br />\n";
           if(
          $info[sex]=='M'){$sex="Erkek";}
           else if(
          $info[sex]=='F'){$sex="Bayan";}
           else{
          $sex="Cinsiyet BelirtilmemiÅŸ!";}
           
          $exp_bday=explode("-",$info[birthday]);
           
          $month=$exp_bday[1];
           
          $day=$exp_bday[2];
           
          $main.="<strong>Burç:</strong> ".starsign($day,$month)."<br/>\n";
           
          $main.="<strong>YaÅŸ/Cinsiyet/Ãœlke:</strong> ".flag($info[ipaddress]).getage($info[birthday])."/$sex/".getbbcode($info[location],$sid,1)."<br />\n";
           
          $main.="<strong>Kayıt Tarihi:</strong> ".date("d m Y",$info[regdate])."<br />(".time_msg((time()-$info[regdate]),0).")<br />
           <strong>T.aktif:</strong> "
          .time_msg($info[time],0)."<br />
           <strong>Rep Puanı:</strong> 
          $info[points]<br />\n";
           
          $main.="<strong>Hakkında:</strong> ".getbbcode($info[moreinfo],$sid,1)."<br />
           <strong>Son Aktivite:</strong> "
          .time_msg(time()-$info[lastact],0)."<br />
           <strong>Tarayıcı:</strong> 
          $info[browser]<br />\n";
           if(
          user_info(getuid_sid($sid))){
           
          $main.="<strong>Ä°p Adres:</strong><br />\n";
           
          $main.="<small>(".network($info[ipaddress],"isp")." <br />".network($info[ipaddress],"country").")</small><br />\n";
           }
           if(
          user_info(getuid_sid($sid))){
           
          $main.="<a href=\"./profile.php?usersbyip=1&amp;who=$who&amp;sid=$sid\ ">[$info[ipaddress]]</a><br />\n";
           }
           if(buds(getuid_sid(
          $sid),$who)==0){
           
          $main.="<a href=\"./buds/add.php?who=$who&amp;sid=$sid\">ArkadaÅŸ Ol</a><br />\n";
           }else if(
          buds(getuid_sid($sid),$who)==1){
           
          $main.="(<i>AkadaÅŸlık Ã„°steÄŸin Ã„°letildi</i>)<br />\n";
           }else if(
          buds(getuid_sid($sid),$who)==2){
           
          $main.="<a href=\"./buds/add.php?delete=1&amp;who=$who&amp;sid=$sid\">Arkad aÅŸlıktan Ãƒâ€¡Ã„±kar</a><br />\n";
           }
           if(
          buds(getuid_sid($sid),$who)==2){
           
          $main.="<a $key1 href=\"./popups.php?who=$who&amp;sid=$sid$chatlink\">Hızl� Ã¯Â¿Â½ Mesaj Gönder</a><br />\n";
           }
           
          $main.="<a $key2 href=\"./inbox/send.php?who=$who&amp;sid=$sid$chatlink\">Mesaj Gönder</a><br />\n";
           if(
          ignored(getuid_sid($sid),$who,1)==1){
           
          $main.="<a href=\"./block.php?add=1&amp;who=$who&amp;sid=$sid\">Egelle </a><br />\n";
           }else if(
          ignored(getuid_sid($sid),$who,1)==2){
           
          $main.="<a href=\"./block.php?del=1&amp;who=$who&amp;sid=$sid\">Engeli Kaldır</a><br />\n";
           }
           if(
          $wapsite["mainpage"]!=""){
           
          $main.="<a href=\"./wapsites/wapsite.php?who=$who&amp;sid=$sid\">GeliÅŸmiÅŸ Profil</a><br />\n";
           }
           }
           if(
          isowner(getuid_sid($sid))){
           
          $main.="<a href=\"./admin/moderate.php?who=$who&amp;sid=$sid\"><strong>[Ãœye Yönetim]</a></strong><br />\n";
           }else if(
          isheadadmin(getuid_sid($sid))){
           
          $main.="<a href=\"./admin/moderate.php?who=$who&amp;sid=$sid\"><strong>[Ãœye Yönetim]</a></strong><br />\n";
           }else if((
          ismod(getuid_sid($sid)))||(isadmin(getuid_sid$sid)))){
           
          $main.="<a href=\"./admin/moderate.php?who=$who&amp;sid=$sid\"><strong>[Ãœye Yönetim]</a></strong><br />\n";
           }else if(
          use_tools(getuid_sid($sid))){
           
          $main.="<a href=\"./admin/moderate.php?who=$who&amp;sid=$sid\"><strong>[Ãœye Yönetim]</a></strong><br />\n";
           }
           if(
          $rid!=""){$main.="<a $key5 href=\"./chat/chat.php?sid=$sid$chatlink\">Geri $rname</a><br />\n";}
           
          $main.="<img src=\"./images/banner_2.gif\" alt=\"-------\"/><br />\n
           [<a 
          $key6 href=\"./inbox/inbox.php?sid=$sid\">mesajlar</a>]\n
           [<a 
          $key7 href=\"./buds/buds.php?sid=$sid\">ArkadaÅŸ List</a>]<br />\n
           [<a 
          $key8 href=\"./chat/public.php?sid=$sid\">Chat</a>]\n
           [<a 
          $key9 href=\"./forums/forums.php?sid=$sid\">Forum</a>]<br />\n
           [<a 
          $key0 href=\"./main.php?sid=$sid\"><img src=\"./images/home.gif\" alt=\"\"/>Aana Sayfa</a>]<br />\n
           <img src=\"./images/banner_2.gif\" alt=\"-------\"/>\n"
          ;
           
          $main.="</div>\n";
           echo 
          xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,0,0,0,$mai n);
           echo 
          foot_tag();
           exit();
           
          ?>
          Last edited by arnage; 26.05.12, 15:05.

          Comment


            #6
            Originally posted by DeViLzHeLpEr View Post
            hello lads , fullcircle im away tonight so wil get it in morning, what do i add in the database buddy
            add a new row in users
            `viewpro` int(1) NOT NULL DEFAULT '0',

            Comment


              #7
              thnx to inform but devil as you are making on new site so search before opening thread.. you can find this code posted many times before!! many mods are already available.. i saw your theme post (that is available) , saw this (this also available..) .. so please use search button or get all this stuff from my script!!

              enjoy your stay

              Comment


                #8
                icedroplet r u ****in silly?!!!! everythin ure on about is for lava!!! im in need of the v2 coding !!!! do u not understand lava and v2 are two completely different scripts!
                next time get ya facts straight !

                Comment


                  #9
                  lol are codes special in that??? does script name matters with codes?? wont my code will work in that script n try to mind your language man..
                  if my codes will not work or any other code will not work then tell.. lol its php platform :D

                  Comment


                    #10
                    Originally posted by DeViLzHeLpEr View Post
                    icedroplet r u ****in silly?!!!! everythin ure on about is for lava!!! im in need of the v2 coding !!!! do u not understand lava and v2 are two completely different scripts!
                    next time get ya facts straight !

                    actually they aren't two completely different scripts, without lava there would be no v2, and as the guy was only trying to help you maybe saying thanks and pointing out his mistake rather than abusing him would've been better

                    Comment


                      #11
                      ppl who are asking for help , such expert who doesnt even know what are they using .. rofl

                      anyways thnx woody to clarify it a bit more

                      Comment


                        #12
                        if you cant add the feature when its given to you and be able to tell whats wrong with it then dont ask and waste the time of the coders giving you what you should make yourself

                        Comment

                        Working...
                        X