awards modification

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

    awards modification

    hey guys i need help with small modification on a code

    i got this code where owners give users awards on the site so it just show the text and users avatar i want to change the avatar to a image a owner select from sql so it show the text owners add pluss like a gold ribbon or brown ribbon what ever

    Code:
    //////////////////////////general settings//////////////////////////
    else if($action=="addhall")
    
    {
    
        addonline(getuid_sid($sid),"Add User To Hall Of Fame","");
      echo "<head>";
      echo "<title>Owner Tools</title>";
      echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
      echo "</head>";
      echo "<body>";
      include("header.php");
      echo "<div align=\"center\">";
      $who = $_GET["who"];
       echo "<form action=\"tuanproc.php?action=addhall&amp;sid=$sid&amp;who=$who\" method=\"post\">";
       echo "Winner Info<br/><textarea name=\"title\" rows=\"3\" cols=\"25\" maxlength=\"100\"></textarea><br/>";
        echo "<input type=\"submit\" value=\"Add\">";
      echo "</form>";
    
       echo "</div>";
       echo "<div align=\"center\">";
       echo "<br/><a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
    
    echo "Home</a>";
    
        echo "</div>";
        include("footer.php");
        echo "</body>";
    
    }
    this is the part owners use to type in the award so just want it to be where owners type in the award and under it they choose a image that goes with 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

    #2
    i will up this
    Last edited by wapmetal; 02.04.10, 03:28.
    com site: http://vampist.net
    download site: http://wapdloads.net
    fb: http://www.facebook.com/pmplx

    Comment


      #3
      Code:
      //////////////////////////general settings//////////////////////////
      else if($action=="addhall")
      
      {
      
          addonline(getuid_sid($sid),"Add User To Hall Of Fame","");
        echo "<head>";
        echo "<title>Owner Tools</title>";
        echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
        echo "</head>";
        echo "<body>";
        include("header.php");
        echo "<div align=\"center\">";
        $who = $_GET["who"];
         echo "<form action=\"tuanproc.php?action=addhall&amp;sid=$sid&amp;who=$who\" method=\"post\">";
         echo "Winner Info<br/><textarea name=\"title\" rows=\"3\" cols=\"25\" maxlength=\"100\"></textarea><br/>";
      
           echo "add icon Stat: <select name=\"icon\" value=\"$icon[0]\">"; 
          echo "<option value=\"0\">Normal</option>"; 
      if($icon[0]=="1"){$selected=" selected=\"selected\"";}else{$selected="";} 
          echo "<option value=\"1\"$selected>helper</option>"; 
      if($icon[0]=="2"){$selected=" selected=\"selected\"";}else{$selected="";} 
          echo "<option value=\"2\"$selected>retired</option>"; 
      if($icon[0]=="3"){$selected=" selected=\"selected\"";}else{$selected="";} 
          echo "<option value=\"3\"$selected>lover</option>";
         echo "</select><br/>";
          echo "<input type=\"submit\" value=\"Add\">";
        echo "</form>";
      
         echo "</div>";
         echo "<div align=\"center\">";
         echo "<br/><a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
      
      echo "Home</a>";
      
          echo "</div>";
          include("footer.php");
          echo "</body>";
      
      }

      in the main hall page



      $kantot = mysql_fetch_array(mysql_query("SELECT kean FROM ibwf_users WHERE name='$item[0]'"));

      if($kantot[0]=="1"){$kantot2 = "<img src=\"../images/lover.gif\" alt=\"(awarded)\"/><br/>";}

      if($kantot[0]=="2"){$kantot2= "<img src=\"../images/retired.gif\" alt=\"(awarde)\"/><br/>";}

      if($kantot[0]=="3"){$kantot2 = "<img src=\"../images/helper.gif\" alt=\"(awarded)\"/><br/>";}




      i hope my work will give you ideas

      no tested yet, work it for th rest
      Last edited by wapmetal; 02.04.10, 04:59.
      com site: http://vampist.net
      download site: http://wapdloads.net
      fb: http://www.facebook.com/pmplx

      Comment


        #4
        in the main award LOL
        Code:
        else if ($action=="award")
            {
            addonline(getuid_sid($sid),"Special Award","");
        
            echo "<head>";
            echo "<title>$sitename</title>";
            echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
            echo "</head>";
            echo "<body>";
            include("header.php");
            echo "<div align=\"center\">";
            echo "~*<b>Special Award List</b>*~<br/>";
            echo "</div>";
            echo "<div align=\"center\">";
            //////ALL LISTS SCRIPT <<
            $noi = mysql_fetch_array(mysql_query("SELECT count(*) FROM ibwf_halloffame"));
            
            if($page=="" || $page<=0)$page=1;
            $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, name, title FROM ibwf_halloffame ORDER BY name LIMIT $limit_start, $items_per_page";
        
        
            $items = mysql_query($sql);
            echo mysql_error();
            if(mysql_num_rows($items)>0)
            {
            while ($item = mysql_fetch_array($items))
            {
            $online = mysql_fetch_array(mysql_query("SELECT sex, icon FROM ibwf_users WHERE id='".$item[0]."'"));
         if($online[1]=="")
         {
         if($online[0]=="M")
         {
         $seximg = "<img src=\"../images/male.gif\" alt=\"M\"/>";
         }
         else if($online[0]=="F")
         {
         $seximg = "<img src=\"../images/female.gif\" alt=\"F\"/>";
         }else{
         $seximg = "";
         }
        }else{
         $seximg = "<img src=\"..$online[1]\" alt=\"*\"/>";
         }
        
        
        
        
        
        $kantot = mysql_fetch_array(mysql_query("SELECT kean FROM ibwf_users WHERE name='$item[0]'"));
        
        if($kantot[0]=="1"){$kantot2 = "<img src=\"../images/lover.gif\" alt=\"(awarded)\"/><br/>";}
        
        if($kantot[0]=="2"){$kantot2 = "<img src=\"../images/retired.gif\" alt=\"(awarde)\"/><br/>";}
        
        if($kantot[0]=="3"){$kantot2 = "<img src=\"../images/helper.gif\" alt=\"(awarded)\"/><br/>";}
        
        
        
        
        
        
        
        
        
        
        
         $ayat = parsepm($item[2], $sid);
              $lnk = "$kantot2 $seximg<a href=\"index.php?action=viewuser&amp;who=$item[0]&amp;sid=$sid\">$item[1]</a><br/>";
              
          $avlink = getavatar($item[0]);
          if ($avlink=="")
          { 
          $foto = "<img src=\"thumb.php?image=../images/nopics.gif&amp;w=50&amp;h=50&amp;type=jpg\" alt=\"*\"/><br/>";
          }else{
          $fotot = "<img src=\"thumb.php?image=..$avlink&amp;w=50&amp;h=50&amp;type=jpg\" alt=\"*\"/>";
          $foto = "<a href=\"$avlink\">$fotot</a><br/>";
          }
          if (isowner(getuid_sid($sid)))
        
          {
          $del = "<a href=\"tuanproc.php?action=delhall&amp;who=$item[0]&amp;sid=$sid\">[x]</a><br/>";
          }else
         { $del = " ";
         }
              echo "<br/>$lnk $foto $ayat $del<br/>";
            }
            }
            echo "<p align=\"center\">";
            if($page>1)
            {
              $ppage = $page-1;
              echo "<a href=\"main.php?action=$action&amp;page=$ppage&amp;sid=$sid&amp;view=$view\">«PREV</a> ";
            }
            if($page<$num_pages)
            {
              $npage = $page+1;
              echo "<a href=\"main.php?action=$action&amp;page=$npage&amp;sid=$sid&amp;view=$view\">Next»</a>";
            }
            echo "<br/>$page/$num_pages<br/>";
            if($num_pages>2)
            {
                $rets = "<form action=\"main.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=\"view\" value=\"$view\"/>";
                $rets .= "<input type=\"submit\" value=\"Go To Page\"/>";
                $rets .= "</form>";
        
                echo $rets;
            }
            echo "</p></div>";
          ////// UNTILL HERE >>
            echo "<div align=\"center\">";
            echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>Home Page</a>";    
            echo "</div>";
            include("footer.php");
            echo "</body>";
            }
        Last edited by wapmetal; 02.04.10, 05:02.
        com site: http://vampist.net
        download site: http://wapdloads.net
        fb: http://www.facebook.com/pmplx

        Comment

        Working...
        X