hi5 contact list for lava

Started on the old forum in November 2009 · view the original in the archive · old links redirect here

4 replies · 633 views · started 17 years ago · 1 min read

4 participants
riderz Lead · 975 posts #1

Here are a code where u can add ur hi5 email address

usage code

$noi=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lirhi5"));
          echo "<a href=\"index.php?action=hi5\">".$yahoo."Addresses Hi5($noi[0])</a><br/>";
         
      anywhere in index
 else if($action=="hi5")

{

	$whonick = getnick_uid($who);

  $who = $_GET["who"];

  addonline(getuid_sid($sid),"Adrese hi5","index.php?action=$action");

    echo "<head>";

  echo "<title>$stitle</title>";

  echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"themes/$theme[0]\">";

  echo "</head>";

  echo "<body>";

  $uid = getuid_sid($sid);

    //////ALL LISTS SCRIPT <<

    if($page=="" || $page<=0)$page=1;

    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lirhi5"));

    $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 id, uid, adresa FROM lirhi5 ORDER by id DESC LIMIT $limit_start, $items_per_page";

    echo "<p align=\"center\">";

      // alerte

  $uid = getuid_sid($sid);

  $unreadpopup=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lirpopups WHERE unread='1' AND touid='".$uid."'"));

  if ($unreadpopup[0]>0)

   {

      echo popup($sid);

     echo "</p>";

  echo "</body>";

  echo "</html>";

      exit();

    }

     echo "<img src=\"http://coding-talk.com/images/meditatii.gif\" alt=\"\"/><b>Addresses Hi5</b><br/><br/>";

      echo "<a href=\"index.php?action=adaugahi5\">(add your address here hi5)</a><br/>";

     echo "<p>";

     echo "<p align=\"left\">";

    $items = mysql_query($sql);

    echo mysql_error();

    if(mysql_num_rows($items)>0)

    {

    while ($item = mysql_fetch_array($items))

    {

    	 $descriere = parsepm($item[3], $sid);

      $bonick = getnick_uid($item[1]);

    $byview = ">->By: <a href=\"index.php?action=viewuser&who=$item[1]\">".getsimbol($item[1])."$bonick</a>";

        if(candelbl($uid,$item[0]))

    {

      $dl = "|<a href=\"index.php?action=delhi5&bid=$item[0]\">[X]</a>";

    }else{

      $dl = "";

    }

     echo " <small><b><font color=\"#88CC00\"><a href=\"$item[2]\">$item[2]</a> </font></b>$byview</small>

		<small></small>$dl <br/>

                ";

       //  echo "$lnk";

    }

    }

    echo "</p>";

    echo "<p align=\"center\">";

    if($page>1)

    {

      $ppage = $page-1;

      echo "<a href=\"index.php?action=$action&page=$ppage&view=$view\">«Back</a> ";

    }

    if($page<$num_pages)

    {

      $npage = $page+1;

      echo "<a href=\"index.php?action=$action&page=$npage&view=$view\">Next»</a>";

    }

    echo "<br/>$page/$num_pages<br/>";

    if($num_pages>2)

    {

        $rets = "<form action=\"index.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=\"hidden\" name=\"sid\" value=\"$sid\"/>";

        $rets .= "<input type=\"hidden\" name=\"who\" value=\"$who\"/>";

        $rets .= "<input type=\"hidden\" name=\"view\" value=\"$view\"/>";

        $rets .= "<input type=\"submit\" value=\"Go to page\"/>";

        $rets .= "</form>";

        echo $rets;

    }

    echo "</p>";

  ////// UNTILL HERE >>

    echo "<p align=\"center\">";

  echo "<a href=\"index.php?action=main\"><img src=\"http://coding-talk.com/images/home.gif\" alt=\"\"/>Home</a>";

  echo "</p>";

    echo "</body>";

}

  else if($action=="delhi5")

{

    $bid = $_GET["bid"];

  addonline(getuid_sid($sid),"sterge hi5","");

      echo "<head>";

      echo "<title>$stitle</title>";

      echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"themes/$theme[0]\">";

      echo "</head>";

      echo "<body>";

  echo "<p align=\"center\">";

  if(candelmd(getuid_sid($sid), $bid))

  {

    $res = mysql_query("DELETE FROM lirhi5 WHERE id='".$bid."'");

    if($res)

        {

            echo "<img src=\"http://coding-talk.com/images/ok.gif\" alt=\"o\"/>Hi5 Deleted<br/>";

        }else{

          echo "<img src=\"http://coding-talk.com/images/notok.gif\" alt=\"x\"/>Error!<br/>";

        }

  }else{

    echo "<img src=\"http://coding-talk.com/images/notok.gif\" alt=\"X\"/>You can remove this Hi5";

  }

  echo "<br/>";

  echo "<a href=\"index.php?action=main\"><img src=\"http://coding-talk.com/images/home.gif\" alt=\"\"/>Home</a>";

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

}

  else if($action=="adaugahi5")

{

   addvisitor();

  addonline(getuid_sid($sid),"add hi5","index.php?action=$action");

    echo "<head>";

    echo "<title>adauga hi5</title>";

    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"themes/$theme[0]\">";

    echo "</head>";

    echo "<body>";

    echo "<p align=\"center\">";

    if(getplusses(getuid_sid($sid))<75)

    {

        echo "You must have 75 credits you can add an address hi5!";

    }else{

	 // alerte

  $uid = getuid_sid($sid);

         echo "<form action=\"index.php?action=aadaugahi5\" method=\"post\">";

    echo "Addres Hi5:<input name=\"hi5\" maxlength=\"30\"/><br/>";

   // echo "Description:<input name=\"descriere\" maxlength=\"10000\"/><br/>";

echo "<input type=\"submit\" value=\"scrie\"/>";

echo "</form><br/>";

}

     echo "<a href=\"index.php?action=hi5\"><img src=\"http://coding-talk.com/images/meditatii.gif\" alt=\"\"/>Address hi5</a>";

  echo "<br/><br/><a href=\"index.php?action=main\"><img src=\"http://coding-talk.com/images/home.gif\" alt=\"\"/>Home</a>";

    echo "</p>";

    echo "</body>";

}

  else if($action=="aadaugahi5")

{

  $hi5 = $_POST["hi5"];

  $descriere = $_POST["descriere"];

  //$qut = $_POST["qut"];

  addonline(getuid_sid($sid),"add address hi5","");

      echo "<head>";

      echo "<title>$stitle</title>";

      echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"themes/$theme[0]\">";

      echo "</head>";

      echo "<body>";

      echo "<p align=\"center\">";

      $crdate = time();

      //$uid = getuid_sid($sid);

      $res = false;

      if((trim($hi5)!=""))

      {

      $res = mysql_query("INSERT INTO lirhi5 SET uid='".$uid."', adresa='".$hi5."'");

      }

      if($res)

      {

        echo "<img src=\"http://coding-talk.com/images/ok.gif\" alt=\"O\"/>Address hi5 added";

      }else{

        echo "<img src=\"http://coding-talk.com/images/notok.gif\" alt=\"X\"/>Error !!!";

      }

      echo "<br/><br/>";

      echo "<a href=\"index.php?action=main\"><img src=\"http://coding-talk.com/images/home.gif\" alt=\"\"/>Home</a>";

      echo "</p>";

      echo "</body>";

}
    
sql
    --
-- Table structure for table `lirhi5`
--

CREATE TABLE IF NOT EXISTS `lirhi5` (
  `id` int(100) NOT NULL auto_increment,
  `uid` int(100) NOT NULL default '0',
  `adresa` varchar(100) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=8 ;

--
-- Dumping data for table `lirhi5`
--

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

riderz Lead · 975 posts #3

i added it yesterday to my lava i just removed session on it so edit it urself add amp=sid$sid to it


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

Leviathan73 Senior · 260 posts #4

when I delete the contact, do not remove

$byview = ">->By: <a href=\"index.php?action=viewuser&who=$item[1]\">".getsimbol($item[1])."$bonick</a>";
 
        if(candelbl($uid,$item[0]))
 
    {
 
      $dl = "|<a href=\"index.php?action=delhi5&bid=$item[0]\">[X]</a>";
 
    }else{
 
      $dl = "";
 
    }

I modified

$dl = "|<a href=\"index.php?action=delhi5&sid=$sid&bid=$item[0]\">[X]</a>";

but not removed

12345xmen Developer · 239 posts #5

rider u hv code for fb notification nd feeds for lava ?

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