maluku102 Posted August 24, 2012 at 02:33 AM Report Share #473326 Posted August 24, 2012 at 02:33 AM Boas, queria saber como faço um sistema frame, mostro um exemplo na imagem seguinte: http://img713.imageshack.us/img713/8951/frameq.png Tipo ja tentei fazer com out.php e server.php que criei mas nao consegui deixo o out.php e server.php, para me ajudarem out.php <?php // Check if the ID was submitted, AND if it is numeric (a number) if (isset($_GET['id']) && is_numeric($_GET['id'])) { // Connect to our database require_once('mysql_connect.php'); $id = mysql_real_escape_string($_GET['id']); // Add 1 to the sites hits $query = "UPDATE websites SET hits = hits + 1 WHERE id = $id"; $result = mysql_query($query) OR die(mysql_error()); unset($query); unset($result); $query = "SELECT id, url FROM websites WHERE id = $id"; $result = mysql_query($query) OR die(mysql_error()); $row = mysql_fetch_array($result, MYSQL_ASSOC); $num = mysql_num_rows($result); $url = $row['url']; if ($num > 0) { header ("Refresh: 0; url=server.php?id=$id"); } else { echo '<font color="red">This site does not exist.</font>'; } } else { echo '<font color="red">You need to select a site to visit!</font>'; } ?> server.php // onde tentei criar o farme <?php // Check if the ID was submitted, AND if it is numeric (a number) if (isset($_GET['id']) && is_numeric($_GET['id'])) { // Connect to our database require_once('mysql_connect.php'); $id = mysql_real_escape_string($_GET['id']); unset($query); unset($result); $query = "SELECT id, url FROM websites WHERE id = $id"; $result = mysql_query($query) OR die(mysql_error()); $row = mysql_fetch_array($result, MYSQL_ASSOC); $num = mysql_num_rows($result); $url = $row['url']; ?> <?php while ($row = mysql_fetch_array($result)) { ?> <frameset rows="46,*" cols="*" framespacing="0" frameborder="no" border="0"> <frame src="teste.php" name="topFrame" scrolling="No" id="topFrame" title="topFrame" /> <frame src="$url" name="mainFrame" id="mainFrame" title="mainFrame" /> </frameset> <?php } } ?> Link to comment Share on other sites More sharing options...
dmaciel Posted August 24, 2012 at 02:55 AM Report Share #473328 Posted August 24, 2012 at 02:55 AM (edited) Boas amigo, será isto que pertendes: http://imageshack.us/photo/my-images/33/70429610.png/ Se sim deixo-te o código: Index.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <frameset rows="90,*" cols="*" framespacing="0" frameborder="no" border="0"> <frame src="player.php" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" title="topFrame" /> <frame src="site.php" name="mainFrame" id="mainFrame" title="mainFrame" /> </frameset> <noframes><body> </body></noframes> </html> Site.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <style type="text/css"> body,td,th { color: #FFF; } body { background-color: #000; } </style> </head> <body> <h1>O meu site </h1> </body> </html> player.php <style type="text/css"> body { background-color: #333; width:100$; } </style> <table width="100%" border="0"> <tr> <td align="center"><object classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" width="420" height="60" align="absmiddle" id="WindowsMediaPlayer1"> <param name="URL" ref value="http://O teu ip aqui"> <param name="rate" value="1"> <param name="balance" value="1"> <param name="currentPosition" value="0"> <param name="defaultFrame" value="0"> <param name="playCount" value="1"> <param name="autoStart" value="-1"> <param name="currentMarker" value="0"> <param name="invokeURLs" value="-1"> <param name="volume" value="100"> <param name="mute" value="0"> <param name="uiMode" value="mini"> <param name="stretchToFit" value="0"> <param name="windowlessVideo" value="-1"> <param name="enabled" value="-1"> <param name="enableContextMenu" value="-1"> <param name="fullScreen" value="0"> <embed src="http://83.98.245.39:8000/" width="100%" height="60" align="absmiddle" type="application/x-mplayer2" name="MediaPlayer"> <param name="baseURL" value> <param name="SAMIStyle" value> <param name="SAMILang" value> <param name="SAMIFilename" value> <param name="captioningID" value> <param name="enableErrorDialogs" value="0"> </object></td> </tr> </table> Edited August 24, 2012 at 03:22 AM by dmaciel Link to comment Share on other sites More sharing options...
maluku102 Posted August 24, 2012 at 04:58 AM Author Report Share #473329 Posted August 24, 2012 at 04:58 AM tem a ver um pouco com isso, mas neste caso não Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now