Plusses

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

4 replies · 561 views · started 18 years ago · 1 min read

4 participants
hellfire Newbie · 2 posts #1

l want to have it on my site that you need x amonut of plusses before you can look at smilies pages ie when you click on smilies if you havent got enoght plusses it wont let you see them thanks in advance if you post in here any links that l need to put in script its a lava script thanks also l have put this code in list.php and all l get is a blank page

if(points(getuid_sid($sid))<15) { $need=15-points(getuid_sid($sid)); echo " You need $need more points to shout!"; }

mcKeny Developer · 130 posts #2

on top of the smile page

$pluses = mysql_fetch_array(mysql_query("SELECT pluses FROM ibwf_users WHERE id='".$uid."'"));
if($pluses[0]<50) {
echo "You dont got enough pluses to view this page :(";
}
else
{
//coding
}

R.M.C

PHP Adovocate B)

nclemale36 Lead · 537 posts #3

on top of the smile page

$pluses = mysql_fetch_array(mysql_query("SELECT pluses FROM ibwf_users WHERE id='".$uid."'"));
if($pluses[0]<50) {
echo "You dont got enough pluses to view this page :(";
}
else
{
//coding
}

can i add the same code so ppl cant view forums until they have how ever many plusses they have . and if so . where would i put the code . thanks.

mcKeny Developer · 130 posts #4

///forums if($action=="forum") { place that code here } else { //print the forums } } if you dont understand copy and paste the page WHERE you have the forums on here
eg ///forums if($action=="forum") { //coding here }

R.M.C

PHP Adovocate B)

learner Lead · 587 posts #5

here you go mate add it below card

else if($action=="smilies")
{
    addonline(getuid_sid($sid),"Smilies List","");
    echo "<card id=\"main\" title=\"Smilies List\">";

   if(points(getuid_sid($sid))<15)
{
$need=15-points(getuid_sid($sid));
echo "
You need $need more points to shout!";
}

    
    //////ALL LISTS SCRIPT <<

    if($page=="" || $page<=0)$page=1;
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_smilies"));
    $num_items = $noi[0]; //changable
    $items_per_page= 5;
    $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, scode, imgsrc FROM ibwf_smilies ORDER BY id DESC LIMIT $limit_start, $items_per_page";

    echo "

";
    $items = mysql_query($sql);
    
    echo mysql_error();
    if(mysql_num_rows($items)>0)
    {
    while ($item = mysql_fetch_array($items))
   {
        if(isadmin(getuid_sid($sid)))
        {
            $delsl = "<a href=\"admproc.php?action=delsm&sid=$sid&smid=$item[0]\">[x]</a>";
        }else{
            $delsl = "";
        }
        echo "$item[1] » ";
        echo "<img src=\"$item[2]\" alt=\"$item[1]\"/> $delsl
";
    }
    }
    echo "</p>";
    echo "<p align=\"center\">";
    if($page>1)
    {
      $ppage = $page-1;
      echo "<a href=\"lists.php?action=smilies&page=$ppage&sid=$sid&view=$view\">«PREV</a> ";
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      echo "<a href=\"lists.php?action=smilies&page=$npage&sid=$sid&view=$view\">Next»</a>";
    }
    echo "
$page/$num_pages
";
    if($num_pages>2)
    {
      $rets = "Jump to 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=\"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=cpanel&sid=$sid\">";
echo "CPanel</a>
";
    echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
  echo "</p>";
    echo "</card>";
}

Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!

BEST MOBILE ADVERTISER

External image (may be gone)

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