Lavalair Mods...

Started on the old forum in June 2008 · view the original in the archive · old links redirect here

147 replies · 72,508 views · started 18 years ago · 1 min read

TL;DR · summary of 147 replies
  • -metulj provided a fixed code and usage instructions for the total unread PMs count feature.
  • -Rider added code to display user avatars next to their names in online lists, forums, etc.
  • -The profile moods functionality was discussed by opticalpigion, with a link provided for downloading images.
  • -No specific unresolved issues were mentioned regarding the forum mods.

Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.

48 participants
CreativityKills Lead · 833 posts #41

Which? Mine? Dreamz.

Timeonline with free plusses per hour online.

In ibwf_users add ROW tmonline INT(100) default 0 unique_tmonline INT(100) default 0

in login.php

//find where lastvisit is updated then add
$tmdo = 30*60;
$onltm = time() - $lact[0];
if($onltm>$tmdo){
$res = mysql_query("UPDATE unique_tmonl='0' WHERE id='".$id."'");
}
$upd = mysql_query("UPDATE ibwf_users SET lastvst='".$lact[0]."' WHERE id='".$uid."'");
CreativityKills Lead · 833 posts #42

Then in addonline() in core.php ADD to bottom...

$lact = mysql_fetch_array(mysql_query(("SELECT lastact, unique_tmonl FROM ibwf_users WHERE id='".$uid."'"));
$tmdo = 30*60;
$onltm = time() - $lact[0];
if($onltm<=$tmdo){
$res = mysql_query("UPDATE unique_tmonl=unique_tmonl+$lact[0], tmonl=tmonl+$lact[0] WHERE id='".$uid."'");

$lan = mysql_fetch_array(mysql_query(("SELECT unique_tmonl FROM ibwf_users WHERE id='".$uid."'"));
if($lan[0]>= (60*60)){
mysql_query("UPDATE ibwf_users SET unique_tmonl='0', plusses=plusses+400 WHERE id='".$uid."'");
$msg = "YOU HAVE BEEN GIVEN 400 plusses FOR STAYING ONLINE FOR 4 HRS STRAIGHT.";
autopm($msg,$uid);
}
}

i posted with a phone so there may be mistakes, scrutinize dnt copy n paste. And why timeouts? I noticed most lava scripts keep session valid for about an hour, meaning if im nt online for 45mins i cud still get d freebie when i log in. Change 30 to whateva minutes for timeout.

CreativityKills Lead · 833 posts #43

avoid spam in forums, dnt wait for users to report a topic lol dats dumb cuz they dnt.

//Add to ur genproc where u create topics n posts //DONT COPY AND PASTE, INTEGRATE! //Sumwhere around where posts are inserted into database

if(isspam($the_post_text)){ $reported = 1; }else{ $reported=0; }

//in the insert statement... $res = mysql_query("INSERT INTO ibwf_posts .....reported='".$reported."', dtime='".time()."'");

GET THE IDEA? Integrate that 2 ur script. Anti-copy n paste

huwad Developer · 215 posts #44

kabooms wrote: Yah it just a litle latest forum topic not for user post Topic ahehehe.. 😊

here's my latest topic like pinoywap's latest topic..

else if($action=="last15topic")
{

  addonline(getuid_sid($sid),"Viewing Latest Forum Topics","index.php?action=$action");

      echo "<head>";
      echo "<title>Latest Forum Topics</title>";
      echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
      echo "</head>";

    $sql = "SELECT id, name, crdate, authorid FROM ibwf_topics ibwf_topics ORDER BY lastpost DESC LIMIT 0 , 15";
   echo "<p>";
   echo "<small>";
$items = mysql_query($sql);
    echo mysql_error();
    if(mysql_num_rows($items)>0)
    {
    while ($item = mysql_fetch_array($items))
    {
      if(canaccess(getuid_sid($sid),getfid_tid($item[0])))
      {
  $tun = getnick_uid($item[3]);
        echo "<a href=\"index.php?action=viewtpc&sid=$sid&tid=$item[0]&go=last\">$tun:".htmlspecialchars($item[1])."</a><br/>";
        }else{
          echo "Private Post<br/>";
        }
    }
    }
echo "</p>";
  echo "<p align=\"center\">";
  echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
  echo "</p>";

}

usage

echo "<a href=\"index.php?action=last15topic&sid=$sid\">Latest Forum Topics</a><br/>";

hacking is like sex. you get in, you get out and you pray you left nothing behind.

ashuwap Junior · 19 posts #45

huwad wrote: here's my latest topic like pinoywap's latest topic..

else if($action=="last15topic")
{

  addonline(getuid_sid($sid),"Viewing Latest Forum Topics","index.php?action=$action");

      echo "<head>";
      echo "<title>Latest Forum Topics</title>";
      echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
      echo "</head>";

    $sql = "SELECT id, name, crdate, authorid FROM ibwf_topics ibwf_topics ORDER BY lastpost DESC LIMIT 0 , 15";
   echo "<p>";
   echo "<small>";
$items = mysql_query($sql);
    echo mysql_error();
    if(mysql_num_rows($items)>0)
    {
    while ($item = mysql_fetch_array($items))
    {
      if(canaccess(getuid_sid($sid),getfid_tid($item[0])))
      {
  $tun = getnick_uid($item[3]);
        echo "<a href=\"index.php?action=viewtpc&sid=$sid&tid=$item[0]&go=last\">$tun:".htmlspecialchars($item[1])."</a><br/>";
        }else{
          echo "Private Post<br/>";
        }
    }
    }
echo "</p>";
  echo "<p align=\"center\">";
  echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
  echo "</p>";

}

usage

echo "<a href=\"index.php?action=last15topic&sid=$sid\">Latest Forum Topics</a><br/>";

AVATAR FOR CHAT $avlink = getavatar($chat[0]); if ($avlink!=""){ echo "<img src="$avlink" height="25" width="25" alt="avatar"/> "; }else{ echo "<img src="../images/nopic.jpg" height="25" width="25" alt="avatar"/> "; }

CreativityKills Lead · 833 posts #46

Instead of avlink=="" try

if($avlink==""||ceil(filesize($avlink)/1024)<1){ ... }

dat way, if file dnt exist, it stil shows the nopic.jpg file.

Vayne Developer · 106 posts #47

last 10 topics.. by creation time, not last post time--wml

else if($action=="lst10tpc")
{

  addonline(getuid_sid($sid),"Jaunākās Foruma Tēmas","");

    echo "<card id=\"main\" title=\"Newest Topics\">";

    $sql = "SELECT name, crdate, authorid FROM ibwf_topics ORDER BY crdate DESC LIMIT 0 , 10";
   echo "<p>";
   echo "<small>";
$items = mysql_query($sql);
    echo mysql_error();
    if(mysql_num_rows($items)>0)
    {
    while ($item = mysql_fetch_array($items))
    {
  $niks = getnick_uid($item[3]);
        echo "$niks:<a href=\"index.php?action=viewtpc&sid=$sid&tid=$item[0]&go=last\">".htmlspecialchars($item[1])."</a><br/>";
    }
    }
    echo "</small>";
echo "</p>";
  echo "<p align=\"center\">";
  echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"\"/>Hme</a>";
  echo "</p>";
  echo "</card>";
}

Nous Ne Dansos Pas, Nous Sommes Le Danse.!

Vayne Developer · 106 posts #48

blogs list with your comments

else if($action=="mycombl")
{
    addonline(getuid_sid($sid),"Viewing Blogs","");
    echo "<card id=\"main\" title=\"wapaa.lv\">";
    $uid = getuid_sid($sid);
    echo "<p align=\"center\">";
    echo "<b>Blogs with my comments</b><br/><br/>";
    echo "</p>";
    //////ALL LISTS SCRIPT <<

    if($page=="" || $page<=0)$page=1;
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_blogs a INNER JOIN ibwf_blogcomment b ON b.blogsigner='".$uid."' WHERE a.id=b.blogowner"));
     $num_items = $noi[0]; //changable
    $items_per_page= 10;
    $num_pages = ceil($num_items/$items_per_page);
    if(($page>$num_pages)&&$page!=1)$page= $num_pages;
    $limit_start = ($page-1)*$items_per_page;
  
	  $sql = "SELECT a.id,a.bname AS bl FROM ibwf_blogs a INNER JOIN ibwf_blogcomment b ON b.blogsigner='".$uid."' WHERE a.id=b.blogowner ORDER BY bgdate DESC LIMIT $limit_start, $items_per_page";

    echo "<p>";
    $items = mysql_query($sql);
    echo mysql_error();
    if(mysql_num_rows($items)>0)
    {
    while ($item = mysql_fetch_array($items))
    {
      $bname = htmlspecialchars($item[1]);
      $lnk = "» <a href=\"index.php?action=viewblog&bid=$item[0]&sid=$sid\">$bname</a>";
      echo "$lnk<br/>";
    }
    }
    echo "</p>";
    echo "<p align=\"center\">";
    if($page>1)
    {
      $ppage = $page-1;
      echo "<a href=\"lists.php?action=$action&page=$ppage&sid=$sid&who=$who\">«Previous</a> ";
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      echo "<a href=\"lists.php?action=$action&page=$npage&sid=$sid&who=$who\">next»</a>";
    }
    echo "<br/>$page/$num_pages<br/>";
    if($num_pages>2)
    {
      $rets = "Jump to <input name=\"pg\" format=\"*N\" size=\"3\"/>";
        $rets .= "<anchor> Page";
        $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=\"lists.php?action=allbl&sid=$sid\">";
echo "All blogs</a><br/>";
    echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
  echo "</p>";
    echo "</card>";
}

Nous Ne Dansos Pas, Nous Sommes Le Danse.!

Ponick Developer · 216 posts #49

$chnick = getnick_uid($chat[0]); if(canenter!="") {

                echo "*$chnick has entered the room*

"; }

and

if(islogged($sid)==false)||!$uexist) {

                echo "*$chnick has left the room*

"; }

im trying to make this for chat rooms .... butit still not working ... plz need help

/* I don't know everything hehe */

Find me on facebook

kiss Senior · 294 posts #50
$res = false;
$ext = getext($vlink);
if ($ext=="mp3" or $ext=="mmf" or $ext=="amr" or $ext=="wav" or $ext=="aac" or $ext=="mid")
{
$type = 1;
}
if ($ext=="jpg" or $ext=="jpeg" or $ext=="gif" or $ext=="png" or $ext=="bmp" or $ext=="wbmp")
{
$type = 2;
}
if ($ext=="mpg" or $ext=="mp4" or $ext=="wmv" or $ext=="3gp" or $ext=="avi" or $ext=="flv")
{
$type = 3;
}
if ($ext=="jar" or $ext=="jad")
{
$type = 4;
}
if ($ext=="sis" or $ext=="sisx" or $ext=="nth")
{
$type = 5;
}
if ($ext=="cab" or $ext=="exe" or $ext=="iso")
{
$type = 6;
}
if ($ext=="zip" or $ext=="rar" or $ext=="txt" or $ext=="srt" or $ext=="sub" or $ext=="torrent")
{
$type = 7;
}

How the hell i make to show an error for absent extension or wrong url?Thanx

www.inbuzunar.mobi -Your mobile portal pocket

kiss Senior · 294 posts #51
$res = false;
$ext = getext($vlink);
if ($ext=="mp3" or $ext=="mmf" or $ext=="amr" or $ext=="wav" or $ext=="aac" or $ext=="mid")
{
$type = 1;
}elseif ($ext=="jpg" or $ext=="jpeg" or $ext=="gif" or $ext=="png" or $ext=="bmp" or $ext=="wbmp")
{
$type = 2;
}elseif ($ext=="mpg" or $ext=="mp4" or $ext=="wmv" or $ext=="3gp" or $ext=="avi" or $ext=="flv")
{
$type = 3;
}elseif ($ext=="jar" or $ext=="jad")
{
$type = 4;
}elseif ($ext=="sis" or $ext=="sisx" or $ext=="nth")
{
$type = 5;
}elseif ($ext=="cab" or $ext=="exe" or $ext=="iso")
{
$type = 6;
}elseif ($ext=="zip" or $ext=="rar" or $ext=="txt" or $ext=="srt" or $ext=="sub" or $ext=="torrent")
{
$type = 7;
}else{
echo "Error,invalid extension";
}

Now it works 😉

www.inbuzunar.mobi -Your mobile portal pocket

honkytonkman Senior · 252 posts #52

this is my codes for update the last penalty reason text on user's profile in lava/wapdesire.. for exemple: if you bann user JOHN DOE for 2 weeks,at the end of his banning time ,the owner can reset the last penalty reason text that appears on his profile, deleting the reason of the bann.

add this on ownercp.php into action "user"

   echo "<a href=\"ownrproc.php?action=REMOVEPNREASON&sid=$sid&who=$who\">REMOVE LAST PENALTY REASON</a><br/>";

then, put this on ownerproc.php

//////////////////////////remove pn reason//////////////////////////

else if($action=="REMOVEPNREASON")
{
  $who = $_GET["who"];
  echo "<head>";
  echo "<title></title>";
  echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
  echo "</head>";
  echo "<body>";
  echo "<p align=\"center\">";
  echo "<br/>";
  

   

    $res = mysql_query("UPDATE ibwf_users SET lastpnreas='"."' WHERE id='".$who."'");
 

    

    
  

  if($res)
  {
  echo "<img src=\"../images/ok.gif\" alt=\"\"/>last penalty reason is removed from user's profile";
  }else{
  echo "<img src=\"../images/notok.gif\" alt=\"\"/>Error! ";
  }
  
  echo "<br/><b></b><a accesskey=\"9\" href=\"ownercp.php?action=ownercp&sid=$sid\"><img src=\"../images/admn.gif\" alt=\"\"/>back</a><br/>";
  echo "<b></b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\">Home</a>";

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

////////////////////////////

the italian/international COMMUNITY of friendship http://people2000.netne.net WAP/WEB peoplemailbox@katamail.com

Vayne Developer · 106 posts #53

Vayne wrote: blogs list with your comments

else if($action=="mycombl")
{
    addonline(getuid_sid($sid),"Viewing Blogs","");
    echo "<card id=\"main\" title=\"wapaa.lv\">";
    $uid = getuid_sid($sid);
    echo "<p align=\"center\">";
    echo "<b>Blogs with my comments</b><br/><br/>";
    echo "</p>";
    //////ALL LISTS SCRIPT <<

    if($page=="" || $page<=0)$page=1;
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_blogs a INNER JOIN ibwf_blogcomment b ON b.blogsigner='".$uid."' WHERE a.id=b.blogowner"));
     $num_items = $noi[0]; //changable
    $items_per_page= 10;
    $num_pages = ceil($num_items/$items_per_page);
    if(($page>$num_pages)&&$page!=1)$page= $num_pages;
    $limit_start = ($page-1)*$items_per_page;
  
	  $sql = "SELECT a.id,a.bname AS bl FROM ibwf_blogs a INNER JOIN ibwf_blogcomment b ON b.blogsigner='".$uid."' WHERE a.id=b.blogowner ORDER BY bgdate DESC LIMIT $limit_start, $items_per_page";

    echo "<p>";
    $items = mysql_query($sql);
    echo mysql_error();
    if(mysql_num_rows($items)>0)
    {
    while ($item = mysql_fetch_array($items))
    {
      $bname = htmlspecialchars($item[1]);
      $lnk = "» <a href=\"index.php?action=viewblog&bid=$item[0]&sid=$sid\">$bname</a>";
      echo "$lnk<br/>";
    }
    }
    echo "</p>";
    echo "<p align=\"center\">";
    if($page>1)
    {
      $ppage = $page-1;
      echo "<a href=\"lists.php?action=$action&page=$ppage&sid=$sid&who=$who\">«Previous</a> ";
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      echo "<a href=\"lists.php?action=$action&page=$npage&sid=$sid&who=$who\">next»</a>";
    }
    echo "<br/>$page/$num_pages<br/>";
    if($num_pages>2)
    {
      $rets = "Jump to <input name=\"pg\" format=\"*N\" size=\"3\"/>";
        $rets .= "<anchor> Page";
        $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=\"lists.php?action=allbl&sid=$sid\">";
echo "All blogs</a><br/>";
    echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
  echo "</p>";
    echo "</card>";
}

bit modded, replace

	  $sql = "SELECT a.id,a.bname AS bl FROM ibwf_blogs a INNER JOIN ibwf_blogcomment b ON b.blogsigner='".$uid."' WHERE a.id=b.blogowner ORDER BY bgdate DESC LIMIT $limit_start, $items_per_page";

with

	  $sql = "SELECT a.id,a.bname AS bl FROM ibwf_blogs a INNER JOIN ibwf_blogcomment b ON b.blogsigner='".$uid."' WHERE a.id=b.blogowner ORDER BY bgdate DESC LIMIT $limit_start, $items_per_page GROUP BY a.id";

hope i write correct (dunno)

Nous Ne Dansos Pas, Nous Sommes Le Danse.!

riderz Lead · 975 posts #54
else if($action=="rwidc")
{
    addonline(getuid_sid($sid),"$stitle ID - xHTML","index.php?action=$action");
    $pstyle = gettheme($sid);
    echo xhtmlhead("$stitle ID",$pstyle);
    echo "<p align=\"center\">";
    echo "<b>M! ID card</b><br/>";
    $uid = getuid_sid($sid);
    echo "<img src=\"http://chat.waplive.co.za/rwidc.php?id=$uid\" alt=\"M id\"/><br/><br/>";
    echo "This ID card is updated automatically everytime someone request it, the source to your card is http://chat.waplive.co.za/rwidc.php?id=$uid<br/><br/>";
    echo "you can use it as an avatar in other sites<br/><br/>";
    echo "To look at others cards view the user profile then go to more information>$stitle ID card.";
    echo "</p>";
    echo "<p align=\"center\">";
    $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id='".$uid."'"));
    $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id='".$thid[0]."'"));
    echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"http://coding-talk.com/images/themes/$themeimageset[0]/home.gif\" alt=\"*\"/>";
echo "Home</a>";
  echo "</p>";
    echo xhtmlfoot();
}

make sure to have a image in ur images rwidc.jpg replace this one with urs in index.php just rename the site name

some script wont use rwidc they only use idc so just rename it to idc or make sure u have image idc in images


Jacques jacques@gw-designs.co.za http://coding.biz.tm Come join and lets make it a place to learn all the noobies how to code


NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

Vayne Developer · 106 posts #56

makvanpor2000 wrote: Hey guys,can any one help with the code for random blog

try to select blogs with

LIMIT 1

and

ORDER BY RAND

Nous Ne Dansos Pas, Nous Sommes Le Danse.!

honkytonkman Senior · 252 posts #57

🤨 i ended my chapel-deluxe at late..too tired..only now i see a little error i done on it.. please replace in chapel.php

$nick = getnick_uid($who);
$nic = getnick_uid($uid);
$msg = "-sorry.. $nick has divorced from you..";

in:

$nick = getnick_uid($who);
$nic = getnick_uid($uid);
$msg = "-sorry.. $nic has divorced from you..";

it's at the end of the page

the italian/international COMMUNITY of friendship http://people2000.netne.net WAP/WEB peoplemailbox@katamail.com

something else Fellow · 2,296 posts #58

i Got that on mine 😛

else if($action=="marry")
{
    addonline(getuid_sid($sid),"Wappied List","");

   //////ALL LISTS SCRIPT <<

    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chapel WHERE ismd='1'"));
    if($page=="" || $page<=0)$page=1;
    $num_items = $noi[0]; //changable
    $items_per_page= 10;
    $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

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

    echo "<p>";
    $items = mysql_query($sql);
    echo mysql_error();
    if(mysql_num_rows($items)>0)
    {
    while ($item = mysql_fetch_array($items))
    {
$unick = getnick_uid($item[2]);
$wnick = getnick_uid($item[1]);
$lnk = "<a href=\"index.php?action=viewuser&who=$item[2]\">$unick </a><b>is Wappied To </b><a href=\"index.php?action=viewuser&who=$item[1]\">$wnick </a><br/>";
      echo "$lnk<br/>";
    }
    }
    echo "</p>";
    echo "<p align=\"center\">";
    if($page>1)
    {
      $ppage = $page-1;
      echo "<a href=\"lists.php?action=marry&page=$ppage\">«PREV</a> ";
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      echo "<a href=\"lists.php?action=marry&page=$npage\">Next»</a>";
    }
    echo "<br/>$page/$num_pages<br/>";
    echo "</p>";
    if($num_pages>2)
    {
        $rets = "<form action=\"lists.php\" method=\"get\">";
        $rets .= "<input name=\"page\" style=\"-wap-input-format: '*N'\" size=\"2\"/>";
        $rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";
        $rets .= "<input type=\"submit\" value=\"Go To Page\"/>";
        $rets .= "</form>";
        echo $rets;
    }

  ////// UNTILL HERE >>
    echo "<p align=\"center\">";
    echo "<a href=\"chapel.php?action=main\">";
echo "Chapel</a><br/><br/>";
    echo "<a href=\"index.php?action=stats\"><img src=\"http://coding-talk.com/images/stat.gif\" alt=\"*\"/>";
echo "Site Stats</a><br/>";
}

might need to add sid into it and a few other things

honkytonkman Senior · 252 posts #59

something else wrote: i Got that on mine 😛

else if($action=="marry")
{
    addonline(getuid_sid($sid),"Wappied List","");

   //////ALL LISTS SCRIPT <<

    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chapel WHERE ismd='1'"));
    if($page=="" || $page<=0)$page=1;
    $num_items = $noi[0]; //changable
    $items_per_page= 10;
    $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

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


    echo "<p>";
    $items = mysql_query($sql);
    echo mysql_error();
    if(mysql_num_rows($items)>0)
    {
    while ($item = mysql_fetch_array($items))
    {
$unick = getnick_uid($item[2]);
$wnick = getnick_uid($item[1]);
$lnk = "<a href=\"index.php?action=viewuser&who=$item[2]\">$unick </a><b>is Wappied To </b><a href=\"index.php?action=viewuser&who=$item[1]\">$wnick </a><br/>";
      echo "$lnk<br/>";
    }
    }
    echo "</p>";
    echo "<p align=\"center\">";
    if($page>1)
    {
      $ppage = $page-1;
      echo "<a href=\"lists.php?action=marry&page=$ppage\">«PREV</a> ";
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      echo "<a href=\"lists.php?action=marry&page=$npage\">Next»</a>";
    }
    echo "<br/>$page/$num_pages<br/>";
    echo "</p>";
    if($num_pages>2)
    {
        $rets = "<form action=\"lists.php\" method=\"get\">";
        $rets .= "<input name=\"page\" style=\"-wap-input-format: '*N'\" size=\"2\"/>";
        $rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";
        $rets .= "<input type=\"submit\" value=\"Go To Page\"/>";
        $rets .= "</form>";
        echo $rets;
    }

  ////// UNTILL HERE >>
    echo "<p align=\"center\">";
    echo "<a href=\"chapel.php?action=main\">";
echo "Chapel</a><br/><br/>";
    echo "<a href=\"index.php?action=stats\"><img src=\"http://coding-talk.com/images/stat.gif\" alt=\"*\"/>";
echo "Site Stats</a><br/>";
}

might need to add sid into it and a few other things

;(this code is good but don't works with the chapel sql tables i use:

-- -- Table structure for table couple

CREATE TABLE IF NOT EXISTS couple ( id int(100) NOT NULL auto_increment, who int(100) NOT NULL default '0', partner int(100) NOT NULL default '0', req int(100) NOT NULL default '0', accept int(100) NOT NULL default '0', joined int(100) NOT NULL default '0', time int(100) NOT NULL default '0', PRIMARY KEY (id) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=64 ;

-- -- Dumping data for table couple


the italian/international COMMUNITY of friendship http://people2000.netne.net WAP/WEB peoplemailbox@katamail.com

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close