hi5 contact list for lava

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

    hi5 contact list for lava

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

    usage code
    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
    Code:
     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&amp;who=$item[1]\">".getsimbol($item[1])."$bonick</a>";
    
            if(candelbl($uid,$item[0]))
    
        {
    
          $dl = "|<a href=\"index.php?action=delhi5&amp;bid=$item[0]\">[X]</a>";
    
        }else{
    
          $dl = "";
    
        }
    
    
    
    
    
         echo "&nbsp;<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&amp;page=$ppage&amp;view=$view\">«Back</a> ";
    
        }
    
        if($page<$num_pages)
    
        {
    
          $npage = $page+1;
    
          echo "<a href=\"index.php?action=$action&amp;page=$npage&amp;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
    Code:
        --
    -- 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`
    --
    Last edited by riderz; 15.11.09, 05:13.
    ________________
    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

    #2
    Hey guys, will dis work in lavalaire
    http://myfacepals.com
    MYFACEPALS SOCIAL NETWORKsigpic

    Comment


      #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

      Comment


        #4
        when I delete the contact, do not remove
        PHP Code:
        $byview ">->By: <a href=\"index.php?action=viewuser&amp;who=$item[1]\">".getsimbol($item[1])."$bonick</a>";
         
                if(
        candelbl($uid,$item[0]))
         
            {
         
              
        $dl "|<a href=\"index.php?action=delhi5&amp;bid=$item[0]\">[X]</a>";
         
            }else{
         
              
        $dl "";
         
            } 
        I modified
        PHP Code:
        $dl "|<a href=\"index.php?action=delhi5&amp;sid=$sid&amp;bid=$item[0]\">[X]</a>"
        but not removed
        Last edited by Leviathan73; 22.01.11, 11:27.

        Comment


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

          Comment

          Working...
          X