Lavalair Mods...

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #61
    i already done it ..but it
    shows in page "Unknown column 'mdy' in 'field list'"

    $sql = "SELECT id, who, partner, mdy FROM ibwf_chapel WHERE ismd='1' ORDER BY mdy DESC LIMIT $limit_start, $items_per_page";


    what is mdy??

    if i delete mdy in the code appears:
    Unknown column 'ismd' in 'where clause'

    i think another thing not right for my chapel tables is
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chapel WHERE ismd='1'"));
    Last edited by honkytonkman; 13.09.09, 16:12.
    sigpicthe italian/international COMMUNITY of friendship
    http://people2000.netne.net
    WAP/WEB
    peoplemailbox@katamail.com

    Comment


      #62
      ismd is except (i guess) and , mdy just delete that

      Comment


        #63
        more easy to change ibwf_chapel in couple in the code by something else..
        deleted mdy but not works the same..always shows
        Unknown column 'ismd' in 'where clause'..
        code
        $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chapel WHERE ismd='1'"));

        changed in
        $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM couple WHERE ismd='1'"));
        not works..
        sigpicthe italian/international COMMUNITY of friendship
        http://people2000.netne.net
        WAP/WEB
        peoplemailbox@katamail.com

        Comment


          #64
          okay..let's done by myself..
          this is the something else code working RIGHT for who uses
          couple sql tables instead ibwf-chapel ..
          i put it also the losing head..

          Code:
          [COLOR=#000000][COLOR=#007700]else if([/COLOR][COLOR=#0000bb]$action[/COLOR][COLOR=#007700]==[/COLOR][COLOR=#dd0000]"marry"[/COLOR][COLOR=#007700])
          {
              [/COLOR][COLOR=#0000bb]addonline[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000bb]getuid_sid[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000bb]$sid[/COLOR][COLOR=#007700]),[/COLOR][COLOR=#dd0000]"Wappied List"[/COLOR][COLOR=#007700],[/COLOR][COLOR=#dd0000]""[/COLOR][COLOR=#007700]);
          
          echo "<head>";
                echo "<title>MARRIED LIST</title>";
                  echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
          
          
                echo "</head>";
                //echo "<body>";
          
             [/COLOR][COLOR=#ff8000]//////ALL LISTS SCRIPT <<
          
              [/COLOR][COLOR=#0000bb]$noi [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000bb]mysql_fetch_array[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000bb]mysql_query[/COLOR][COLOR=#007700]([/COLOR][COLOR=#dd0000]"SELECT COUNT(*) FROM couple WHERE accept='1'"[/COLOR][COLOR=#007700]));
              if([/COLOR][COLOR=#0000bb]$page[/COLOR][COLOR=#007700]==[/COLOR][COLOR=#dd0000]"" [/COLOR][COLOR=#007700]|| [/COLOR][COLOR=#0000bb]$page[/COLOR][COLOR=#007700]<=[/COLOR][COLOR=#0000bb]0[/COLOR][COLOR=#007700])[/COLOR][COLOR=#0000bb]$page[/COLOR][COLOR=#007700]=[/COLOR][COLOR=#0000bb]1[/COLOR][COLOR=#007700];
              [/COLOR][COLOR=#0000bb]$num_items [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000bb]$noi[/COLOR][COLOR=#007700][[/COLOR][COLOR=#0000bb]0[/COLOR][COLOR=#007700]]; [/COLOR][COLOR=#ff8000]//changable
              [/COLOR][COLOR=#0000bb]$items_per_page[/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000bb]10[/COLOR][COLOR=#007700];
              [/COLOR][COLOR=#0000bb]$num_pages [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000bb]ceil[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000bb]$num_items[/COLOR][COLOR=#007700]/[/COLOR][COLOR=#0000bb]$items_per_page[/COLOR][COLOR=#007700]);
              if(([/COLOR][COLOR=#0000bb]$page[/COLOR][COLOR=#007700]>[/COLOR][COLOR=#0000bb]$num_pages[/COLOR][COLOR=#007700])&&[/COLOR][COLOR=#0000bb]$page[/COLOR][COLOR=#007700]!=[/COLOR][COLOR=#0000bb]1[/COLOR][COLOR=#007700])[/COLOR][COLOR=#0000bb]$page[/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000bb]$num_pages[/COLOR][COLOR=#007700];
              [/COLOR][COLOR=#0000bb]$limit_start [/COLOR][COLOR=#007700]= ([/COLOR][COLOR=#0000bb]$page[/COLOR][COLOR=#007700]-[/COLOR][COLOR=#0000bb]1[/COLOR][COLOR=#007700])*[/COLOR][COLOR=#0000bb]$items_per_page[/COLOR][COLOR=#007700];
          
              [/COLOR][COLOR=#ff8000]//changable sql
          
                  [/COLOR][COLOR=#0000bb]$sql [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#dd0000]"SELECT id, who, partner, FROM couple WHERE accept='1' ORDER BY accept DESC LIMIT $limit_start, $items_per_page"[/COLOR][COLOR=#007700];
          
          
              echo [/COLOR][COLOR=#dd0000]"<p>"[/COLOR][COLOR=#007700];
              [/COLOR][COLOR=#0000bb]$items [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000bb]mysql_query[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000bb]$sql[/COLOR][COLOR=#007700]);
              echo [/COLOR][COLOR=#0000bb]mysql_error[/COLOR][COLOR=#007700]();
              if([/COLOR][COLOR=#0000bb]mysql_num_rows[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000bb]$items[/COLOR][COLOR=#007700])>[/COLOR][COLOR=#0000bb]0[/COLOR][COLOR=#007700])
              {
              while ([/COLOR][COLOR=#0000bb]$item [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000bb]mysql_fetch_array[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000bb]$items[/COLOR][COLOR=#007700]))
              {
          [/COLOR][COLOR=#0000bb]$unick [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000bb]getnick_uid[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000bb]$item[/COLOR][COLOR=#007700][[/COLOR][COLOR=#0000bb]2[/COLOR][COLOR=#007700]]);
          [/COLOR][COLOR=#0000bb]$wnick [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000bb]getnick_uid[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000bb]$item[/COLOR][COLOR=#007700][[/COLOR][COLOR=#0000bb]1[/COLOR][COLOR=#007700]]);
          [/COLOR][COLOR=#0000bb]$lnk [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#dd0000]"<a href=\"index.php?action=viewuser&amp;who=$item[2]\">$unick </a><b>is Wappied To </b><a href=\"index.php?action=viewuser&amp;who=$item[1]\">$wnick </a><br/>"[/COLOR][COLOR=#007700];
                echo [/COLOR][COLOR=#dd0000]"$lnk<br/>"[/COLOR][COLOR=#007700];
              }
              }
              echo [/COLOR][COLOR=#dd0000]"</p>"[/COLOR][COLOR=#007700];
              echo [/COLOR][COLOR=#dd0000]"<p align=\"center\">"[/COLOR][COLOR=#007700];
              if([/COLOR][COLOR=#0000bb]$page[/COLOR][COLOR=#007700]>[/COLOR][COLOR=#0000bb]1[/COLOR][COLOR=#007700])
              {
                [/COLOR][COLOR=#0000bb]$ppage [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000bb]$page[/COLOR][COLOR=#007700]-[/COLOR][COLOR=#0000bb]1[/COLOR][COLOR=#007700];
                echo [/COLOR][COLOR=#dd0000]"<a href=\"lists.php?action=marry&amp;page=$ppage\">«PREV</a> "[/COLOR][COLOR=#007700];
              }
              if([/COLOR][COLOR=#0000bb]$page[/COLOR][COLOR=#007700]<[/COLOR][COLOR=#0000bb]$num_pages[/COLOR][COLOR=#007700])
              {
                [/COLOR][COLOR=#0000bb]$npage [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000bb]$page[/COLOR][COLOR=#007700]+[/COLOR][COLOR=#0000bb]1[/COLOR][COLOR=#007700];
                echo [/COLOR][COLOR=#dd0000]"<a href=\"lists.php?action=marry&amp;page=$npage\">Next»</a>"[/COLOR][COLOR=#007700];
              }
              echo [/COLOR][COLOR=#dd0000]"<br/>$page/$num_pages<br/>"[/COLOR][COLOR=#007700];
              echo [/COLOR][COLOR=#dd0000]"</p>"[/COLOR][COLOR=#007700];
              if([/COLOR][COLOR=#0000bb]$num_pages[/COLOR][COLOR=#007700]>[/COLOR][COLOR=#0000bb]2[/COLOR][COLOR=#007700])
              {
                  [/COLOR][COLOR=#0000bb]$rets [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#dd0000]"<form action=\"lists.php\" method=\"get\">"[/COLOR][COLOR=#007700];
                  [/COLOR][COLOR=#0000bb]$rets [/COLOR][COLOR=#007700].= [/COLOR][COLOR=#dd0000]"<input name=\"page\" style=\"-wap-input-format: '*N'\" size=\"2\"/>"[/COLOR][COLOR=#007700];
                  [/COLOR][COLOR=#0000bb]$rets [/COLOR][COLOR=#007700].= [/COLOR][COLOR=#dd0000]"<input type=\"hidden\" name=\"action\" value=\"$action\"/>"[/COLOR][COLOR=#007700];
                  [/COLOR][COLOR=#0000bb]$rets [/COLOR][COLOR=#007700].= [/COLOR][COLOR=#dd0000]"<input type=\"submit\" value=\"Go To Page\"/>"[/COLOR][COLOR=#007700];
                  [/COLOR][COLOR=#0000bb]$rets [/COLOR][COLOR=#007700].= [/COLOR][COLOR=#dd0000]"</form>"[/COLOR][COLOR=#007700];
                  echo [/COLOR][COLOR=#0000bb]$rets[/COLOR][COLOR=#007700];
              }
          
            [/COLOR][COLOR=#ff8000]////// UNTILL HERE >>
              [/COLOR][COLOR=#007700]echo [/COLOR][COLOR=#dd0000]"<p align=\"center\">"[/COLOR][COLOR=#007700];
              echo [/COLOR][COLOR=#dd0000]"<a href=\"chapel.php?action=main\">"[/COLOR][COLOR=#007700];
          echo [/COLOR][COLOR=#dd0000]"Chapel</a><br/><br/>"[/COLOR][COLOR=#007700];
              echo [/COLOR][COLOR=#dd0000]"<a href=\"index.php?action=stats\"><img src=\"http://coding-talk.com/images/stat.gif\" alt=\"*\"/>"[/COLOR][COLOR=#007700];
          echo [/COLOR][COLOR=#dd0000]"Site Stats</a><br/>"[/COLOR][COLOR=#007700];
          }  [/COLOR][/COLOR]
          Last edited by honkytonkman; 14.09.09, 11:16.
          sigpicthe italian/international COMMUNITY of friendship
          http://people2000.netne.net
          WAP/WEB
          peoplemailbox@katamail.com

          Comment


            #65
            Originally posted by honkytonkman View Post
            okay..let's done by myself..
            this is the something else code working RIGHT for who uses
            couple sql tables instead ibwf-chapel ..
            i put it also the losing head..

            Code:
            [COLOR=#000000][COLOR=#007700]else if([/COLOR][COLOR=#0000bb]$action[/COLOR][COLOR=#007700]==[/COLOR][COLOR=#dd0000]"marry"[/COLOR][COLOR=#007700])
            {
                [/COLOR][COLOR=#0000bb]addonline[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000bb]getuid_sid[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000bb]$sid[/COLOR][COLOR=#007700]),[/COLOR][COLOR=#dd0000]"Wappied List"[/COLOR][COLOR=#007700],[/COLOR][COLOR=#dd0000]""[/COLOR][COLOR=#007700]);
            
            echo "<head>";
                  echo "<title>MARRIED LIST</title>";
                    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
            
            
                  echo "</head>";
                  //echo "<body>";
            
               [/COLOR][COLOR=#ff8000]//////ALL LISTS SCRIPT <<
            
                [/COLOR][COLOR=#0000bb]$noi [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000bb]mysql_fetch_array[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000bb]mysql_query[/COLOR][COLOR=#007700]([/COLOR][COLOR=#dd0000]"SELECT COUNT(*) FROM couple WHERE accept='1'"[/COLOR][COLOR=#007700]));
                if([/COLOR][COLOR=#0000bb]$page[/COLOR][COLOR=#007700]==[/COLOR][COLOR=#dd0000]"" [/COLOR][COLOR=#007700]|| [/COLOR][COLOR=#0000bb]$page[/COLOR][COLOR=#007700]<=[/COLOR][COLOR=#0000bb]0[/COLOR][COLOR=#007700])[/COLOR][COLOR=#0000bb]$page[/COLOR][COLOR=#007700]=[/COLOR][COLOR=#0000bb]1[/COLOR][COLOR=#007700];
                [/COLOR][COLOR=#0000bb]$num_items [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000bb]$noi[/COLOR][COLOR=#007700][[/COLOR][COLOR=#0000bb]0[/COLOR][COLOR=#007700]]; [/COLOR][COLOR=#ff8000]//changable
                [/COLOR][COLOR=#0000bb]$items_per_page[/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000bb]10[/COLOR][COLOR=#007700];
                [/COLOR][COLOR=#0000bb]$num_pages [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000bb]ceil[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000bb]$num_items[/COLOR][COLOR=#007700]/[/COLOR][COLOR=#0000bb]$items_per_page[/COLOR][COLOR=#007700]);
                if(([/COLOR][COLOR=#0000bb]$page[/COLOR][COLOR=#007700]>[/COLOR][COLOR=#0000bb]$num_pages[/COLOR][COLOR=#007700])&&[/COLOR][COLOR=#0000bb]$page[/COLOR][COLOR=#007700]!=[/COLOR][COLOR=#0000bb]1[/COLOR][COLOR=#007700])[/COLOR][COLOR=#0000bb]$page[/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000bb]$num_pages[/COLOR][COLOR=#007700];
                [/COLOR][COLOR=#0000bb]$limit_start [/COLOR][COLOR=#007700]= ([/COLOR][COLOR=#0000bb]$page[/COLOR][COLOR=#007700]-[/COLOR][COLOR=#0000bb]1[/COLOR][COLOR=#007700])*[/COLOR][COLOR=#0000bb]$items_per_page[/COLOR][COLOR=#007700];
            
                [/COLOR][COLOR=#ff8000]//changable sql
            
                    [/COLOR][COLOR=#0000bb]$sql [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#dd0000]"SELECT id, who, partner, FROM couple WHERE accept='1' ORDER BY accept DESC LIMIT $limit_start, $items_per_page"[/COLOR][COLOR=#007700];
            
            
                echo [/COLOR][COLOR=#dd0000]"<p>"[/COLOR][COLOR=#007700];
                [/COLOR][COLOR=#0000bb]$items [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000bb]mysql_query[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000bb]$sql[/COLOR][COLOR=#007700]);
                echo [/COLOR][COLOR=#0000bb]mysql_error[/COLOR][COLOR=#007700]();
                if([/COLOR][COLOR=#0000bb]mysql_num_rows[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000bb]$items[/COLOR][COLOR=#007700])>[/COLOR][COLOR=#0000bb]0[/COLOR][COLOR=#007700])
                {
                while ([/COLOR][COLOR=#0000bb]$item [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000bb]mysql_fetch_array[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000bb]$items[/COLOR][COLOR=#007700]))
                {
            [/COLOR][COLOR=#0000bb]$unick [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000bb]getnick_uid[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000bb]$item[/COLOR][COLOR=#007700][[/COLOR][COLOR=#0000bb]2[/COLOR][COLOR=#007700]]);
            [/COLOR][COLOR=#0000bb]$wnick [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000bb]getnick_uid[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000bb]$item[/COLOR][COLOR=#007700][[/COLOR][COLOR=#0000bb]1[/COLOR][COLOR=#007700]]);
            [/COLOR][COLOR=#0000bb]$lnk [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#dd0000]"<a href=\"index.php?action=viewuser&amp;who=$item[2]\">$unick </a><b>is Wappied To </b><a href=\"index.php?action=viewuser&amp;who=$item[1]\">$wnick </a><br/>"[/COLOR][COLOR=#007700];
                  echo [/COLOR][COLOR=#dd0000]"$lnk<br/>"[/COLOR][COLOR=#007700];
                }
                }
                echo [/COLOR][COLOR=#dd0000]"</p>"[/COLOR][COLOR=#007700];
                echo [/COLOR][COLOR=#dd0000]"<p align=\"center\">"[/COLOR][COLOR=#007700];
                if([/COLOR][COLOR=#0000bb]$page[/COLOR][COLOR=#007700]>[/COLOR][COLOR=#0000bb]1[/COLOR][COLOR=#007700])
                {
                  [/COLOR][COLOR=#0000bb]$ppage [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000bb]$page[/COLOR][COLOR=#007700]-[/COLOR][COLOR=#0000bb]1[/COLOR][COLOR=#007700];
                  echo [/COLOR][COLOR=#dd0000]"<a href=\"lists.php?action=marry&amp;page=$ppage\">«PREV</a> "[/COLOR][COLOR=#007700];
                }
                if([/COLOR][COLOR=#0000bb]$page[/COLOR][COLOR=#007700]<[/COLOR][COLOR=#0000bb]$num_pages[/COLOR][COLOR=#007700])
                {
                  [/COLOR][COLOR=#0000bb]$npage [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000bb]$page[/COLOR][COLOR=#007700]+[/COLOR][COLOR=#0000bb]1[/COLOR][COLOR=#007700];
                  echo [/COLOR][COLOR=#dd0000]"<a href=\"lists.php?action=marry&amp;page=$npage\">Next»</a>"[/COLOR][COLOR=#007700];
                }
                echo [/COLOR][COLOR=#dd0000]"<br/>$page/$num_pages<br/>"[/COLOR][COLOR=#007700];
                echo [/COLOR][COLOR=#dd0000]"</p>"[/COLOR][COLOR=#007700];
                if([/COLOR][COLOR=#0000bb]$num_pages[/COLOR][COLOR=#007700]>[/COLOR][COLOR=#0000bb]2[/COLOR][COLOR=#007700])
                {
                    [/COLOR][COLOR=#0000bb]$rets [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#dd0000]"<form action=\"lists.php\" method=\"get\">"[/COLOR][COLOR=#007700];
                    [/COLOR][COLOR=#0000bb]$rets [/COLOR][COLOR=#007700].= [/COLOR][COLOR=#dd0000]"<input name=\"page\" style=\"-wap-input-format: '*N'\" size=\"2\"/>"[/COLOR][COLOR=#007700];
                    [/COLOR][COLOR=#0000bb]$rets [/COLOR][COLOR=#007700].= [/COLOR][COLOR=#dd0000]"<input type=\"hidden\" name=\"action\" value=\"$action\"/>"[/COLOR][COLOR=#007700];
                    [/COLOR][COLOR=#0000bb]$rets [/COLOR][COLOR=#007700].= [/COLOR][COLOR=#dd0000]"<input type=\"submit\" value=\"Go To Page\"/>"[/COLOR][COLOR=#007700];
                    [/COLOR][COLOR=#0000bb]$rets [/COLOR][COLOR=#007700].= [/COLOR][COLOR=#dd0000]"</form>"[/COLOR][COLOR=#007700];
                    echo [/COLOR][COLOR=#0000bb]$rets[/COLOR][COLOR=#007700];
                }
            
              [/COLOR][COLOR=#ff8000]////// UNTILL HERE >>
                [/COLOR][COLOR=#007700]echo [/COLOR][COLOR=#dd0000]"<p align=\"center\">"[/COLOR][COLOR=#007700];
                echo [/COLOR][COLOR=#dd0000]"<a href=\"chapel.php?action=main\">"[/COLOR][COLOR=#007700];
            echo [/COLOR][COLOR=#dd0000]"Chapel</a><br/><br/>"[/COLOR][COLOR=#007700];
                echo [/COLOR][COLOR=#dd0000]"<a href=\"index.php?action=stats\"><img src=\"http://coding-talk.com/images/stat.gif\" alt=\"*\"/>"[/COLOR][COLOR=#007700];
            echo [/COLOR][COLOR=#dd0000]"Site Stats</a><br/>"[/COLOR][COLOR=#007700];
            }  [/COLOR][/COLOR]
            i get this error
            Code:
            You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM couple WHERE accept='1' ORDER BY accept DESC LIMIT 0, 10' at line 1
            Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/revivewa/public_html/lists.php on line 1714

            Comment


              #66
              ok, in your profile settings, you have a slot to put an url to your profile picture...

              i kinda realised this is an open invite for hackers to link to a picture hosted on their own server and refer to the access logs to get a direct link to someone elses login, or session id with complete url to their profile as viewed with someone elses details...

              so i set about to code this:

              ////////////////////////pictures
              function get_size($path)
              {
              $count=0;
              if(!is_dir($path)) return filesize($path);
              if ($handle = opendir($path)) {
              $size = 0;
              while (false !== ($file = readdir($handle))) {
              if($file!='.' && $file!='..' && $file!='index.php') {$count++;
              $size = get_size($path.'/'.$file);
              $sizekb = round(($size /1024),2);
              $sizemb = ($size / 1024)/1024;
              $sizemb = round($sizemb,2);
              $sizegb = (($size / 1024)/1024)/1024;
              $sizegb = round($sizegb,2);
              $userpic2=explode(".", $file);

              echo "<option value=\"$file\">$file - $sizekb KB</a>";
              }

              }
              closedir($handle);
              return $size;

              }
              }
              __________________________________________________ __________________
              One problem, this lists all the pictures in the selected folder, (ie: male or female depending on sex)...

              I'm having problems trying to get the next bit put together, but you'll see what i was trying to achieve... I hope

              and here's the code to use the function...

              else if($action=="picture")
              {
              echo "<head>
              <title>Profile Pics</title>
              <link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">
              </head>
              <body>
              <p>
              <p align=\"center\">";
              echo "Pick your desired picture from the gallery below:<br/>";
              echo "<form action=\"index.php?action=updtpropic&amp;sid=$sid\ " method=\"post\">";

              echo "<p><select name=\"pic\">";


              $sexy=mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE id='".$uid."'"));
              if($sexy[0]=='M')
              {
              get_size('../male');
              }

              if($sexy[0]=='F')
              {
              get_size('../female');
              }

              echo "</select>";


              echo "<input type=\"Submit\" name=\"submit\" Value=\"Save\"></form>";

              echo "</p></body>";

              }

              ok, here's what i planned, but never got to work... i wanna set it up so it only shows a users pics, not all the images in the folder...

              ////////////////////////pictures
              function get_size($path)
              {
              $count=0;
              if(!is_dir($path)) return filesize($path);
              if ($handle = opendir($path)) {
              $size = 0;
              while (false !== ($file = readdir($handle))) {
              if($file!='.' && $file!='..' && $file!='index.php') {$count++;
              $size = get_size($path.'/'.$file); // Do not use $size +=...
              $sizekb = round(($size /1024),2);
              $sizemb = ($size / 1024)/1024;
              $sizemb = round($sizemb,2);
              $sizegb = (($size / 1024)/1024)/1024;
              $sizegb = round($sizegb,2);
              $userpic2=explode(".", $file);
              //$userpic = $userpic2[0];
              $nick = mysql_fetch_array(mysql_query("SELECT name FROM ibwf_users WHERE id='".$uid."'"));
              $desired1 = "".$nick[0]."(1)";
              $desired2 = "$nick[0](2)";
              $desired3 = "$nick[0](3)";
              $desired4 = "$nick[0](4)";
              $desired5 = "$nick[0](5)";


              // if(("$userpic2[0]"=="".$nick."(1)")||("$userpic2[0]"=="".$nick."(2)"))
              //if (($userpic==$nick))

              if($userpic2[0]==$desired1)
              {
              echo "<option value=\"$file\">$file - $sizekb KB</a>";
              }
              else
              {}
              }

              }
              closedir($handle);
              return $size;

              }
              }




              ////////////////////////pictures
              function get_size($path)
              {
              $count=0;
              if(!is_dir($path)) return filesize($path);
              if ($handle = opendir($path)) {
              $size = 0;
              while (false !== ($file = readdir($handle))) {
              if($file!='.' && $file!='..' && $file!='index.php') {$count++;
              $size = get_size($path.'/'.$file); // Do not use $size +=...
              $sizekb = round(($size /1024),2);
              $sizemb = ($size / 1024)/1024;
              $sizemb = round($sizemb,2);
              $sizegb = (($size / 1024)/1024)/1024;
              $sizegb = round($sizegb,2);
              $userpic2=explode(".", $file);
              //$userpic = $userpic2[0];
              $nick = mysql_fetch_array(mysql_query("SELECT name FROM ibwf_users WHERE id='".$uid."'"));
              $desired1 = "".$nick[0]."(1)";
              $desired2 = "$nick[0](2)";
              $desired3 = "$nick[0](3)";
              $desired4 = "$nick[0](4)";
              $desired5 = "$nick[0](5)";


              // if(("$userpic2[0]"=="".$nick."(1)")||("$userpic2[0]"=="".$nick."(2)"))
              //if (($userpic==$nick))

              if($userpic2[0]==$desired1)
              {
              echo "<option value=\"$file\">$file - $sizekb KB</a>";
              }
              else
              {}
              }

              }
              closedir($handle);
              return $size;

              }
              }
              ___________________________
              And I know it's a mess, I was getting desparate towards the end... lol

              and to set in db...

              ////////////////////////////propicset//////////////////////////////////
              else if($action=="setavatar")
              {
              $pic = $_POST["gallerypic"];
              $uid = getuid_sid($sid);
              $exist = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE id='".$uid."'"));
              if ($exist[0]>0)
              {
              $sexy=mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE id='".$uid."'"));
              if($sexy[0]=='M')
              {
              $res = mysql_query("UPDATE ibwf_users SET avatar='../male/".$pic."' WHERE id='".$uid."'");
              }
              if($sexy[0]=='F')
              {
              $res = mysql_query("UPDATE ibwf_users SET avatar='../female/".$pic."' WHERE id='".$uid."'");
              }
              }else{
              $sexy=mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE id='".$uid."'"));
              if($sexy[0]=='M')
              {
              $res = mysql_query("UPDATE ibwf_users SET avatar='../male/".$pic."' WHERE id='".$uid."'");
              }
              if($sexy[0]=='F')
              {
              $res = mysql_query("UPDATE ibwf_users SET avatar='../female/".$pic."' WHERE id='".$uid."'");
              }
              }
              echo "<meta http-equiv=Refresh content=0;url=main.php?action=main&amp;sid=$sid>";
              }

              one last query, anyone know what i'm doing wrong here? cause it never seems to load the nick...

              $userpic2=explode(".", $file);
              //$userpic = $userpic2[0];
              $nick = mysql_fetch_array(mysql_query("SELECT name FROM ibwf_users WHERE id='".$uid."'"));
              $desired1 = "".$nick[0]."(1)";
              $desired2 = "$nick[0](2)";
              $desired3 = "$nick[0](3)";
              $desired4 = "$nick[0](4)";
              $desired5 = "$nick[0](5)";


              // if(("$userpic2[0]"=="".$nick."(1)")||("$userpic2[0]"=="".$nick."(2)"))
              //if (($userpic==$nick))

              if($userpic2[0]==$desired1)
              __________________________
              sorry if my code is really messed up. this was my final try after six hours... i can't make it query the nick right...
              Last edited by riderz; 15.11.09, 15:41.
              C3 Themes: http://c3themes.wen.ru/index.html
              Find Files: http://mystarter.tk/?goto=X-search

              Comment


                #67
                ok, basically, i've got the ../male and ../female gallery folders. the script above basically lists the folder contents in a drop down menu so you can select an image...

                echo "<p><select name=\"pic\">";


                $sexy=mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE id='".$uid."'"));
                if($sexy[0]=='M')
                {
                get_size('../male');
                }

                if($sexy[0]=='F')
                {
                get_size('../female');
                }

                echo "</select>";

                on that kinda thing, but i can't make the function load the user nick to get it to only show
                $nick[0](1-5).$ext kinda thing... that's where i'm stuck... trying to make it work without adding all the uploaded pics in the database...

                if you wanna see a demo, Welcome To USTDOZ check in the site extras... (P.S. This link isn't meant as spam)
                Last edited by pmbguy; 17.11.09, 07:50.
                C3 Themes: http://c3themes.wen.ru/index.html
                Find Files: http://mystarter.tk/?goto=X-search

                Comment


                  #68
                  Shout Room
                  For WML Lavalair....
                  PHP Code:
                  /*/*/put at core.php

                  function getshoutroom($sid)
                  {
                    
                  $shbox "<b>ShoutRoom</b><br/>";
                    
                  $lshout mysql_fetch_array(mysql_query("SELECT shout, shouter, id  FROM ibwf_shouts ORDER BY shtime DESC LIMIT 1"));

                    
                  $shnick getnick_uid($lshout[1]);
                    
                  $shbox .= "<a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$lshout[1]\">".$shnick."</a><br/>";
                    
                  $shbox .= parsepm($lshout[0], $sid);
                    
                  $shbox .= "<br/>";
                    return 
                  $shbox;

                  }

                  /*/*/*/Put at lists.php 

                  else if($action=="shouts")
                  {
                      
                  addonline(getuid_sid($sid),"Shout Room","");

                        echo 
                  "<card id=\"main\" title=\"eJaTd29.Co.Cc\" ontimer=\"lists.php?time=";
                   echo 
                  date('dmHis');
                   echo 
                  "&amp;action=shouts&amp;sid=$sid";
                   echo 
                  "\">";
                   echo 
                  "<timer value=\"500\"/>";
                      echo 
                  "<onevent type=\"onenterforward\">";
                      echo 
                  "<refresh>";
                      echo 
                  "<setvar name=\"shtxt\" value=\"\"/>";
                    echo 
                  "</refresh>";
                    echo 
                  "</onevent>";

                      
                  //////ALL LISTS SCRIPT <<<<<
                      
                  if($page=="" || $page<=0)$page=1;

                      if(
                  $who=="")
                      {
                      
                  $noi mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_shouts"));
                      }else{
                      
                  $noi mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_shouts WHERE shouter='".$who."'"));
                      }

                      
                  $num_items $noi[0]; //changable
                      
                  $items_per_page12;
                      
                  $num_pages ceil($num_items/$items_per_page);
                      if((
                  $page>$num_pages)&&$page!=1)$page$num_pages;
                      
                  $limit_start = ($page-1)*$items_per_page;
                      
                  //changable sql

                      
                  if($who =="")
                      {
                          
                  $sql "SELECT id, shout, shouter, shtime  FROM ibwf_shouts ORDER BY shtime DESC LIMIT $limit_start$items_per_page";
                  }else{
                      
                  $sql "SELECT id, shout, shouter, shtime  FROM ibwf_shouts  WHERE shouter='".$who."' ORDER BY shtime DESC LIMIT $limit_start$items_per_page";
                  }
                      echo 
                  "<p align=\"center\">";
                      echo 
                  getshoutroom($sid);
                    echo 
                  "<input name=\"shtxt\" maxlength=\"100\"/><br/>";
                    echo 
                  "<anchor>Shout";
                    echo 
                  "<go href=\"genproc.php?action=shout&amp;sid=$sid\" method=\"post\">";
                    echo 
                  "<postfield name=\"shtxt\" value=\"$(shtxt)\"/>";
                    echo 
                  "</go>";
                    echo 
                  "</anchor>";
                      echo 
                  "</p>";
                      echo 
                  "<p>";
                    
                  $time date('dmHis');
                    echo 
                  "<a href=\"lists.php?action=shouts&amp;sid=$sid&amp;time=$time\">Reload page</a><br/><br/>";
                      
                  $items mysql_query($sql);
                      echo 
                  mysql_error();
                      if(
                  mysql_num_rows($items)>0)
                      {
                      while (
                  $item mysql_fetch_array($items))
                      {
                          
                  $shnick getnick_uid($item[2]);
                          
                  $sht parsepm($item[1], $sid);   

                    
                  $shdt date("H:i - d/m",$item[3]);

                        
                  $lnk "<a href=\"index.php?action=viewuser&amp;who=$item[2]&amp;sid=$sid\">$shnick</a> ~ $sht<br/><i>$shdt</i>";
                        if(
                  ismod(getuid_sid($sid)))
                        {
                        
                  $dlsh "<a href=\"modproc.php?action=delsh&amp;sid=$sid&amp;shid=$item[0]\">[x]</a>";
                        }else{
                          
                  $dlsh "";
                        }
                      
                          echo 
                  "$lnk $dlsh<br/>";
                      }
                      }
                      echo 
                  "</p>";
                      echo 
                  "<p align=\"center\">";
                      if(
                  $page>1)
                      {
                        
                  $ppage $page-1;
                        echo 
                  "<a href=\"lists.php?action=shouts&amp;page=$ppage&amp;sid=$sid&amp;who=$who\">«PREV</a> ";
                      }
                      if(
                  $page<$num_pages)
                      {
                        
                  $npage $page+1;
                        echo 
                  "<a href=\"lists.php?action=shouts&amp;page=$npage&amp;sid=$sid&amp;who=$who\">Next»</a>";
                      }
                      echo 
                  "<br/>Page $page of $num_pages<br/>";
                      if(
                  $num_pages>2)
                      {
                        
                  $rets "Page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
                          
                  $rets .= "<anchor>[GO]";
                          
                  $rets .= "<go href=\"lists.php\" method=\"get\">";
                          
                  $rets .= "<postfield name=\"action\" value=\"$action\"/>";
                          
                  $rets .= "<postfield name=\"who\" value=\"$who\"/>";
                          
                  $rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
                          
                  $rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
                          
                  $rets .= "</go></anchor>";

                          echo 
                  $rets;
                      }
                      echo 
                  "</p>";
                    
                  ////// UNTILL HERE >>
                      
                  echo "<p align=\"center\">";
                      echo 
                  "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
                  echo 
                  "Home</a>";
                    echo 
                  "</p>";
                      echo 
                  "</card>";
                  }

                  /*/*/Here direct link to enter sh0ut r0om.. Put at any place y0u want.. 
                  PHP Code:
                   echo "<a href=\"lists.php?action=shouts&amp;sid=$sid\">Shout Room</a><br/>"
                  Last edited by metulj; 23.01.10, 08:15.
                  sigpic
                  Visit my WEBSITE Project: http://www.aspirewap.net

                  Comment


                    #69
                    ok, i managed to code an auto installer for smilies, avatars, etc...

                    simply put the code below into a file and upload into the folder with your smilies and run it... it lists dir and with each file adds it to the database...
                    PHP Code:
                    <HTML>
                    <HEAD>
                     <TITLE>Smilies Auto Installer</TITLE>
                    </HEAD>
                    <BODY>
                    <?
                    /*
                    ok, i wrote this little script to do a directory listing and install all images as a smiley code on lavalair..
                    the smiley code comes out as the filename minus extension...  place in smilies folder and run it...
                     to make it do other stuff modify lines 43 and 71 - pmbguy
                    */

                    include("../web/config.php");
                    include("../web/core.php");
                    $bcon = connectdb();
                    if (!$bcon)
                    {
                    ///////////////////////////SEVER ERROR//////////////////////////////////////////
                    echo "<head>
                    <title>Sever Updating</title>
                    <link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/white_medium.css\">";
                    ?>
                    <head>
                    <META HTTP-EQUIV="Refresh" Content="2">
                    </head>
                    <?php
                    echo "</head>
                    <body>
                    <p align=\"center\">
                    <img src=\"../phpThumb/phpThumb.php?src=../images/exit.gif\" alt=\"!\"/><br/>
                    <span style=\"color:red\"><b><u><i>Sever Updating</i></u></b></span>
                    <br/>Please Be Paticent Thank You!<br/>
                    <img src=\"../phpThumb/phpThumb.php?src=../images/loading.gif\" alt=\"[Loading]\"/><br/>"
                    ;
                    $xfile = @file("randomloading.txt");
                    $random_num rand (0,count($xfile)-1);
                    $udata explode("::",$xfile[$random_num]);
                    echo 
                    "$udata[1]<br/>";
                    echo 
                    "</p>
                    </body>
                    </html>"
                    ;
                    exit();
                    }
                    $res mysql_query("TRUNCATE TABLE  `ibwf_smilies`"); // to modify to do avatars etc, change this line...

                      // open this directory
                    $myDirectory opendir(".");

                    // get each entry
                    while($entryName readdir($myDirectory)) {
                        
                    $dirArray[] = $entryName;
                    }

                    // close directory
                    closedir($myDirectory);

                    //    count elements in array
                    $indexCount    count($dirArray);
                    Print (
                    "$indexCount files<br>\n");

                    // sort 'em
                    sort($dirArray);

                    // print 'em
                    print("<TABLE border=1 cellpadding=5 cellspacing=0 class=whitelinks>\n");
                    print(
                    "<TR><TH>Filename</TH><th>Filetype</th><th>Filesize</th></TR>\n");
                    // loop through the array of files and print them all
                    for($index=0$index $indexCount$index++) {
                            if (
                    substr("$dirArray[$index]"01) != "."){ // don't list hidden files
                            
                    print("<TR><TD><a href=\"$dirArray[$index]\">$dirArray[$index]</a></td>");
                            
                    $userpic=explode("."$dirArray[$index]);
                      
                    $res mysql_query("INSERT INTO ibwf_smilies SET scode='-$userpic[0]-', imgsrc='../smilies/$dirArray[$index]', hidden='0'");   // to modify to do avatars etc, change this line...
                            
                    print("<td>");
                            print(
                    filetype($dirArray[$index]));
                            print(
                    "</td>");
                            print(
                    "<td>");
                            print(
                    filesize($dirArray[$index]));
                            print(
                    "</td>");
                            print(
                    "</TR>\n");
                        }
                    }
                    print(
                    "</TABLE>\n");
                    ?>
                    </BODY>
                    </HTML>
                    C3 Themes: http://c3themes.wen.ru/index.html
                    Find Files: http://mystarter.tk/?goto=X-search

                    Comment


                      #70
                      try something like this for pm to staff, i think that's what you meant right...

                      Code:
                      else if($action=="sendSTAFFcast")
                      {
                      addonline(getuid_sid($sid),"Sending PM","index.php?action=$action");
                        $pmtou = $_POST["pmtou"];
                        $byuid = getuid_sid($sid);
                      echo "<head>";
                        echo "<title>send inbox to all staff</title>";
                        $theme = getbyknox($sid);
                        echo "$theme";
                        echo "</head>";
                        echo "<body>";
                        echo "<p>";
                       $tm = time();
                        $lastpm = mysql_fetch_array(mysql_query("SELECT MAX(timesent) FROM ibwf_private WHERE byuid='".$byuid."'"));
                        echo "All Staff (except mods) has been sent this PM<br/>";
                        $pms = mysql_query("SELECT id, name FROM ibwf_users WHERE perm>'1'");
                        $tm = time();
                        while($pm=mysql_fetch_array($pms))
                        {
                        mysql_query("INSERT INTO ibwf_private SET text='[b]PM to all staff[/b][br/]".$pmtou."[br/][i]This message was sent to all the staff except mods...[/i]', byuid='".$byuid."', touid='".$pm[0]."', timesent='".$tm."'");
                        }
                      echo "<p align=\"center\">";
                      
                      echo "</p>";
                      echo "<p align=\"center\">";
                      echo "<a href=\"main.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
                      echo "Home</a>";
                      echo "</p>";
                      echo "</body>";
                      echo "</html>";
                      }
                      C3 Themes: http://c3themes.wen.ru/index.html
                      Find Files: http://mystarter.tk/?goto=X-search

                      Comment


                        #71
                        Originally posted by WhiteWarrior View Post
                        [center]Visit Counter For Each Member
                        [left]Add New Table In ibwf_users
                        Code:
                        **`visit` varchar(255) NOT NULL default '0'
                        Add To Login.php
                        Code:
                        $uid = getuid_sid($sid);
                        $addv = mysql_fetch_array(mysql_query("SELECT visit FROM ibwf_users WHERE id='".$uid."'"));
                        $addv = $addhitv[0] + 1;
                        $addvisit = mysql_query("UPDATE ibwf_users SET visit='".$addv."' WHERE id='".$uid."'");
                        Add To Index.php?action=main
                        Code:
                        $nick = getnick_sid($sid);
                        $uid = getuid_sid($sid);
                        $showv = mysql_fetch_array(mysql_query("SELECT visit FROM ibwf_users WHERE id='".$uid."'"));
                        echo "Hello $nick,
                        This Is Your $showv[0]. Visit!";
                        </div></div>
                        has any one had any problems with this just i added it to my tester site and when i log out and logs back in it only says i have visited the site 1 time
                        HELP THEM WHO HELPS YOU



                        i only work on wapdesire v_2 coding only

                        Comment


                          #72
                          one thing i've been lookin' for , that at final i done by myself..this codes will show ya
                          hour of the messages in chatrooms , exemple:
                          JOHNDOE-12,35, hi folks ..is anybody here?

                          in chat.php page put this :
                          Code:
                           $newtime = date("H:i,$seeit");
                          then find the following code and replaced with this:
                          Code:
                          $chatok = mysql_query("INSERT INTO ibwf_chat SET  chatter='".$uid."', who='".$who."', timesent='".time()."', msgtext='".$newtime." ".$message."', rid='".$rid."';");
                          $newtime will make appears hour into message.
                          sigpicthe italian/international COMMUNITY of friendship
                          http://people2000.netne.net
                          WAP/WEB
                          peoplemailbox@katamail.com

                          Comment


                            #73
                            i try to put a bbcode for showing images :
                            Code:
                            $text = preg_replace("/\[img\](.*?)\[\/img\]/i","<img src=\"http://\\1\" alt=\"\\1\" />", $text);
                            but dont't works..where is my wrong?
                            sigpicthe italian/international COMMUNITY of friendship
                            http://people2000.netne.net
                            WAP/WEB
                            peoplemailbox@katamail.com

                            Comment


                              #74
                              Originally posted by riderz
                              if im not mistaken i think there must be an $ infront of the 1 like following
                              Code:
                              $text = preg_replace("/\[img\](.*?)\[\/img\]/i","<img src=\"http://\\1\" alt=\"\\$1\" />", $text);
                              i tried but the code don't works
                              sigpicthe italian/international COMMUNITY of friendship
                              http://people2000.netne.net
                              WAP/WEB
                              peoplemailbox@katamail.com

                              Comment


                                #75
                                Originally posted by riderz
                                here are mine im using mabe u can check whats diff
                                Code:
                                $text = preg_replace("/\[img\=(.*?)\]/is","<table cellpadding=\"3px\"\"><tr><td><img src=\"phpthumb.php?image=$1\"></td></tr></td></tr></table>",$text);
                                Code:
                                $text = preg_replace("/\[img\=(.*?)\]/is","<img src=\"phpthumb.php?image=$1\">",$text);
                                i don't know why but don't works in my lava..using one or the other ,always appears
                                between [img][/img] the link but not the image
                                sigpicthe italian/international COMMUNITY of friendship
                                http://people2000.netne.net
                                WAP/WEB
                                peoplemailbox@katamail.com

                                Comment

                                Working...
                                X