html problem

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

    html problem

    Hello! I have a problem with the HTML version add link ... wml version in the works perfectly, but in html version shows that the link is added but can not see subtitles link ...
    Code:
    else if($action=="links")
    
    
    
    {
    
    addonline(getuid_sid($sid),"<b> Add link HTML</b>","index.php?action=$action");
        $pstyle = gettheme($sid);
          echo xhtmlhead("Dodaj link",$pstyle);
    
    $nick = getnick_uid(1);
    echo "<p align=\"center\"><b>Pre nego sto postavis tvoj link obrati se Adminu </b><br/> <a href=\"index.php?action=viewuser&amp;who=1&amp;sid=$sid\">srecnici</a><br/><br/></p>";
    
    echo "<p align=\"center\">";
    $url = $_GET["url"];
      $title = $_GET["title"];
    $links[0]= $_GET["links[0]"];
    
        
          $query = mysql_query("SELECT url, title FROM lib3rtymrc_links");
    while ($links = mysql_fetch_array($query)) 
    {
       $link = "<a href=\"$links[0]\">$links[1]</a>";
    
    if (isowner(getuid_sid($sid)))
       {
       $del = "<a href=\"modproc.php?action=linkdel&amp;sid=$sid&amp;link=$links[0]\">[Obrisi]</a>";
       }
       echo "$link $del<br/>";
    }
     echo "<br/><br/><br/>";   
    //if(ismod(getuid_sid($sid)))
      {
      echo "<a href=\"index.php?action=addlink&amp;sid=$sid\">Add Link</a><br/>";
      }
        $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 "<img src=\"images/themes/$themeimageset[0]/home.gif\" alt=\"*\"/> <a href=\"index.php?action=main&amp;sid=$sid\">";
    echo "HAPPY</a>";
      echo "</p>";
        echo xhtmlfoot();
    
    }
    ////////////////////////// link//////////////////////////
    
    else if($action=="addlinks")
    {
      addonline(getuid_sid($sid),"<b> Add link HTML</b>","index.php?action=$action");
        $pstyle = gettheme($sid);
          echo xhtmlhead("Dodaj link",$pstyle);
    
      echo "<p align=\"center\">";
      $url = $_POST["url"];
      $title = $_POST["title"];
    $url = $_GET["url"];
      $title = $_GET["title"];
    
      echo $site;
      $res = mysql_query("INSERT INTO lib3rtymrc_links SET url='".$url."', title='".$title."'");
      if($res)
      {
      echo mysql_error();
      echo "<img src=\"../images/ok.gif\" alt=\"O\"/>Link $title  je uspesno dodat<br/>";
      }else{
      echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Greska u dodavanju Linka<br/>";
      }
      echo "<br/>";
      echo "<a href=\"index.php?action=links&amp;sid=$sid\">Linkovi</a><br/>";
      $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 "<img src=\"images/themes/$themeimageset[0]/home.gif\" alt=\"*\"/> <a href=\"index.php?action=main&amp;sid=$sid\">";
    echo "HAPPY</a>";
      echo "</p>";
        echo xhtmlfoot();
    
      }
    
    ///////////////// Add link
    else if($action=="addlink")
    {
        addonline(getuid_sid($sid),"<b> Add link HTML</b>","index.php?action=$action");
        $pstyle = gettheme($sid);
          echo xhtmlhead("Dodaj link",$pstyle);
    
        echo "<p align=\"center\">";
        echo "Unesi url adresu linka<br/>";
        echo "<form action=\"index.php?action=addlinks&amp;sid=$sid\" method=\"post\">";
        echo "<b>Url</b><br/>";
        echo "<input name=\"url\"/><br/>";
        echo "<b>Naziv linka</b><br/>";
        echo "<input name=\"title\"/><br/>";
        echo "<br/><input type=\"Submit\" Name=\"Submit\" Value=\"Add\"></form>";
        echo "</p>";
    
        echo "<p align=\"center\">";
      echo "<a href=\"index.php?action=links&amp;sid=$sid\">Linkovi</a><br/>";
     $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 "<img src=\"images/themes/$themeimageset[0]/home.gif\" alt=\"*\"/> <a href=\"index.php?action=main&amp;sid=$sid\">";
    echo "HAPPY</a>";
      echo "</p>";
        echo xhtmlfoot();
    
    }
    in this code echo "$link $del<br/>";

    $link can not be. Help please
    sigpichttp://happy.srecnica.com/web

    #2
    Originally posted by srecnica View Post
    Hello! I have a problem with the HTML version add link ... wml version in the works perfectly, but in html version shows that the link is added but can not see subtitles link ...
    Code:
    else if($action=="links")
    
    
    
    {
    
    addonline(getuid_sid($sid),"<b> Add link HTML</b>","index.php?action=$action");
        $pstyle = gettheme($sid);
          echo xhtmlhead("Dodaj link",$pstyle);
    
    $nick = getnick_uid(1);
    echo "<p align=\"center\"><b>Pre nego sto postavis tvoj link obrati se Adminu </b><br/> <a href=\"index.php?action=viewuser&amp;who=1&amp;sid=$sid\">srecnici</a><br/><br/></p>";
    
    echo "<p align=\"center\">";
    $url = $_GET["url"];
      $title = $_GET["title"];
    $links[0]= $_GET["links[0]"];
    
        
          $query = mysql_query("SELECT url, title FROM lib3rtymrc_links");
    while ($links = mysql_fetch_array($query)) 
    {
       $link = "<a href=\"$links[0]\">$links[1]</a>";
    
    if (isowner(getuid_sid($sid)))
       {
       $del = "<a href=\"modproc.php?action=linkdel&amp;sid=$sid&amp;link=$links[0]\">[Obrisi]</a>";
       }
       echo "$link $del<br/>";
    }
     echo "<br/><br/><br/>";   
    //if(ismod(getuid_sid($sid)))
      {
      echo "<a href=\"index.php?action=addlink&amp;sid=$sid\">Add Link</a><br/>";
      }
        $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 "<img src=\"images/themes/$themeimageset[0]/home.gif\" alt=\"*\"/> <a href=\"index.php?action=main&amp;sid=$sid\">";
    echo "HAPPY</a>";
      echo "</p>";
        echo xhtmlfoot();
    
    }
    ////////////////////////// link//////////////////////////
    
    else if($action=="addlinks")
    {
      addonline(getuid_sid($sid),"<b> Add link HTML</b>","index.php?action=$action");
        $pstyle = gettheme($sid);
          echo xhtmlhead("Dodaj link",$pstyle);
    
      echo "<p align=\"center\">";
      $url = $_POST["url"];
      $title = $_POST["title"];
    $url = $_GET["url"];
      $title = $_GET["title"];
    
      echo $site;
      $res = mysql_query("INSERT INTO lib3rtymrc_links SET url='".$url."', title='".$title."'");
      if($res)
      {
      echo mysql_error();
      echo "<img src=\"../images/ok.gif\" alt=\"O\"/>Link $title  je uspesno dodat<br/>";
      }else{
      echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Greska u dodavanju Linka<br/>";
      }
      echo "<br/>";
      echo "<a href=\"index.php?action=links&amp;sid=$sid\">Linkovi</a><br/>";
      $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 "<img src=\"images/themes/$themeimageset[0]/home.gif\" alt=\"*\"/> <a href=\"index.php?action=main&amp;sid=$sid\">";
    echo "HAPPY</a>";
      echo "</p>";
        echo xhtmlfoot();
    
      }
    
    ///////////////// Add link
    else if($action=="addlink")
    {
        addonline(getuid_sid($sid),"<b> Add link HTML</b>","index.php?action=$action");
        $pstyle = gettheme($sid);
          echo xhtmlhead("Dodaj link",$pstyle);
    
        echo "<p align=\"center\">";
        echo "Unesi url adresu linka<br/>";
        echo "<form action=\"index.php?action=addlinks&amp;sid=$sid\" method=\"post\">";
        echo "<b>Url</b><br/>";
        echo "<input name=\"url\"/><br/>";
        echo "<b>Naziv linka</b><br/>";
        echo "<input name=\"title\"/><br/>";
        echo "<br/><input type=\"Submit\" Name=\"Submit\" Value=\"Add\"></form>";
        echo "</p>";
    
        echo "<p align=\"center\">";
      echo "<a href=\"index.php?action=links&amp;sid=$sid\">Linkovi</a><br/>";
     $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 "<img src=\"images/themes/$themeimageset[0]/home.gif\" alt=\"*\"/> <a href=\"index.php?action=main&amp;sid=$sid\">";
    echo "HAPPY</a>";
      echo "</p>";
        echo xhtmlfoot();
    
    }
    in this code echo "$link $del<br/>";

    $link can not be. Help please
    what does this do?

    $links[0]= $_GET["links[0]"]; it looks a bit strange to me
    Advertise your mobile site for FREE with AdTwirl

    Comment


      #3
      it dont post nothing if its MySql if you want to view site errors use wml lol

      change it to xhtml
      Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
      Visit: WapMasterz Coming Back Soon!
      _______
      SCRIPTS FOR SALE BY SUBZERO
      Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
      FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
      _______
      Info & Tips
      php.net
      w3schools.com

      Comment


        #4
        post wml code too.
        sigpic

        Comment


          #5
          OK, here's the code in wml. see the links but I have another problem shows only the first user who has left the link and all the next user can not see. shows the link but not who made the link
          Code:
          else if($action=="links"){
          
          echo "<card id=\"main\" title=\"$nazivsajta\">";
          addonline(getuid_sid($sid),"<b>Dodajem link</b>","");
          $nick = getnick_uid(1);
          echo "<p align=\"center\"><b>Pre nego sto postavis tvoj link obrati se Adminu </b><br/> <a href=\"index.php?action=viewuser&amp;who=1&amp;sid=$sid\">srecnici</a><br/><br/></p>";
          //////ALL LISTS SCRIPT <<
          
              if($page=="" || $page<=0)$page=1;
              $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_links"));
              $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;
          
          echo "<p align=\"left\">";
              
                $query = mysql_query("SELECT url, title,uid,description FROM lib3rtymrc_links");
          while ($links = mysql_fetch_array($query)) 
          
          {
          if(isonline($links[2]))
            {
              $iml = "<img src=\"http://coding-talk.com/images/onl.gif\" alt=\"+\"/>";
              
            }else{
              $iml = "<img src=\"http://coding-talk.com/images/ofl.gif\" alt=\"-\"/>";
            }
          
          $tlnick = getnick_uid($links[2]);
          $vulnk = "$iml<a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$links[2]\">$tlnick</a>";
             $link = "$vulnk: ~ <a href=\"$links[0]\">$links[1]</a>~<b>$links[3]</b> ";
          
          if (isowner(getuid_sid($sid)))
             {
             $del = "<a href=\"modproc.php?action=linkdel&amp;sid=$sid&amp;link=$links[0]\">[X]</a>";
             }
             echo "$link $del<br/>";
          }
          echo "</p>";
          
          echo "<p align=\"center\">";
          
          if($page>1)
              {
                $ppage = $page-1;
                echo "<br/><br/><a href=\"index.php?action=links&amp;page=$ppage&amp;sid=$sid&amp;tid=$tid\">«Nazad</a> ";
              }
              if($page<$num_pages)
              {
                $npage = $page+1;
                echo "<br/><a href=\"index.php?action=links&amp;page=$npage&amp;sid=$sid&amp;tid=$tid\">Napred»</a>";
              }
              echo "<br/><br/><br/>$page/$num_pages<br/><br/>";
              if($num_pages>2)
              {
                $rets = "Strana<input name=\"pg\" format=\"*N\" size=\"3\"/>";
                  $rets .= "<anchor>IDI";
                  $rets .= "<go href=\"index.php\" method=\"get\">";
                  $rets .= "<postfield name=\"action\" value=\"$action\"/>";
                  $rets .= "<postfield name=\"tid\" value=\"$tid\"/>";
                  $rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
                  $rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
                  $rets .= "</go></anchor>";
          
                  echo $rets;
              }
          
           //echo "<br/>";   
          //if(ismod(getuid_sid($sid)))
            {
            echo "<a href=\"index.php?action=addlink&amp;sid=$sid\">Dodaj Link</a><br/>";
            }
              echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>HAPPY</a>";
            echo "</p>";
              echo "</card>";
          }
          //////////////////////////Add link//////////////////////////
          
          else if($action=="addlinks")
          {
            echo "<card id=\"main\" title=\"Add link\">";
            echo "<p align=\"center\">";
            $url = $_POST["url"];
            $title = $_POST["title"];
          $description= $_POST["description"];
          
          $uid = getuid_sid($sid);
          
            echo $site;
            $res=mysql_query("INSERT INTO lib3rtymrc_links SET url='".$url."', title='".$title."',uid=$uid,description='".$description."'");
          
            if($res)
            {
            echo mysql_error();
            echo "<img src=\"../images/ok.gif\" alt=\"O\"/>Link $title  je uspesno dodat<br/>";
            }else{
            echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Greska u dodavanju Linka<br/>";
            }
            echo "<br/>";
            echo "<a href=\"index.php?action=links&amp;sid=$sid\">Linkovi</a><br/>";
            //echo "<a href=\"admincp.php?action=admincp&amp;sid=$sid\"><img src=\"../images/admn.gif\" alt=\"\"/>Admin Panel</a><br/>";
            echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>HAPPY</a>";
            echo "</p></card>";
            }
          
          ///////////////// Dodaj link
          else if($action=="addlink")
          {
              echo "<card id=\"main\" title=\"Add link\">";
              echo "<p align=\"center\">";
              echo "Unesi url adresu linka<br/>";
              echo "<b>Url</b><br/>";
              echo "<input name=\"url\" value=\"http://\"/><br/>";
          
              echo "<b>Naziv linka</b><br/>";
              echo "<input name=\"title\"/><br/>";
          echo "<b>Opis linka</b><br/>";
              echo "<input name=\"description\"/><br/>";
          
          
              echo "<br/><anchor>Add l Link";
              echo "<go href=\"index.php?action=addlinks&amp;sid=$sid\" method=\"post\">";
              echo "<postfield name=\"url\" value=\"$(url)\"/>";
              echo "<postfield name=\"title\" value=\"$(title)\"/>";
               echo "<postfield name=\"description\" value=\"$(description)\"/>";
          
              echo "</go>";
              echo "</anchor>";
              echo "</p>";
              echo "<p align=\"center\">";
            echo "<a href=\"index.php?action=links&amp;sid=$sid\">Linkovi</a><br/>";
           // echo "<a href=\"admincp.php?action=admincp&amp;sid=$sid\"><img src=\"../images/admn.gif\" alt=\"\"/>Admin panel</a><br/>";
            echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>HAPPY</a>";
            echo "</p>";
              echo "</card>";
          }
          sql
          Code:
          CREATE TABLE `lib3rtymrc_links` (
            `id` int(10) NOT NULL AUTO_INCREMENT,
            `url` varchar(255) NOT NULL DEFAULT '',
            `title` varchar(255) NOT NULL DEFAULT '',
            `uid` tinyint(30) NOT NULL,
            `description` varchar(200) NOT NULL,
            PRIMARY KEY (`id`),
            UNIQUE KEY `url` (`url`)
          ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
          
          
          --
          -- Dumping data for table `lib3rtymrc_links`

          I resolve the problem I changed the SQL table `uid` tinyint (30) Not Null,
          the uid `int (10) Not Null,
          It was ok, cod works perfectly and in wml and html
          Last edited by srecnica; 05.04.09, 14:31.
          sigpichttp://happy.srecnica.com/web

          Comment

          Working...
          X