Prse Error, Unexpected $end

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

    Prse Error, Unexpected $end

    i get this error in my script

    Code:
    parse error, unexpected $end in C:\Program Files\EasyPHP 2.0b1\www\lyrics\upload\index.php on line 347
    here's line 347

    Code:
    include 'template.php';

    #2
    i get this error in my script

    Code:
    parse error, unexpected $end in C:\Program Files\EasyPHP 2.0b1\www\lyrics\upload\index.php on line 347
    here's line 347

    Code:
    include 'template.php';
    [/b]
    upload the index.php here and we will help

    Comment


      #3
      Code:
      <?php
      error_reporting(E_ALL);
      
      function main()
      {
          global $youtube;
          $db = new mysql();
          $lyric_str="";
          if(isset($_REQUEST["lyric_id"]) && ($_REQUEST["lyric_id"] != 0 ))
          {
              $lyric_id = $_REQUEST["lyric_id"];
              $lyric_str = " `lyric_id` = ".$lyric_id;
          }
          if(!isset($_REQUEST["lyric_id"]) && !isset($_REQUEST["do"]))
          {
      ?>
      <table width="100%" cellpadding="0px" cellspacing="0px" border="0px">
      <tr height="49px">
      <td colspan="2" class="poemhead">[b]News[/b]</td>
      </tr>
      </table>
      <?
              $rows = $db->easy_get_rows("SELECT * FROM news ORDER BY news_date DESC limit 4");
              foreach($rows as $mysql_array)
              {
      ?>
      <div class="news_frame" id="news_id#<?=$mysql_array[&#39;news_id&#39;];?>">
          <div class="news_title"><?=$mysql_array[&#39;news_title&#39;];?> posted on: <?=$mysql_array[&#39;news_date&#39;];?></div>
          <div class="news_content"><?=$mysql_array[&#39;news_text&#39;];?></div>
      </div>
      <?
              }
          }
          if(count($_POST) != 0)
          {
              $lyric = $_REQUEST["lyric"];
              $score = $_REQUEST["score"];
              $lyric_id = $_REQUEST["lyric_id"];
      //        $db = new mysql();
      //        $db->query("UPDATE `lyrics` SET `score` = `score` + ".$score.", `no_of_ratings` = `no_of_ratings` + 1 WHERE `lyric_id`= ".$lyric_id);
              $affected_rows = mysqlQuery("UPDATE `lyrics` SET `score` = `score` + ".$score.", `no_of_ratings` = `no_of_ratings` + 1 WHERE `lyric_id`= ".$lyric_id);
      //        $affected_rows = $db->num_rows();
              if($affected_rows == 1)
              {
                  echo "Thanks for rating this lyric";
              }else
              {
                  echo "Unable to complete operation, Please try again";
              }
              $lyric_str = "";
              if(isset($_REQUEST["lyric_id"]) && ($_REQUEST["lyric_id"] != 0 ))
              {
                  $lyric = 1;
                  $lyric_id = $_REQUEST["lyric_id"];
                  $lyric_str = "`lyric_id` = ".$lyric_id;
              }
          }
          if(isset($_REQUEST["lyric_id"]) && ($_REQUEST["lyric_id"] != 0 ))
          {
      //        if (isset($_SESSION["view$lyric_id"]) && $_SESSION["view$lyric_id"]==TRUE)
      //        {
                  $db = new mysql;
                  $db->query("UPDATE `lyrics` SET `views` = `views` + 1 WHERE `lyric_id` = ".$lyric_id);
      //            $_SESSION["view".$lyric_id] = TRUE;
      //        }
              $mysql_array = $db->easy_get_row("SELECT * FROM `lyrics` WHERE $lyric_str AND `approved` = &#39;1&#39;");
              $lyric = $mysql_array;
              $num_rows = $db->num_rows();
                  if ($num_rows == 1)
              {
      ?>
      <table width="100%" cellpadding="0px" cellspacing="0px" border="0px">
      <tr height="49px">
      <td colspan="2" class="poemhead">[b]<?=$mysql_array[&#39;lyric_artist&#39;]?>[/b] - <?=$mysql_array[&#39;lyric_title&#39;]?>   <?php
      function curPage1()
      {
          $url = "http://www.$_SERVER[SERVER_NAME]/printf.php";
      
          if (isset($_SERVER[&#39;QUERY_STRING&#39;]) AND !empty($_SERVER[&#39;QUERY_STRING&#39;]))
          {
              $url .= "?$_SERVER[QUERY_STRING]";
          }
          return $url;
      }
      ?>
        [url="print/<?php echo preg_replace(&#39;/([^a-zA-Z0-9]+)/&#39;, &#39;-&#39;, $mysql_array[&#39;lyric_artist&#39;])."].html" target="_blank">[img]/images/icon_print_page.gif[/img][/url] <a href="/print/<?php echo preg_replace(&#39;/([^a-zA-Z0-9]+)/&#39;, &#39;-&#39;, $mysql_array[&#39;lyric_artist&#39;])."/".$mysql_array[&#39;lyric_id&#39;]."-".preg_replace(&#39;/([^a-zA-Z0-9]+)/&#39;, &#39;-&#39;, $mysql_array[&#39;lyric_title&#39;]) ?>.html" target="_blank">Printer friendly page 
      
      </a>
      </td>
      </tr>
      </table>
      <div class="news_frame">
      <div class="bookmarks">
        
      
        
          <?php
      function curPage()
      {
          $url = "http://$_SERVER[SERVER_NAME]$_SERVER[SCRIPT_NAME]";
      
          if (isset($_SERVER[&#39;QUERY_STRING&#39;]) AND !empty($_SERVER[&#39;QUERY_STRING&#39;]))
          {
              $url .= "?$_SERVER[QUERY_STRING]";
          }
          return $url;
      }
      function create_link($artist, $title, $id)
      {
          return "http://www.yourdomain.com/".preg_replace(&#39;/([^a-zA-Z0-9]+)/&#39;, &#39;-&#39;, $artist)."/".$id."-".preg_replace(&#39;/([^a-zA-Z0-9]+)/&#39;, &#39;-&#39;, $title).".html";
      }
      $link = create_link($mysql_array[&#39;lyric_artist&#39;], $mysql_array[&#39;lyric_title&#39;], $mysql_array[&#39;lyric_id&#39;]);
      ?>
      Add to: | [url="http://del.icio.us/post?url=<?php echo $link ?>;title=Exciting new lyrics and videos!"][img]/images/delicious.png[/img][/url][url="http://del.icio.us/post?url=<?php echo $link ?>;title=Exciting new lyrics and videos!"][/url] [url="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=<?php echo $link ?>&amp;title=Exciting new lyrics and videos!"][img]/images/google.png.jpg[/img][/url] [url="http://www.furl.net/storeIt.jsp?u=<?php echo $link ?>&t=Exciting+new+lyrics+and+videos!"][img]/images/furl.png[/img][/url] [url="http://www.netscape.com/submit/?U=<?php echo $link ?>&T=Exciting new lyrics and videos!"][img]/images/netscape.gif[/img][/url] [url="http://www.newsvine.com/_tools/seed&amp;save?u=<?php echo $link ?>&amp;h=Exciting new lyrics and videos!"][img]/images/newsvine.png[/img][/url] [url="http://www.rawsugar.com/tagger/?turl=<?php echo $link ?>&tttl=Exciting new lyrics and videos! "][img]/images/rawsugar.png[/img][/url] [url="http://reddit.com/submiturl=<?php echo $link ?>&amp;title=Exciting new lyrics and videos!"][img]/images/reddit.png[/img][/url] [url="http://www.squidoo.com/lensmaster/bookmark?<?php echo $link ?>&title=Exciting new lyrics and videos!"][img]/images/squidoo.png[/img][/url] [url="http://www.stumbleupon.com/submit?url=<?php echo $link ?>&title=Exciting new lyrics and videos!"][img]/images/stumbled.png.gif[/img][/url] [url="http://technorati.com/faves?add=<?php echo $link ?>"][img]/images/technorati.png[/img][/url] [url="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=<?php echo $link ?>&t=Exciting%20new%20lyrics%20and%20videos!"][img]/images/yahoo.png[/img][/url]
      
      [url="/taf.php"][img]/images/taf.png[/img][/url][url="/taf.php"]Tell a Friend[/url]
      
      
        </p>
        </div>
      <?php
              }
              else
              {
                  echo &#39;Query did not do what we wanted it to do, sorry&#39;;
              }
              $trunc_lyric= nl2br($mysql_array[&#39;lyric_text&#39;]);
              echo $trunc_lyric;
      ?>
      <div>
      
        <?=$mysql_array[&#39;views&#39;] ?> have viewed this page!
      
      </div>
              <form name="form1" method="post" action="http://www.yourdomain.com/index.php">
              <table width="100%" border="0">
              <tr> 
              <td class="maintablestyle">
                  [b]
                  
                Rate This Song ( <?
                  $score = $mysql_array[&#39;score&#39;];
                  $rating = $mysql_array[&#39;no_of_ratings&#39;];
                  $score_out_of_five = ceil($score/$rating);
                  for($i=1;$i<=5;$i++)
                  {
                      if ($i <= $score_out_of_five)
                      {
                      echo &#39;[img]/images/star1.gif[/img]&#39;;
                      }
                      else
                      {
                      echo &#39;[img]/images/star2.gif[/img]&#39;;
                      }
                  }
                  ?>)[/b]
                  <input name="lyric_id" type="hidden" id="lyric_id" value="<?=$lyric_id; ?>"> 
                  <input name="lyric" type="hidden" id="lyric" value="<?=$lyric; ?>">
              </td>
              <td>
                  <select name="score" id="score" class="form_select">
      <?
                  for($i=1;$i<=10;$i++)
                  {
                  echo "<option value=\"$i\">$i</option>\r\n";
                  }
      ?>
                  </select>
              </td>
              <td>
                  <input type="submit" name="Submit2" value="Rate" class="form_button" />
              </td>
              </tr>
              </table>
              </form>
      
      <?
              function formatDate($val)
              {
                  list($date, $time) = explode(" ", $val);
                  list($year, $month, $day) = explode("-", $date);
                  list($hour, $minute, $second) = explode (":", $time);
                  return date("l, m.j.y @ H:ia", mktime($hour, $minute, $second, $month, $day, $year));
              }
              $db = new mysql;
              $mysql_comment_array = $db->easy_get_rows( "SELECT * FROM comments WHERE comment_lyricid=&#39;$lyric_id&#39; ORDER BY comment_date" );
              $num_rows = $db->num_rows();
              if($num_rows >= 1)
              {
              echo "[list]";
                  for ($i = 0; $i<$num_rows; $i++)
                  {
      //                echo "$i";
                      echo "[*]".$mysql_comment_array[$i][&#39;comment_name&#39;].":
      ".$mysql_comment_array[$i][&#39;comment_text&#39;]."
      ";
                  }
      //            foreach($mysql_comment_array as $row)
      //            {
      //            echo "[*]".$row[&#39;comment_name&#39;]."[*]".$row[&#39;comment_text&#39;]."";
      //            }
              echo "[/list]";
              }
              else
              {
                  echo &#39;No comments.&#39;;
              }
              if(strlen($mysql_array[&#39;youtube&#39;]) >= 6)
              {
                  $youtube = $mysql_array[&#39;youtube&#39;];
              }else
              {
                  $youtubesearchquery = str_replace(" ", "+", $lyric[1]." ".$lyric[4]);
                  $gg = "http://youtube.com/results?search_query=".$youtubesearchquery."&search=";
                  $a = file_get_contents($gg);
                  if(preg_match("/<a class=\"newvtitlelink\" href=\"(.*?)\" rel=\"nofollow\"/s", $a,$matches))
                  {
                      if($matches>0)
                      {
                          $b = file_get_contents("http://youtube.com".$matches[1]);
                      }
                      preg_match("/<input name=\"embed_code\" type=\"text\" value=\&#39;(.*?)\&#39; class=\"vidURLField\"/s", $b,$matches);
                      if (count($matches)>0)
                      {
                          $youtube=$matches[1];
                          $db->query("UPDATE `lyrics` SET `youtube` = &#39;$youtube&#39; where lyric_id =&#39;$lyric_id&#39;" );
                      }
                      else 
                      {
                          $youtube = "Embedding Disabled";
                      }
                  }
                  else
                  {
                      $youtube = "No video avaible";
                  }
              }
              if (isset($_SESSION["regged"]) && $_SESSION["regged"])
              {
                  
              
      ?>
      <div id="submitcomment" class="submitcomment"><form name="submitcomment" method="post" action="http://www.yourdomain.com/submitcomment.php">
        <table width="100%">
          <tr>
          <td><input name="url" class="topinput" id="url" tabindex="3" value="homepage" /></td>
          </tr>
          <tr valign="top">
          <td>
          <textarea tabindex="4" id="message" name="message" rows="10" cols="50" class="form">type your message here</textarea></td>
          </tr>
          <tr>
          <td><input type="submit" name="post" value="Submit Comment" class="form_button" />
      </td>
          </tr>
          </table>
          <input type="hidden" name="lyricurl" value="index.php?lyric_id=<?php echo $lyric_id;?>" />
          <input type="hidden" name="lyricid" value="<?php echo $lyric_id;?>" />
          </form>
        </div>
      </div>
      <?
              }
          }
          if(isset($_REQUEST["do"]) && ($_REQUEST["do"] =="list" )) 
          {
              if(!isset($_REQUEST["start"]))
              {
                  $start = 0;
              }
              else
              {
                  $start = $_REQUEST["start"];
              }
              $eu = ($start - 0); 
              $limit = 20;
              $this1 = $eu + $limit; 
              $back = $eu - $limit; 
              $next = $eu + $limit; 
      
              $db = new mysql;
              $db->query( "select approved from lyrics where approved=&#39;1&#39;" );
              $nume=$db->num_rows();
      ?>
              <table class="listing">
              <tr>
              <td>[url="&#39;index.php?do=list&column_name=lyric_id&#39;>Id</a></td>
              <td><a"]Artist[/url]</td>
              <td>[url="&#39;index.php?do=list&column_name=lyric_title&#39;>Title</a></td>
              <td><a"]Score[/url]</td>
              <td><a href=&#39;index.php?do=list&column_name=views&#39;>Views</a></td></tr>
      <?
              $query = "SELECT * FROM `lyrics` where approved=&#39;1&#39;";
              if(isset($_REQUEST["column_name"]) and strlen($_REQUEST["column_name"])>0)
              {
                  $query = $query . " order by $_REQUEST[column_name]";
              }
              $query = $query. " limit $eu, $limit ";
              $result = $db->easy_get_rows($query);
              foreach($result as $row)
              {
      ?>
              <tr>
              <td>[url="index.php?lyric_id=<?=$row[&#39;lyric_id&#39;]?>"]<?=$row[&#39;lyric_id&#39;]?>[/url]</td>
              <td>[url="index.php?lyric_id=<?=$row[&#39;lyric_id&#39;]?>"]<?=$row[&#39;lyric_artist&#39;]?>[/url]</td>
              <td>[url="index.php?lyric_id=<?=$row[&#39;lyric_id&#39;]?>"]<?=$row[&#39;lyric_title&#39;]?>[/url]</td> 
              <td>[url="index.php?lyric_id=<?=$row[&#39;lyric_id&#39;]?>"]<?=$row[&#39;score&#39;]?>[/url]</td>
              <td>[url="index.php?lyric_id=<?=$row[&#39;lyric_id&#39;]?>"]<?=$row[&#39;views&#39;]?>[/url]</td>
              </tr>
      <?
              }
              if (isset($_request["column_name"]) and strlen($_request["column_name"])>0)
              {
                  $column_name = $_request["column_name"];
              }
              else
              {
                  $column_name = &#39;lyric_id&#39;;
              }
              echo "</table>";
              echo "<table><tr><td>[url="&#39;index.php?do=list&start=0&column_name=$column_name&#39;><font"]First</font>[/url]</td><td>";
              if($back >=0) 
              { 
                  echo "[url="&#39;index.php?do=list&start=$back&column_name=$column_name&#39;><font"]&lt;&lt; previous</font>[/url]"; 
              } 
              echo "</td><td>";
              $i=0;
              $l=1;
              $maxpage = ceil($nume/$limit);
              $page = ceil($eu/$limit)+1;
              echo "Page $page of $maxpage";
      
      //        for($i=0;$i < $maxpage;$i=$i+$limit)
      //        {
      //            if($i <> $eu)
      //            {
      //            echo " <a href=&#39;index.php?do=list&start=$i&column_name=$column_name&#39;>$l</a> ";
      //            }
      //            else
      //            {
      //                echo "$l";
      //            }
      //            $l=$l+1;
      //        }
      
              echo "</td><td>";
              if($this1 < $nume)
              { 
                  echo "[url="&#39;index.php?do=list&start=$next&column_name=$column_name&#39;><font"]next &gt;&gt;</font>[/url]";
              } 
              $laststart = $nume-$limit;
              echo "</td><td>[url="&#39;index.php?do=list&start=$laststart&column_name=$column_name&#39;><font"]Last</font>[/url]</td></tr></table>";
          }
      }
      include &#39;template.php&#39;;
      ?>

      Comment


        #4
        looks like theres an error in ya template.php not index.php
        Want something coded email me at sales@webnwaphost.com for a prices.




        Comment


          #5
          here&#39;s template.php

          Code:
          <?php
          $time_start = microtime(true);
          include_once "session.php";
          include_once "admin/config.php";
          include_once "mysql.class.php";
          $db = new mysql();
          $config = getConfig();
          $sessionId = session_id();
          //echo $sessionId;
          //echo session_is_registered(&#39;online&#39;);
          //echo session_is_registered(&#39;user_id&#39;);
          
          if(isset($_REQUEST["lyric_id"]))
          {
              $sorgu = $_REQUEST["lyric_id"];
              if(ereg("OR ",$sorgu) || ereg("INSERT",$sorgu) || ereg("DELETE",$sorgu) || ereg("SELECT",$sorgu) || ereg("DROP",$sorgu) || ereg("TRUNCATE",$sorgu))
                  die("TRYING TO HACK ME!!!");
          }
          
          $lyric_str="";
          if(isset($_REQUEST["lyric_id"]) && ($_REQUEST["lyric_id"] != 0 ))
          {
              $my_lyric_id = $_REQUEST["lyric_id"];
              $my_lyric_str = " `lyric_id` = ".$my_lyric_id;
              $my_mysql_array = $db->easy_get_row("SELECT * FROM `lyrics` WHERE $my_lyric_str AND `approved` = &#39;1&#39;");
              $my_lyric = $config[&#39;site_name&#39;] . " : " . $my_mysql_array[&#39;lyric_artist&#39;] . " - " . $my_mysql_array[&#39;lyric_title&#39;];
              $my_youtube = $my_mysql_array[&#39;youtube&#39;];
          }
          if(!isset($_REQUEST["lyric_id"]))
          {
              $my_lyric = $config[&#39;site_name&#39;];
          }
          
          if(isset($_REQUEST["youtube_id"])) {
            $user = "orcunyucel";
            $pattern = $my_youtube;
            $file = file_get_contents(&#39;http://www.youtube.com/profile?user=&#39;.$user);
            preg_match_all(&#39;!(watch\?v=[A-Za-z0-9]{11}).*?&#39;.$pattern.&#39;!&#39;, $file, $matches, PREG_PATTERN_ORDER);
            $titles = array_unique($matches[1]);
          
            foreach($titles as $title)
            {
              $page = file_get_contents(&#39;http://www.youtube.com/&#39;.$title);
              preg_match(&#39;!<title>(.*?)</title>!&#39;, $page, $matches);
          
              $title_text = $matches[1];
          
              preg_match(&#39;!video_id=.*&t=[^\"&]*!&#39;, $page, $matches);
              $video = &#39;http://youtube.com/get_video?&#39;.$matches[0];
          
              header("Location: $video");
            }
          }
          if (session_is_registered(&#39;user_id&#39;))
          {
          //    echo "1";
              $db->query( "UPDATE users_online SET activity=now(), member=&#39;y&#39; WHERE session_id=&#39;$sessionId&#39;" );
          }
          else if (session_is_registered(&#39;online&#39;))
          {
          //    echo "2";
              $db->query( "UPDATE users_online SET activity=now(), member=&#39;n&#39; WHERE session_id=&#39;$sessionId&#39;" );
          }
          else if (!isset($_SESSION[&#39;user_id&#39;]) && !session_is_registered(&#39;online&#39;))
          {
          //    echo "3";
              $db->query("INSERT INTO users_online (session_id, activity) VALUES (&#39;$sessionId&#39;, now())");
              session_register(&#39;online&#39;);
          }
          
          
          ?>
          
          <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
          <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
          <head>
          <script language="javascript" type="text/javascript">
          var win=null;
          function NewWindow(mypage,myname,w,h,scroll,pos){
          if(pos=="random"){LeftPosition=(screen.availWidth)?Math.floor(Math.random()*(screen.availWidth-w)):50;TopPosition=(screen.availHeight)?Math.floor(Math.random()*((screen.availHeight-h)-75)):50;}
          if(pos=="center"){LeftPosition=(screen.availWidth)?(screen.availWidth-w)/2:50;TopPosition=(screen.availHeight)?(screen.availHeight-h)/2:50;}
          if(pos=="default"){LeftPosition=50;TopPosition=50}
          else if((pos!="center" && pos!="random" && pos!="default") || pos==null){LeftPosition=0;TopPosition=20}
          settings=&#39;width=&#39;+w+&#39;,height=&#39;+h+&#39;,top=&#39;+TopPosition+&#39;,left=&#39;+LeftPosition+&#39;,scrollbars=&#39;+scroll+&#39;,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no&#39;;
          win=window.open(mypage,myname,settings);
          if(win.focus){win.focus();}}
          function CloseNewWin(){if(win!=null && win.open)win.close()}
          window.onfocus=CloseNewWin;
          // -->
          </script>
          <title><?=$my_lyric?></title>
          <meta http-equiv=&#39;Content-Type&#39; content=&#39;text/html; charset=utf-8&#39;>
          <link href="http://www.yourdomain.com/style.css" type="text/css" rel="stylesheet">
          <script src="http://www.yourdomain.com/javascript.js" type="text/javascript"></script>
          </head>
          <body>
              <div id="headerNavigation">
              <div id="headerNavigationLeft">
                  [url="http://www.yourdomain.com/faq.php"]FAQ[/url]| [url="http://www.yourdomain.com/searchform.php"]Advanced Search[/url] | [url="http://www.yourdomain.com/contactus.php"]Contact us[/url]    </div>
              <?php
              if (isset($_SESSION["user_id"]) && isset($_SESSION["username"]))
              {
              echo &#39;<div id="headerNavigationRight">&#39;;
              echo &#39;[url="http://www.yourdomain.com/changepassword.php"]Change Password[/url][url="http://www.yourdomain.com/submitlyric.php"]Submit a lyric[/url]&#39;;
              $userId = $_SESSION["user_id"];
              $mysql_array = $db->easy_get_row("SELECT email_addr FROM members WHERE member_id=&#39;$userId&#39;");
              $email_addr = $mysql_array[&#39;email_addr&#39;];
              $subsbriber = checkIfSubscribed($email_addr);
                  if ($subsbriber != "0")
                  {
                      echo &#39;[url="www://www.yourdomain.com/subscribe.php?subscribe=no&email_id=&#39;.$email_addr.&#39;"]Unsubscribe[/url]&#39;;
                  }
                  else
                  {
                      echo &#39;[url="http://www.yourdomain.com/subscribe.php?subscribe=yes&email_id=&#39;.$email_addr.&#39;"]Subscribe[/url]&#39;;
                  }
              echo &#39;[url="http://www.yourdomain.com/logout.php"]Logout[/url]</div>&#39;;
              }
              else
              {
          ?>
                  <div id="headerNavigationRightForm">
                  <form action="http://www.yourdomain.com/login.php" id="login_form" onsubmit="return validate();">
                  [url="http://www.yourdomain.com/signup.php"]Register[/url]
                  | [url="http://www.yourdomain.com/forgotpassword.php"]Forgotten Password?[/url]
                  <input type="text" name="username" id="username" value="" class="topinput" />
                  <input type="password" name="userpassword" id="userpassword" value="" class="topinput" />
                  <input type="submit" class="topsubmit" value="" />
                  </form>
                  </div>
          <?
              }
          ?>
              </div>
              <div class="topdiv">
              <table cellpadding="0" cellspacing="0" style="width:100%; border:none;">
              <tr>
              <td style="width:31%;">
              [url="http://www.yourdomain.com/index.php"][img]http://www.yourdomain.com/images/main_logo.jpg[/img][/url]
              </td>
              <td style="width:69%;">
          <?
              $mysql_array = $db->easy_get_row( "SELECT * FROM ads WHERE ad_active=&#39;yes&#39; and ad_position=&#39;2&#39; ORDER BY RAND() LIMIT 0,1" );
              echo $mysql_array[&#39;ad_text&#39;];
          ?> 
              </td>
              </tr>
              </table>
              </div>
              
              <div class="topdiv">
              <div id="topNavigation">
              [list]
              [*][url="http://www.yourdomain.com/index.php"][img]http://www.yourdomain.com/images/home.jpg[/img][/url][url="http://www.yourdomain.com/list.html"][img]http://www.yourdomain.com/images/lyrics.jpg[/img][/url][url="http://www.yourdomain.com/submitlyric.php"][img]http://www.yourdomain.com/images/submit.jpg[/img][/url][url="http://www.yourdomain.com/requestlyric.php"][img]http://www.yourdomain.com/images/request.jpg[/img][/url][url="#"][img]http://www.yourdomain.com/images/forum.jpg[/img][/url]
              [/list]
              </div>
          <?php
              if(isset($_REQUEST["msg"]) && $_REQUEST[&#39;msg&#39;] != "")
              {
                  echo &#39;<div id="msg">&#39;.$_REQUEST[&#39;msg&#39;]."</div>";
              }
              echo &#39;<div id="abc">[list]&#39;;
                  for ($i = 65; $i <= 90; $i++)
                  {
                      $x = chr($i);
                      echo "<li onmouseover=\"this.style.backgroundColor=&#39;#C7F241&#39;;\" onmouseout=\"this.style.backgroundColor=&#39;#1e1e1e&#39;;\"><a href=\"http://www.yourdomain.com/search/".$x.".html\">".$x."</a>";
                  }
          ?>
              [/list]
              </div>
              </div>
              
              <div id="container">
              <table border="0" cellpadding="0" cellspacing="0">
                
              <tr>
              <td width="120" height="600" valign="top" style="width:120px;">
                <?php
              $mysql_array = $db->easy_get_row( "SELECT * FROM ads WHERE ad_active=&#39;yes&#39; and ad_position=&#39;1&#39; ORDER BY RAND() LIMIT 0,1" );
              echo $mysql_array[&#39;ad_text&#39;];
          ?>    </td>
              <td rowspan="2" valign="top">
                  <div id="containerLeft">
                  <? main(); ?>
                  </div>    </td>
              
              <td rowspan="2" valign="top">
                  <div id="containerRight">
                    <div>
          <?php
                  if (!empty($youtube))
                  {
          ?>
                          [img]http://www.yourdomain.com/images/video.jpg[/img]
                          <div style="clear:both; width: 290px; height: 235px; border: 2px solid #92b527;">
                              <div class="youtube_resizer" style="text-align:center;">
          <?php
                              $ids = explode(&#39;|&#39;, file_get_contents(&#39;frontpage.cache&#39;));
                              foreach($ids as $id)
                              {
                              $rows[] = $db->easy_get_row(&#39;SELECT * FROM `lyrics` WHERE `lyric_id` = &#39;.$id);
                              }
                              $youtube = str_replace(&#39; width="425" height="350"&#39;, &#39; width="290" height="235"&#39;, $youtube);
                              echo $youtube;
          ?>
                          </div>
                      </div>
                      [img]http://www.yourdomain.com/images/bottom.jpg[/img]
          <?php 
          
                  if($youtube == "No video avaible" || $youtube == "Embedding Disabled")
                  {
                  }
                  else
                  {
                  $my_youtube_url = (strip_tags($my_youtube, &#39;<embed>&#39;));
                  $unneeded = array(&#39;<embed src="&#39;,&#39;" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed>&#39;);
                  $onlyconsonants = str_replace($unneeded, "", $my_youtube_url);
                  $my_youtube_url_array = explode("/", $onlyconsonants);
                  require_once("youtube.php");
                  error_reporting(0);
                  ini_set("max_execution_time",0);
                  $my_youtube_link = "http://www.youtube.com/watch.php?v=" . $my_youtube_url_array[&#39;4&#39;];
          
                  if($my_cek = download_youtube($my_youtube_link)){
                      $my_link = $my_cek;
          ?>
                  <div align="center">[url="<?php echo $my_link; ?>"][img]http://www.yourdomain.com/images/download.jpg[/img][/url][url="http://www.yourdomain.com/convert.php"][img]http://www.yourdomain.com/images/convert.gif[/img][/url]
          
          </div>
          <?php
                  }
          
                  } 
          
          
                  }
          ?>
                   </div>
                      <div>
                      [img]http://www.yourdomain.com/images/search.jpg[/img]
                      <div style="padding:10px 0px 0px 0px; margin:0px; text-align:center;">
                      <form id="" method="post" action="http://www.yourdomain.com/searchresult.php">
                      <input type="text" name="keyword" id="keyword" class="topinput" style="width: 120px;">
                      <select name="for" class="form_select">
                      <option value="2">Artists</option>
                      <option value="1">Song Tittle</option>
                      </select>
                      <input type="submit" name="Submit" class="form_button" value="Search" />
                      </form>
                      </div>
                      [img]http://www.yourdomain.com/images/bottom.jpg[/img]        </div>
                  <div>
          <?
                  if(empty($youtube))
                  {
          ?>
                      [img]http://www.yourdomain.com/images/videos.jpg[/img]
                      <div style="clear: both; width: 290px; height: 235px; border: 2px solid #92b527">
                          <div class="youtube_resizer style=text-align:center;">
          <?
          /*                $ids = explode(&#39;|&#39;, file_get_contents(&#39;frontpage.cache&#39;));
                          foreach($ids as $id)
                          {
                          $abc = $db->easy_get_row(&#39;SELECT * FROM `lyrics` WHERE `lyric_id` = &#39;.$id);
                              if($abc[&#39;youtube&#39;] != "" && (!isset($ytv)))
                              {
                                  $ytv = $abc[&#39;youtube&#39;];
                              }
                          $rows[] = $abc;
                          }
           */
                          $abc = $db->easy_get_row(&#39;SELECT youtube FROM `lyrics` WHERE `approved` = 1 AND youtube != "" ORDER BY `lyric_id` DESC LIMIT 0,1&#39;);
                          $ytv = $abc[&#39;youtube&#39;];
                          $bodytag = str_replace(&#39; width="425" height="350"&#39;, &#39; width="290" height="235"&#39;, $ytv);
                          echo $bodytag;
          ?>
                          </div>
                      </div>
                      [img]http://www.yourdomain.com/images/bottom.jpg[/img]
          <?
                  }
          ?>
                  </div>
                  <div>
                      [img]http://www.yourdomain.com/images/lat_lyrics.jpg[/img]
                      <table style="width:296px; border:none;" cellpadding="0" cellspacing="0">
                      <tbody class="lyrics">
          
          <?
                      $rows = $db->easy_get_rows( "select lyric_id, lyric_artist, lyric_title from lyrics WHERE approved=&#39;1&#39; order by lyric_id desc LIMIT 10" );
                      foreach($rows as $mysql_array)
                      {
          ?>
                      <tr> 
                      <td style="background-color:#010101;">
                      [url="http://www.yourdomain.com/<?php echo preg_replace(&#39;/([^a-zA-Z0-9]+)/&#39;, &#39;-&#39;, $mysql_array["]">[b]<?=$mysql_array["lyric_artist"]?>[/b] - <?=$mysql_array["lyric_title"]?>[/url]</td>
                      </tr>
          <?
                      }
          ?>
                      </tbody>
                      </table>
                      [img]http://www.yourdomain.com/images/bottom.jpg[/img]        </div>
                  <div>
                      [img]http://www.yourdomain.com/images/lat_members.jpg[/img]
          <?
                      $array = $db->easy_get_rows( "select member_id, user_name from members order by member_id desc LIMIT 5" );
                      $num_rows = $db->num_rows();
                      if($num_rows >= 1)
                      {
                          foreach($array as $mysql_array)
                          {
          ?>
                          <table style="width:296px; border:none;" cellpadding="0px" cellspacing="0px" class="members">
                          <tr>
                          <td style="background-color:#010101;"><?=$mysql_array["user_name"]?></td>
                          </tr>
                          </table>
          <?
                          }
                      }
                      else
                      {
                          echo &#39;No members in database.&#39;;
                      }
          ?>
                      [img]http://www.yourdomain.com/images/bottom.jpg[/img]        </div>
              </div>    </td>
              <td width="120" valign="top" style="width:120px;">
                <?
              $mysql_array = $db->easy_get_row( "SELECT * FROM ads WHERE ad_active=&#39;yes&#39; and ad_position=&#39;3&#39; ORDER BY RAND() LIMIT 0,1" );
              echo $mysql_array[&#39;ad_text&#39;];
          ?>    </td>
              </tr>
          
              </table>
              </div>
              <div style="background-color: #8ca63b; border-top: 1px solid #c6f241; border-bottom: 1px solid #c6f241;">
                  <div id="footerNavigation">
                  <table style="width:745px; text-align:center; border:none; background:#8ca63b;" cellpadding="0px" cellspacing="0px">
                  <tr>
                  <td style="width:149px; padding-top: 10px; text-align:center;">
                      <table style="width:140px; border:none;" cellpadding="0px" cellspacing="0px">
                      <tbody class="bottomtab">
                      <tr>
                      <th>Navigation</th>
                      </tr>
                      <tr>
                      <td class="bottom_navigation">[url="http://www.yourdomain.com/index.php"]Home[/url]</td>
                      </tr>
                      <tr>
                      <td class="bottom_navigation">[url="http://www.yourdomain.com/list.html"]Lyrics[/url]</td>
                      </tr>
                      <tr>
                      <td class="bottom_navigation">[url="http://www.yourdomain.com/submitlyric.php"]Submit Lyrics[/url]</td>
                      </tr>
                      <tr>
                      <td class="bottom_navigation">[url="http://www.yourdomain.com/requestlyric.php"]Request Lyrics[/url]</td>
                      </tr>
                      <tr>
                      <td class="bottom_navigation">[url=""]Forums[/url]</td>
                      </tr>
                      </tbody>
                      </table>
                  </td>
                  <td style="width:149px; padding-top:10px; text-align:center; vertical-align:top;">
                      <table style="width:140px; border:none;" cellpadding="0px" cellspacing="0px">
          <?php
          $db->query("SELECT SQL_CALC_FOUND_ROWS `approved` FROM `lyrics` WHERE `approved` = 1 LIMIT 0,1");
          $approved = $db->easy_get_row(&#39;SELECT FOUND_ROWS();&#39;);
          $lyrics_count = $approved[0];
          
          $db->query("SELECT SQL_CALC_FOUND_ROWS `approved` FROM `lyrics` WHERE `approved` = 0 LIMIT 0,1");
          $approved = $db->easy_get_row(&#39;SELECT FOUND_ROWS();&#39;);
          $lyrics_count_unapproved = $approved[0];
          
          
          $db->query("SELECT SQL_CALC_FOUND_ROWS `member_id` FROM `members` LIMIT 0,1");
          $abcde = $db->easy_get_row(&#39;SELECT FOUND_ROWS();&#39;);
          $members_count = $abcde[0];
          ?>
                      <tbody class="bottomtab">
                      <tr>
                      <th>Stats</th>
                      </tr>
                      <tr>
                      <td><?="Total lyrics: ".$lyrics_count."
          "?></td>
                      </tr>
                      <tr>
                      <td><?="Unapproved lyrics: ".$lyrics_count_unapproved; ?></td>
                      </tr>
                      <tr>
                      <td style="border:none;"><?php echo "Total members: $members_count
          "; ?></td>
                      </tr>
                      </tbody>
                      </table>
                  </td>
                  <td style="width:149px; padding-top: 10px; text-align:center; vertical-align:top;">
                      <table style="width:140px; border:none;" cellpadding="0px" cellspacing="0px">
          <?php
          $limit_time = time() - 300;
          //echo $limit_time;
          $db->query( "SELECT member FROM users_online WHERE UNIX_TIMESTAMP(activity) >= $limit_time AND member=&#39;n&#39;" );
          $visits = $db->num_rows();
          
          $db->query( "SELECT member FROM users_online WHERE UNIX_TIMESTAMP(activity) >= $limit_time AND member=&#39;y&#39;" );
          $members = $db->num_rows();
          ?>
                      <tbody class="bottomtab">
                      <tr>
                      <th>Users online</th>
                      </tr>
                      <tr>
                      <td>Guests Online: <?=$visits?>
          </td>
                      </tr>
                      <tr>
                      <td style="border:none;">Members Online: <?=$members?>
          </td>
                      </tr>
                      </tbody>
                      </table>
                  </td>
                  <td></td>
                  </tr>
                  <tr>
                  <td colspan="5"></td>
                  </tr>
                  </table>
                  </div>
              </div>
              <div style="background-color: #303a12; height: 25px;">
                  <div class="topdiv">
                      <div class="topleft" style="color:#707f42;">
                      Powered by: Lyricing, 2007&copy; |  | RSS            </div>
                      <div class="topright" style="margin-top:5px; color:#707f42;">
                      Page generated in <?$time_end = microtime(); $time = $time_end - $time_start; echo $time;?>
                      seconds  </div>
                  </div>
              </div>
          </body>
          </html>

          Comment


            #6
            Code:
            <?php
            $time_start = microtime(true);
            include_once "session.php";
            include_once "admin/config.php";
            include_once "mysql.class.php";
            $db = new mysql();
            $config = getConfig();
            $sessionId = session_id();
            //echo $sessionId;
            //echo session_is_registered(&#39;online&#39;);
            //echo session_is_registered(&#39;user_id&#39;);
            
            if(isset($_REQUEST["lyric_id"]))
            {
                $sorgu = $_REQUEST["lyric_id"];
                if(ereg("OR ",$sorgu) || ereg("INSERT",$sorgu) || ereg("DELETE",$sorgu) || ereg("SELECT",$sorgu) || ereg("DROP",$sorgu) || ereg("TRUNCATE",$sorgu))
                    die("TRYING TO HACK ME!!!");
            }
            
            $lyric_str="";
            if(isset($_REQUEST["lyric_id"]) && ($_REQUEST["lyric_id"] != 0 ))
            {
                $my_lyric_id = $_REQUEST["lyric_id"];
                $my_lyric_str = " `lyric_id` = ".$my_lyric_id;
                $my_mysql_array = $db->easy_get_row("SELECT * FROM `lyrics` WHERE $my_lyric_str AND `approved` = &#39;1&#39;");
                $my_lyric = $config[&#39;site_name&#39;] . " : " . $my_mysql_array[&#39;lyric_artist&#39;] . " - " . $my_mysql_array[&#39;lyric_title&#39;];
                $my_youtube = $my_mysql_array[&#39;youtube&#39;];
            }
            if(!isset($_REQUEST["lyric_id"]))
            {
                $my_lyric = $config[&#39;site_name&#39;];
            }
            
            if(isset($_REQUEST["youtube_id"])) {
              $user = "orcunyucel";
              $pattern = $my_youtube;
              $file = file_get_contents(&#39;http://www.youtube.com/profile?user=&#39;.$user);
              preg_match_all(&#39;!(watch\?v=[A-Za-z0-9]{11}).*?&#39;.$pattern.&#39;!&#39;, $file, $matches, PREG_PATTERN_ORDER);
              $titles = array_unique($matches[1]);
            
              foreach($titles as $title)
              {
                $page = file_get_contents(&#39;http://www.youtube.com/&#39;.$title);
                preg_match(&#39;!<title>(.*?)</title>!&#39;, $page, $matches);
            
                $title_text = $matches[1];
            
                preg_match(&#39;!video_id=.*&t=[^\"&]*!&#39;, $page, $matches);
                $video = &#39;http://youtube.com/get_video?&#39;.$matches[0];
            
                header("Location: $video");
              }
            }
            if (session_is_registered(&#39;user_id&#39;))
            {
            //    echo "1";
                $db->query( "UPDATE users_online SET activity=now(), member=&#39;y&#39; WHERE session_id=&#39;$sessionId&#39;" );
            }
            else if (session_is_registered(&#39;online&#39;))
            {
            //    echo "2";
                $db->query( "UPDATE users_online SET activity=now(), member=&#39;n&#39; WHERE session_id=&#39;$sessionId&#39;" );
            }
            else if (!isset($_SESSION[&#39;user_id&#39;]) && !session_is_registered(&#39;online&#39;))
            {
            //    echo "3";
                $db->query("INSERT INTO users_online (session_id, activity) VALUES (&#39;$sessionId&#39;, now())");
                session_register(&#39;online&#39;);
            }
            
            
            ?>
            
            <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
            <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
            <head>
            <script language="javascript" type="text/javascript">
            var win=null;
            function NewWindow(mypage,myname,w,h,scroll,pos){
            if(pos=="random"){LeftPosition=(screen.availWidth)?Math.floor(Math.random()*(screen.availWidth-w)):50;TopPosition=(screen.availHeight)?Math.floor(Math.random()*((screen.availHeight-h)-75)):50;}
            if(pos=="center"){LeftPosition=(screen.availWidth)?(screen.availWidth-w)/2:50;TopPosition=(screen.availHeight)?(screen.availHeight-h)/2:50;}
            if(pos=="default"){LeftPosition=50;TopPosition=50}
            else if((pos!="center" && pos!="random" && pos!="default") || pos==null){LeftPosition=0;TopPosition=20}
            settings=&#39;width=&#39;+w+&#39;,height=&#39;+h+&#39;,top=&#39;+TopPosition+&#39;,left=&#39;+LeftPosition+&#39;,scrollbars=&#39;+scroll+&#39;,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no&#39;;
            win=window.open(mypage,myname,settings);
            if(win.focus){win.focus();}}
            function CloseNewWin(){if(win!=null && win.open)win.close()}
            window.onfocus=CloseNewWin;
            // -->
            </script>
            <title><?=$my_lyric?></title>
            <meta http-equiv=&#39;Content-Type&#39; content=&#39;text/html; charset=utf-8&#39;>
            <link href="http://www.yourdomain.com/style.css" type="text/css" rel="stylesheet">
            <script src="http://www.yourdomain.com/javascript.js" type="text/javascript"></script>
            </head>
            <body>
                <div id="headerNavigation">
                <div id="headerNavigationLeft">
                    [url="http://www.yourdomain.com/faq.php"]FAQ[/url]| [url="http://www.yourdomain.com/searchform.php"]Advanced Search[/url] | [url="http://www.yourdomain.com/contactus.php"]Contact us[/url]    </div>
                <?php
                if (isset($_SESSION["user_id"]) && isset($_SESSION["username"]))
                {
                echo &#39;<div id="headerNavigationRight">&#39;;
                echo &#39;[url="http://www.yourdomain.com/changepassword.php"]Change Password[/url][url="http://www.yourdomain.com/submitlyric.php"]Submit a lyric[/url]&#39;;
                $userId = $_SESSION["user_id"];
                $mysql_array = $db->easy_get_row("SELECT email_addr FROM members WHERE member_id=&#39;$userId&#39;");
                $email_addr = $mysql_array[&#39;email_addr&#39;];
                $subsbriber = checkIfSubscribed($email_addr);
                    if ($subsbriber != "0")
                    {
                        echo &#39;[url="www://www.yourdomain.com/subscribe.php?subscribe=no&email_id=&#39;.$email_addr.&#39;"]Unsubscribe[/url]&#39;;
                    }
                    else
                    {
                        echo &#39;[url="http://www.yourdomain.com/subscribe.php?subscribe=yes&email_id=&#39;.$email_addr.&#39;"]Subscribe[/url]&#39;;
                    }
                echo &#39;[url="http://www.yourdomain.com/logout.php"]Logout[/url]</div>&#39;;
                }
                else
                {
            ?>
                    <div id="headerNavigationRightForm">
                    <form action="http://www.yourdomain.com/login.php" id="login_form" onsubmit="return validate();">
                    [url="http://www.yourdomain.com/signup.php"]Register[/url]
                    | [url="http://www.yourdomain.com/forgotpassword.php"]Forgotten Password?[/url]
                    <input type="text" name="username" id="username" value="" class="topinput" />
                    <input type="password" name="userpassword" id="userpassword" value="" class="topinput" />
                    <input type="submit" class="topsubmit" value="" />
                    </form>
                    </div>
            <?
                }
            ?>
                </div>
                <div class="topdiv">
                <table cellpadding="0" cellspacing="0" style="width:100%; border:none;">
                <tr>
                <td style="width:31%;">
                [url="http://www.yourdomain.com/index.php"][img]http://www.yourdomain.com/images/main_logo.jpg[/img][/url]
                </td>
                <td style="width:69%;">
            <?
                $mysql_array = $db->easy_get_row( "SELECT * FROM ads WHERE ad_active=&#39;yes&#39; and ad_position=&#39;2&#39; ORDER BY RAND() LIMIT 0,1" );
                echo $mysql_array[&#39;ad_text&#39;];
            ?>
                </td>
                </tr>
                </table>
                </div>
                
                <div class="topdiv">
                <div id="topNavigation">
                [list]
                [*][url="http://www.yourdomain.com/index.php"][img]http://www.yourdomain.com/images/home.jpg[/img][/url][url="http://www.yourdomain.com/list.html"][img]http://www.yourdomain.com/images/lyrics.jpg[/img][/url][url="http://www.yourdomain.com/submitlyric.php"][img]http://www.yourdomain.com/images/submit.jpg[/img][/url][url="http://www.yourdomain.com/requestlyric.php"][img]http://www.yourdomain.com/images/request.jpg[/img][/url][url="#"][img]http://www.yourdomain.com/images/forum.jpg[/img][/url]
                [/list]
                </div>
            <?php
                if(isset($_REQUEST["msg"]) && $_REQUEST[&#39;msg&#39;] != "")
                {
                    echo &#39;<div id="msg">&#39;.$_REQUEST[&#39;msg&#39;]."</div>";
                }
                echo &#39;<div id="abc">[list]&#39;;
                    for ($i = 65; $i <= 90; $i++)
                    {
                        $x = chr($i);
                        echo "<li onmouseover=\"this.style.backgroundColor=&#39;#C7F241&#39;;\" onmouseout=\"this.style.backgroundColor=&#39;#1e1e1e&#39;;\"><a href=\"http://www.yourdomain.com/search/".$x.".html\">".$x."</a>";
                    }
            ?>
                [/list]
                </div>
                </div>
                
                <div id="container">
                <table border="0" cellpadding="0" cellspacing="0">
                  
                <tr>
                <td width="120" height="600" valign="top" style="width:120px;">
                  <?php
                $mysql_array = $db->easy_get_row( "SELECT * FROM ads WHERE ad_active=&#39;yes&#39; and ad_position=&#39;1&#39; ORDER BY RAND() LIMIT 0,1" );
                echo $mysql_array[&#39;ad_text&#39;];
            ?>    </td>
                <td rowspan="2" valign="top">
                    <div id="containerLeft">
                    <? main(); ?>
                    </div>    </td>
                
                <td rowspan="2" valign="top">
                    <div id="containerRight">
                      <div>
            <?php
                    if (!empty($youtube))
                    {
            ?>
                            [img]http://www.yourdomain.com/images/video.jpg[/img]
                            <div style="clear:both; width: 290px; height: 235px; border: 2px solid #92b527;">
                                <div class="youtube_resizer" style="text-align:center;">
            <?php
                                $ids = explode(&#39;|&#39;, file_get_contents(&#39;frontpage.cache&#39;));
                                foreach($ids as $id)
                                {
                                $rows[] = $db->easy_get_row(&#39;SELECT * FROM `lyrics` WHERE `lyric_id` = &#39;.$id);
                                }
                                $youtube = str_replace(&#39; width="425" height="350"&#39;, &#39; width="290" height="235"&#39;, $youtube);
                                echo $youtube;
            ?>
                            </div>
                        </div>
                        [img]http://www.yourdomain.com/images/bottom.jpg[/img]
            <?php
            
                    if($youtube == "No video avaible" || $youtube == "Embedding Disabled")
                    {
                    }
                    else
                    {
                    $my_youtube_url = (strip_tags($my_youtube, &#39;<embed>&#39;));
                    $unneeded = array(&#39;<embed src="&#39;,&#39;" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed>&#39;);
                    $onlyconsonants = str_replace($unneeded, "", $my_youtube_url);
                    $my_youtube_url_array = explode("/", $onlyconsonants);
                    require_once("youtube.php");
                    error_reporting(0);
                    ini_set("max_execution_time",0);
                    $my_youtube_link = "http://www.youtube.com/watch.php?v=" . $my_youtube_url_array[&#39;4&#39;];
            
                    if($my_cek = download_youtube($my_youtube_link)){
                        $my_link = $my_cek;
            ?>
                    <div align="center">[url="<?php echo $my_link; ?>"][img]http://www.yourdomain.com/images/download.jpg[/img][/url][url="http://www.yourdomain.com/convert.php"][img]http://www.yourdomain.com/images/convert.gif[/img][/url]
            
            </div>
            <?php
                    }
            
                    }
            
            
                    }
            ?>
                     </div>
                        <div>
                        [img]http://www.yourdomain.com/images/search.jpg[/img]
                        <div style="padding:10px 0px 0px 0px; margin:0px; text-align:center;">
                        <form id="" method="post" action="http://www.yourdomain.com/searchresult.php">
                        <input type="text" name="keyword" id="keyword" class="topinput" style="width: 120px;">
                        <select name="for" class="form_select">
                        <option value="2">Artists</option>
                        <option value="1">Song Tittle</option>
                        </select>
                        <input type="submit" name="Submit" class="form_button" value="Search" />
                        </form>
                        </div>
                        [img]http://www.yourdomain.com/images/bottom.jpg[/img]        </div>
                    <div>
            <?
                    if(empty($youtube))
                    {
            ?>
                        [img]http://www.yourdomain.com/images/videos.jpg[/img]
                        <div style="clear: both; width: 290px; height: 235px; border: 2px solid #92b527">
                            <div class="youtube_resizer style=text-align:center;">
            <?
            /*                $ids = explode(&#39;|&#39;, file_get_contents(&#39;frontpage.cache&#39;));
                            foreach($ids as $id)
                            {
                            $abc = $db->easy_get_row(&#39;SELECT * FROM `lyrics` WHERE `lyric_id` = &#39;.$id);
                                if($abc[&#39;youtube&#39;] != "" && (!isset($ytv)))
                                {
                                    $ytv = $abc[&#39;youtube&#39;];
                                }
                            $rows[] = $abc;
                            }
            */
                            $abc = $db->easy_get_row(&#39;SELECT youtube FROM `lyrics` WHERE `approved` = 1 AND youtube != "" ORDER BY `lyric_id` DESC LIMIT 0,1&#39;);
                            $ytv = $abc[&#39;youtube&#39;];
                            $bodytag = str_replace(&#39; width="425" height="350"&#39;, &#39; width="290" height="235"&#39;, $ytv);
                            echo $bodytag;
            ?>
                            </div>
                        </div>
                        [img]http://www.yourdomain.com/images/bottom.jpg[/img]
            <?
                    }
            ?>
                    </div>
                    <div>
                        [img]http://www.yourdomain.com/images/lat_lyrics.jpg[/img]
                        <table style="width:296px; border:none;" cellpadding="0" cellspacing="0">
                        <tbody class="lyrics">
            
            <?
                        $rows = $db->easy_get_rows( "select lyric_id, lyric_artist, lyric_title from lyrics WHERE approved=&#39;1&#39; order by lyric_id desc LIMIT 10" );
                        foreach($rows as $mysql_array)
                        {
            ?>
                        <tr>
                        <td style="background-color:#010101;">
                        [url="http://www.yourdomain.com/<?php echo preg_replace(&#39;/([^a-zA-Z0-9]+)/&#39;, &#39;-&#39;, $mysql_array["]">[b]<?=$mysql_array["lyric_artist"]?>[/b] - <?=$mysql_array["lyric_title"]?>[/url]</td>
                        </tr>
            <?
                        }
            ?>
                        </tbody>
                        </table>
                        [img]http://www.yourdomain.com/images/bottom.jpg[/img]        </div>
                    <div>
                        [img]http://www.yourdomain.com/images/lat_members.jpg[/img]
            <?
                        $array = $db->easy_get_rows( "select member_id, user_name from members order by member_id desc LIMIT 5" );
                        $num_rows = $db->num_rows();
                        if($num_rows >= 1)
                        {
                            foreach($array as $mysql_array)
                            {
            ?>
                            <table style="width:296px; border:none;" cellpadding="0px" cellspacing="0px" class="members">
                            <tr>
                            <td style="background-color:#010101;"><?=$mysql_array["user_name"]?></td>
                            </tr>
                            </table>
            <?
                            }
                        }
                        else
                        {
                            echo &#39;No members in database.&#39;;
                        }
            ?>
                        [img]http://www.yourdomain.com/images/bottom.jpg[/img]        </div>
                </div>    </td>
                <td width="120" valign="top" style="width:120px;">
                  <?
                $mysql_array = $db->easy_get_row( "SELECT * FROM ads WHERE ad_active=&#39;yes&#39; and ad_position=&#39;3&#39; ORDER BY RAND() LIMIT 0,1" );
                echo $mysql_array[&#39;ad_text&#39;];
                ?>
                </td>
                </tr>
            
                </table>
                </div>
                <div style="background-color: #8ca63b; border-top: 1px solid #c6f241; border-bottom: 1px solid #c6f241;">
                    <div id="footerNavigation">
                    <table style="width:745px; text-align:center; border:none; background:#8ca63b;" cellpadding="0px" cellspacing="0px">
                    <tr>
                    <td style="width:149px; padding-top: 10px; text-align:center;">
                        <table style="width:140px; border:none;" cellpadding="0px" cellspacing="0px">
                        <tbody class="bottomtab">
                        <tr>
                        <th>Navigation</th>
                        </tr>
                        <tr>
                        <td class="bottom_navigation">[url="http://www.yourdomain.com/index.php"]Home[/url]</td>
                        </tr>
                        <tr>
                        <td class="bottom_navigation">[url="http://www.yourdomain.com/list.html"]Lyrics[/url]</td>
                        </tr>
                        <tr>
                        <td class="bottom_navigation">[url="http://www.yourdomain.com/submitlyric.php"]Submit Lyrics[/url]</td>
                        </tr>
                        <tr>
                        <td class="bottom_navigation">[url="http://www.yourdomain.com/requestlyric.php"]Request Lyrics[/url]</td>
                        </tr>
                        <tr>
                        <td class="bottom_navigation">[url=""]Forums[/url]</td>
                        </tr>
                        </tbody>
                        </table>
                    </td>
                    <td style="width:149px; padding-top:10px; text-align:center; vertical-align:top;">
                        <table style="width:140px; border:none;" cellpadding="0px" cellspacing="0px">
                   <?php     
            $db->query("SELECT SQL_CALC_FOUND_ROWS `approved` FROM `lyrics` WHERE `approved` = 1 LIMIT 0,1");
            $approved = $db->easy_get_row(&#39;SELECT FOUND_ROWS();&#39;);
            $lyrics_count = $approved[0];
            
            $db->query("SELECT SQL_CALC_FOUND_ROWS `approved` FROM `lyrics` WHERE `approved` = 0 LIMIT 0,1");
            $approved = $db->easy_get_row(&#39;SELECT FOUND_ROWS();&#39;);
            $lyrics_count_unapproved = $approved[0];
            
            
            $db->query("SELECT SQL_CALC_FOUND_ROWS `member_id` FROM `members` LIMIT 0,1");
            $abcde = $db->easy_get_row(&#39;SELECT FOUND_ROWS();&#39;);
            $members_count = $abcde[0];
            ?>
                        <tbody class="bottomtab">
                        <tr>
                        <th>Stats</th>
                        </tr>
                        <tr>
                        <td><?="Total lyrics: ".$lyrics_count."
            "?></td>
                        </tr>
                        <tr>
                        <td><?="Unapproved lyrics: ".$lyrics_count_unapproved; ?></td>
                        </tr>
                        <tr>
                        <td style="border:none;"><?php echo "Total members: $members_count
            "; ?></td>
                        </tr>
                        </tbody>
                        </table>
                    </td>
                    <td style="width:149px; padding-top: 10px; text-align:center; vertical-align:top;">
                        <table style="width:140px; border:none;" cellpadding="0px" cellspacing="0px">
            <?php
            $limit_time = time() - 300;
            //echo $limit_time;
            $db->query( "SELECT member FROM users_online WHERE UNIX_TIMESTAMP(activity) >= $limit_time AND member=&#39;n&#39;" );
            $visits = $db->num_rows();
            
            $db->query( "SELECT member FROM users_online WHERE UNIX_TIMESTAMP(activity) >= $limit_time AND member=&#39;y&#39;" );
            $members = $db->num_rows();
            ?>
                        <tbody class="bottomtab">
                        <tr>
                        <th>Users online</th>
                        </tr>
                        <tr>
                        <td>Guests Online: <?=$visits?>
            </td>
                        </tr>
                        <tr>
                        <td style="border:none;">Members Online: <?=$members?>
            </td>
                        </tr>
                        </tbody>
                        </table>
                    </td>
                    <td></td>
                    </tr>
                    <tr>
                    <td colspan="5"></td>
                    </tr>
                    </table>
                    </div>
                </div>
                <div style="background-color: #303a12; height: 25px;">
                    <div class="topdiv">
                        <div class="topleft" style="color:#707f42;">
                        Powered by: Lyricing, 2007&copy; |  | RSS            </div>
                        <div class="topright" style="margin-top:5px; color:#707f42;">
                        Page generated in <?$time_end = microtime(); $time = $time_end - $time_start; echo $time;?>
                        seconds  </div>
                    </div>
                </div>
            </body>
            </html>
            That should work now, not 100% sure

            Comment

            Working...
            X