PHP - Internet Explorer Challenge...
Hi All!
First post here - I'm a bit of a self taught PHP junkie I'm having some issues with the following php/MySQL code. The issue is with Internet Explorer (surprise, surprise) I have setup an if statement so that the long description field in the form comes up as a text area (based on the max-length property of the mySQL field.), while the shorter fields come up as text fields. The issue is that in IE, none of the shorter fields preceding the Long Description Text Field show up - ie. the form is lacking a couple of necessary fields. Works perfectly well in Firefox. <form id="addprod" name="addprod" action="" method="get" enctype="multipart/form-data"> <?php require_once($_SERVER['DOCUMENT_ROOT'].'/resources/db/viewer_connect.php'); $table = 'products'; $fieldQuery = "SELECT * from $table"; $result = mysql_db_query($dbname,$fieldQuery) or die('<span class="body_text">Query Error: '.mysql_error().'</span>'); $i = 0; $prInfo = array('PROD_ID'=>'Product ID', 'PROD_NAME'=>'Product Name', 'PROD_DESC_SHORT'=>'Product Description (Short)', 'PROD_DESC_LONG'=>'Product Description (Long)', 'MODEL_1'=>'Model 1', 'MODEL_2'=>'Model 2', 'MODEL_3'=>'Model 3', 'MODEL_4'=>'Model 4', 'MODEL_5'=>'Model 5', 'RRP_1'=>'Model 1 RRP($)', 'RRP_2'=>'Model 2 RRP($)', 'RRP_3'=>'Model 3 RRP($)', 'RRP_4'=>'Model 4 RRP($)', 'RRP_5'=>'Model 5 RRP($)', 'PROD_IMG'=>'Main Image', 'IMAGE_2'=>'Image 2', 'IMAGE_3'=>'Image 3'); while ($i < mysql_num_fields($result)) { $meta = mysql_fetch_field($result, $i); if (!$meta) { echo "No information available<br />\n"; } if($meta->max_length<=256){ if($meta->name=='PROD_IMG'||$meta->name=='IMAGE_2'||$meta->name=='IMAGE_3'){ echo '<p class="body_text"><label for="'.$meta->name.'">'.$prInfo[$meta->name].':<input name="'.$meta->name.'" type="file" size="50" maxlength="'.$meta->max_length.'" /></label></p>'; } else{ echo '<p class="body_text"><label for="'.$meta->name.'">'.$prInfo[$meta->name].':<input name="'.$meta->name.'" type="text" size="50" maxlength="'.$meta->max_length.'" /></label></p>'; } } else{ echo '<p class="body_text" style="line-height:150px; vertical-align:top;"><label for="'.$meta->name.'">'.$prInfo[$meta->name].':<textarea name="'.$meta->name.'" cols="50" rows="10" /></p>'; } $i++; } mysql_free_result($result); ?> <p class="body_text"><input type="submit" value="Add New Record" /><input type="reset" value="Clear Form" /></p> </form> Any thoughts would be awesome!! Thanks in advance, Tim Similar TutorialsHi, as usual there is a problem ONLY with one browser... IE (any version). Please check the webpage & notice the space between the Header buttons. I can't find the PROBLEM!!! Please help!! Thanks in advance.. Well, my page contains a URL like file.php?userid=1&pass=passwordhashblablabla. I try to open the page on opera, mozilla, safari, google chrome and so browsers and it works fine. I get the message that id/pw match and user has logged in successfully. However, when I go to THE SAME url on IE, i get message that id/pw do not match. URL is still the same, history is cleaned... Thanks in advance. Hello... I'm working on a webpage (http://66.119.8.164/freedownloads.php) that pulls from an rss feed (http://www.moorelife.org/rss/FreeDownloads.xml). Please keep in mind that I'm working on content, not design. It's a very long page, currently. I want to have links on a sidebar that will allow sorting and filtering, based on <category>. I got the idea from, get this, Internet Explorer's built-in rss reader. It's great. I have a section of the page populating with SimpleXMLElement (that's where the case cover images and titles are). Above that is an alphabetic listing of all those entries populated by SimpleDOM's sortedXPath. Between those two are a few category links that use ajax to overwrite the section pulled with SimpleXMLElement. Now, I don't have any idea if I'm even doing this in an intelligent manner. As a matter of fact, I'm sure it's very far away from resourceful code. It's just what I have gotten to work when other options didn't work. Now, on to the problem. The code, below, is the php file (http://66.119.8.164/include/getrss.php) that ajax uses to overwrite the original list. Code: [Select] <?php //get the category from URL $category = $_GET["category"]; $xml = "http://www.moorelife.org/rss/FreeDownloads.xml"; $xmlDoc = new DOMDocument(); $xmlDoc->load($xml); $item = $xmlDoc->getElementsByTagName('item'); for ($i=0; $i<=5; $i++) { $item_title = $item->item($i)->getElementsByTagName('title')->item(0)->childNodes->item(0)->nodeValue; $item_category = $item->item($i)->getElementsByTagName('category')->item(0)->childNodes->item(0)->nodeValue; echo "<p>".$item_title."</p>"; echo "<p>".$item_category."</p>"; } ?> How do I only show the entries where $catagory match <category>? JJ Hi, I have a problem with Internet Explorer converting spaces into underscores: The problem occurs using PHPRtfLite. When I run the script I want the file name to contain spaces, however in Internet Explorer these spaces are converted into underscores. This does not happen in ff, chrome, safari or opera. Any help on how to fix this would be much appreciated as I am stuck. Thanks. Joe p.s. Here is how the file name is created $filename = "Mysite - ".$u-ID."' (".$user_name.").rtf"; This topic has been moved to HTML Help. http://www.phpfreaks.com/forums/index.php?topic=318213.0 Like many parents, I'm challenged with keeping my kids from browsing the evil parts of the internet. My son is 11 and my wife caught him deleting IE history the other day. The computer he uses is a Windows 8.1 laptop, and it is not Pro. How can i let him use internet explorer on his own user but keep him from tampering with any of the history ( or settings for that matter)? Is there a better solution? I found some internet history logging software online, but I didn't feel comfortable with the source, and fear it may contain viruses or other malware. Hello everyone, I'm new here first post, but there's a weirdness in code that i need to share, First of all, I know everyone who knows PHP/MYSQL will say the same thing... Server side code cannot be broken by a browser, especially by client side coding. I agree!!! That may be the case here too, but I have encountered one of the weirdest code ever and the client side code is causing an unexpected result in PHP/MYSQL, and only in Internet Explorer. Unexplainable, and I am seeking for an answer. After hours of trouble shooting I finally targeted the the trouble code... and it's CSS, and it's affecting a MYSQL line of code in PHP... #somediv { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=''); } ... anyways let me explain how the code should run and the problem... in one page a variable passed in the URL is being captured by PHP using the $_GET method, if that variable is empty PHP runs a code which updates a MYSQL database. That works fine, and as expected, except in INTERNET EXPLORER. On that same page, a css file which is to be included with the output html to the browser contains the above line of css too. Now in every other browser that code works as expected, if the variable is NOT empty, update the database and then output the html code. In IE the database gets updated no matter what, whether the variable is empty of not. Now the its only the mysql code inside the IF statement that get affected, because for troubleshooting purposes I have put echo statements inside the code, to catch the problem, and the echo statements work as should, just not the mysql update statement. Someone care to shed some light into this mystery? I have been banging my head for quite a number of hours on this.........I am getting the below error with firefox 7 or chrome but NOT with IE Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/unlockth/public_html/motorola/insertmoto.php on line 35 Here is the code.......pls can anyone help me? <?php $userip = ($_SERVER['X_FORWARDED_FOR']) ? $_SERVER['X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; $name = $_POST['name'] ; $email = $_POST['email'] ; $phone = $_POST['phone'] ; $operator = $_POST['operator'] ; $imei = $_POST['imei'] ; $todayis = date("l, F j, Y, g:i a") ; @mail( "xxx@xxx.com", "ORDER SUBMISSION", $message = " $userip $message = $todayis Name: $name Email: $email Phone Model: $phone Phone Operator: $operator Phone Imei: $imei", "From: MOTOROLA SUBMISSION>"); ?> <? $id = $_POST['id']; include "/home/unlockth/password.php"; mysql_select_db("unlockth_unlocking",$db); mysql_query("INSERT INTO custdetails VALUES ('','$name','$email','$phone','$operator','$imei')"); $insertid = mysql_insert_id(); include "/home/unlockth/password.php"; mysql_select_db("unlockth_unlocking",$db); $getdata = mysql_query("SELECT * FROM motorola WHERE id=$id", $db); $row = mysql_fetch_array($getdata); $title = $row["title"]; $price_1 = $row["price_1"]; $price_2 = $row["price_2"]; $price_3 = $row["price_3"]; $imageaddr = $row["imageaddr"]; $description = $row["description"]; $keywords = $row["keywords"]; $time = $row["time"]; include '/home/unlockth/public_html/motorola/outputmotocode.php';?> This topic has been moved to HTML Help. http://www.phpfreaks.com/forums/index.php?topic=346255.0 Hi, My code below only allows me to search exact terms and therefore does not allow for spelling mistakes of names etc. Please can somebody advise how I can alter the code below to allow a user to search part of the search criteria and still retrieve results e.g. a search for "business" would return "business analysis", "business architecture" and so on. Any help would be greatly appreciated. $sql="SELECT DISTINCT First_Name, Last_Name, l.Resource_ID FROM ((resource l inner join resource_skill ln on l.Resource_ID = ln.Resource_ID) inner join skill n on ln.Skill_ID = n.Skill_ID) WHERE First_Name LIKE '$fname' OR Last_Name LIKE '$lname' OR Skill_Name LIKE '$skill'"; Thanks a lot! Paul Hi guys,
I’d appreciate a little guidance but I’m gonna struggle to explain what the problem is first… so apologies in advance.
$drawOrder is an array of 1 to 10 letters that are drawn at random
Array
(
[101] => C
[102] => F
[103] => D
[104] => J
[105] => B
[106] => H
[107] => I
[108] => G
[109] => E
[110] => A
)
$bestOrder contains the same values as $drawOrder but the letters are given a priority.
Array
(
[0] => A
[1] => B
[2] => C
[3] => D
[4] => E
[5] => F
[6] => G
[7] => H
[8] => I
[9] => J
)
$bestPossibleOrder – I want this to contain the closest order possible to $bestOrder based on the draw order and 3 letter draw limit
Array
(
[101] => C
[103] => D
[105] => B
[102] => F
[106] => H
[108] => G
[109] => E
[110] => A
[107] => I
[104] => J
)
$availableLetters contains 3 letters that are drawn according to $drawOrder.
Array
(
[101] => C
[102] => F
[103] => D
)
add “[101] => C” to $bestPossibleOrder array
remove “[2] => C” from the $bestOrder array because the letters are not always unique
add “[104] => J “ to $availableLetters because it is next in the draw order.
Array
(
[102] => F
[103] => D
[104] => J
)
add “[103] => D” to my $bestPossibleOrder array
remove “[103] => D” from the $bestOrder array because the letters are not always unique
add “[102] => B“ to $availableLetters because it is next in the draw order.
Array
(
[102] => F
[104] => J
[102] => B
)
Repeat the process until all letters are in the $bestPossibleOrder array
Array
(
[101] => C
[103] => D
[105] => B
[102] => F
[106] => H
[108] => G
[109] => E
[110] => A
[107] => I
[104] => J
)
I’ve attached what I’ve written so far but I’m not sure if it’s a good approach
<?php $BR = "<br />"; echo "best order:" . $BR; $bestOrder = array("A","B","C","D","E","F","G","H","I","J"); print ("<pre>" . print_r($bestOrder, true) . "</pre>"); echo "draw order:" . $BR; $drawOrder = shuffle_assoc($bestOrder); $drawOrder = array_combine(range(101,(count($bestOrder)+100)),$drawOrder);// $drawOrder array keys have to start from 101 print ("<pre>" . print_r($drawOrder, true) . "</pre>"); echo "available Letters (FIRST DRAW):" . $BR; $availableLetters = array_slice($drawOrder, 0, 3,true); print ("<pre>" . print_r($availableLetters, true) . "</pre>"); $numberToPick = selectNextNumber($bestOrder,$availableLetters); echo "The key with the closest letter to best order is [" . $numberToPick . "]"; function selectNextNumber($bestOrder,$availableLetters){ for ($x = 0; $x <= count($bestOrder); $x++){ $numberToPick = array_search($bestOrder[$x], $availableLetters); if ($numberToPick !== false) { //unset($bestOrder[$x]); //print ("<pre>" . print_r($bestOrder, true) . "</pre>"); return $numberToPick; } } } function shuffle_assoc($list) { if (!is_array($list)) return $list; $keys = array_keys($list); shuffle($keys); $random = array(); foreach ($keys as $key) { $random[$key] = $list[$key]; } return $random; }
How effective is Captcha anymore? How does using Captcha compare to using a Challenge Question like "2 + 3 = ??" I am creating a form on my website where users can e-mail me their comments - although my e-mail is hidden - and I don't want this to become a spam-magnet?! Debbie Hey guys. Sorry to start asking questions being such a new member but this just suddenly came up. I have a php script that needs to send binary data to another php script via HTTP. The data can be transferred through the methods GET and POST, preferably POST and preferably not as a file. The problem is that I have tried a number of ways to do this but every time the data seems to be corrupted. Some bytes stay the same but others disappear or change. I guess that they transfer through ASCII mode instead of BINARY but couldn't find any way to fix this. Any help would be deeply appreciated. Cheers. Hi If any one has any spare time or is intrigued in any way. I am constructing a website forum like the one you use. This one requires a log on. It works in FF 6.0, Opera Safari and Chrome but not in IE 8.0. I have filled in the passwords(s) extra security. http://www.des-otoole.co.uk/streetangels/ Many thanks if you can work it out. You just need to push the button (login) LOL note the topic is a pun at Help Vampires... I actually have an unchallenging question. I'm trying to echo out a column in a MySQL table. I'm getting one field echoing, but not the others: I'm using this code style, but I've made a small mistake somewhere at the end, I've tried many combinations trying to fix it, but haven't succeeded.. $query = "select email from newsletters"; $result = mysql_query($query); $row = mysql_fetch_array($result); foreach ($row as $email) {echo $email;} I got the argument foreach() straight out of the manual and copied the syntax style exactly as was demonstrated in the example, but its still not working. What have I done wrong? Hi All Thanks in advance for your help. I want to have to following query string Type=myparam&Username=dazd&Password=nk98830&id=0&Cols_Returned=numfrom,sentdata But my code returns the following Type=myparam&Username=dazd&Password=nk98830&id=0&Cols_Returned=%2F%22numfrom%2F%22%2C%2F%22sentdata%2F%22 Below is the code: $data= array( "Type"=> "myparam", "Username" => "dazd", "Password" => "nk98830", "id" => "0", "Cols_Returned" => '/"numfrom/",/"sentdata/"' ) ; //This contains data that you will send to the server. $data = http_build_query($data); //builds the post string ready for posting echo "The Query String is "; echo $data; Regards i want to get all the domain name on the internet and put them into a database. is there a way to get this. I've got: Quote /A/index.html /A/1/index.listing /A/2/index.listing /A/3/index.listing In index.html, I've got the following PHP code: Quote <?php $files = glob('./*/*.listing'); foreach ($files as $file) { include $file; } ?> As you can see, what PHP code does is include()'s all the index.listing files. I then create a clone of the A directory and alter the HTML in the .listing files so can tell the difference between A & B when they render: Quote /B/index.html /B/1/index.listing /B/2/index.listing /B/3/index.listing The issue I am having is "/B/index.html" is ()including the .listing files from the /A/*/ directory, when it should be including them from the /B/*/ directory. I can't understand why this is happening and hoping someone could shed some light on the issue? Hi, I'm pretty new to PHP and though i had scrambled enough info together to build my self a nice little login system with my limited knowledge and my websites need and it worked great in Firefox and safari. Then a few weeks latter (still rather pleased with myself!) I check it out in explorer and it wont login if i put in the correct user and password or show a the error message if these were wrong. I have supplied the code below. Can anyone help explain why it doesn't work in ie? thanks in advance for anyone that has a look for me, cheers, here is the code. <?php session_start(); define("USERNAME", "chris"); define("PASSWORD", "chrislaff"); if (isset( $_POST["login"])) { login(); } elseif (isset( $_GET["action"]) and $_GET["action"] == "logout") { logout(); } elseif (isset($_SESSION["username"])) { displayPage(); } else { displayLoginForm(); } ?> <?php function login() { if ( isset( $_POST["username"] ) and isset( $_POST["password"] ) ) { if ( $_POST["username"] == USERNAME and $_POST["password"] == PASSWORD ) { $_SESSION["username"] = USERNAME; session_write_close(); header("Location: index.php"); } else { displayLoginForm( "Sorry, that username/password could not be found. Please try again." ); } } } ?> <?php function logout() { unset( $_SESSION["username"] ); session_write_close(); header( "Location: index.php" ); } ?> <?php function displayPage() { displayPageHeader(); ?> <div id="wrapper"> <div id="articleadmin"> <table style="width:970px;" > <tr> <th colspan="2"> <span class="green18">Articles</span> <a href="add_article_form.php?action=add"> [ADD] </a> </th> </tr> </style> <?php //connect to slt_database $db = mysql_connect('localhost', 'root', '') or die ('Unable to connect. Check your connection parameters.'); mysql_select_db('chrislafferty', $db) or die(mysql_error($db)); ?> <?php $query = 'SELECT * FROM chris_content ORDER BY content_id DESC'; $result = mysql_query($query, $db) or die (mysql_error($db)); $odd = true; while ($row = mysql_fetch_assoc($result)) { echo ($odd == true) ? ' <tr class="odd_row"> ' : ' <tr class="even_row"> '; $odd = !$odd; echo ' <td style="width:75%;">'; echo "<span class=blue12>" . 'title: ' . "</span>" . "<span class=grey14>" . $row['title']. "</span>" . '<br/>' . "<span class=blue12>" . 'Date: ' . "</span>" . "<span class=grey14>" . $row['date']. "</span>" . '<br/>' . "<span class=blue12>" . 'Article Type: ' . "</span>" . "<span class=grey14>" . $row['content_type'] . "</span>" . '<p/>'; echo '</td> <td align="center">'; echo ' <a href="edit_article_form.php?content_id=' . $row['content_id'] . '" > EDIT </a> '; echo "<span class=green18>" . ' | ' . "</span>"; echo '<a href="delete_article.php?content_id=' . $row['content_id'] . '"> DELETE </a> '; echo '</td> </tr> '; } ?> </table > </div> <!--article admin div ends--> </div> <!-- div wrapper ends --> </body> </html> <?php } function displayLoginForm( $message="" ) { displayPageHeader(); ?> <div id="loginwrapper"> <?php if ( $message ) echo '<p>' ."<span class='green12'>". $message ."</span>". '</p>' ?> <form method="post" action="index.php"> <table> <tr> <td> <p> <span class="blue12">Enter your username</span> </td> <td> <input id="username" name="username" type="text"/> </p> </td> </tr> <tr> <td> <p> <span class="blue12">Enter your password</span> </td> <td> <input id="password" name="password" type="password"/> </p> </td> </tr> <tr> <td> </td> <td> <p> <input type="image" img src="../images/submit.gif" name="login" id="submit" value="login"/> </p> </td> </tr> </table> </form> </div> <!--div wrapper ends --> </body> </html> <?php } function displayPageHeader() { ?> <!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>school magazine</title> <link rel="stylesheet" type="text/css" href="../styles.css"> <style type="text/css"> th { background-color: #FFFFFF;} .odd_row { background-color: #EAEAEA; } .even_row { background-color: #FFFFFF; } </style> </head> <body> <div id="logowrapper"> <div id="logo"><img src="../web_header.jpg" width="970" height="386"/></div> </div> <!--end of logo wrapper --> <div id="nav"> <div id="navwrapper"> <div id="navbutton1"><a href="../home.php">YOUR HOME</a></div> <div id="navbutton9"><a href="index.php?action=logout">LOGOUT</a></div> </div> <!-- end of navwrapper --> </div> <!-- end of nav div --> <?php } ?> Well this is my first time using icecast and I am a little lost. I have these two (three in a way) files that are all linked in a way. index.php > cast_info.php > status.xsl so here are the files: index.php Code: [Select] <?php require_once("cast_info.php"); ?> <table> <tr> <th colspan="2">Stats For Icecast Server: <?php echo $radio_info['title']; ?></th> </tr> <?php foreach($radio_info as $title => $data) { switch($title) { case 'now_playing' : ?><tr> <td><b><?php echo $title; ?></b></td> <td><?php echo $data['artist']; ?><br /> <?php echo $data['track']; ?> </td> </tr><?php break; case 'title' : //skip break; default : ?><tr> <td><?php echo $title; ?></td> <td><?php echo $data; ?></td> </tr><?php break; } } ?> </table> cast_info.php Code: [Select] <?php /* * Script Configurations */ $SERVER = 'http://grimradio.com:8000'; //$SERVER = 'http://localhost:8000'; //enter the URL to your Icecast server $STATS_FILE = '/status.xsl'; //enter the path to your status.xsl file (leave blank unless u know its different) //////////////////////////////////// END OF CONFIGURATION ----- DO NOT EDIT BELOW THIS LINE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ //get statistics file contents $fp = fopen($SERVER.$STATS_FILE,'r'); if(!$fp) { //error connecting to server! die("Unable to connect to Icecast server."); } $stats_file_contents = ''; while(!feof($fp)) { $stats_file_contents .= fread($fp,1024); } fclose($fp); //create array to store results for later usage $radio_info = array(); $radio_info['server'] = $SERVER; $radio_info['title'] = ''; $radio_info['description'] = ''; $radio_info['content_type'] = ''; $radio_info['mount_start'] = ''; $radio_info['bit_rate'] = ''; $radio_info['listeners'] = ''; $radio_info['most_listeners'] = ''; $radio_info['genre'] = ''; $radio_info['url'] = ''; $radio_info['now_playing'] = array(); $radio_info['now_playing']['artist'] = ''; $radio_info['now_playing']['track'] = ''; $temp = array(); //format results into array $search_for = "<td\s[^>]*class=\"streamdata\">(.*)<\/td>"; $search_td = array('<td class="streamdata">','</td>'); if(preg_match_all("/$search_for/siU",$stats_file_contents,$matches)) { foreach($matches[0] as $match) { $to_push = str_replace($search_td,'',$match); $to_push = trim($to_push); array_push($temp,$to_push); } } //build final array from temp array $radio_info['title'] = $temp[0]; $radio_info['description'] = $temp[1]; $radio_info['content_type'] = $temp[2]; $radio_info['mount_start'] = $temp[3]; $radio_info['bit_rate'] = $temp[4]; $radio_info['listeners'] = $temp[5]; $radio_info['most_listeners'] = $temp[6]; $radio_info['genre'] = $temp[7]; $radio_info['url'] = $temp[8]; //format now playing $now_playing = explode(" - ",$temp[9]); $radio_info['now_playing']['artist'] = $now_playing[0]; $radio_info['now_playing']['track'] = $now_playing[1]; ?> status.xsl Code: [Select] <xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version = "1.0" > <xsl:output omit-xml-declaration="no" method="html" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" indent="yes" encoding="UTF-8" /> <xsl:template match = "/icestats" > <html> <head> <title>Icecast Streaming Media Server</title> <link rel="stylesheet" type="text/css" href="style.css" /> </head> <body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0"> <h2>Icecast2 Status</h2> <br /> <!--index header menu --> <div class="roundcont"> <div class="roundtop"> <img src="/corner_topleft.jpg" class="corner" style="display: none" /> </div> <table border="0" width="100%" id="table1" cellspacing="0" cellpadding="4"> <tr> <td bgcolor="#656565"> <a class="nav" href="admin/">Administration</a> <a class="nav" href="status.xsl">Server Status</a> <a class="nav" href="server_version.xsl">Version</a></td> </tr> </table> <div class="roundbottom"> <img src="/corner_bottomleft.jpg" class="corner" style="display: none" /> </div> </div> <br /> <br /> <!--end index header menu --> <!--mount point stats--> <xsl:for-each select="source"> <xsl:choose> <xsl:when test="listeners"> <div class="roundcont"> <div class="roundtop"> <img src="/corner_topleft.jpg" class="corner" style="display: none" /> </div> <div class="newscontent"> <div class="streamheader"> <table cellspacing="0" cellpadding="0"> <colgroup align="left" /> <colgroup align="right" width="300" /> <tr> <td><h3>Mount Point <xsl:value-of select="@mount" /></h3></td> <xsl:choose> <xsl:when test="authenticator"> <td align="right"><a class="auth" href="/auth.xsl">Login</a></td> </xsl:when> <xsl:otherwise> <td align="right"> <a href="{@mount}.m3u">M3U</a> <a href="{@mount}.xspf">XSPF</a></td> </xsl:otherwise> </xsl:choose> </tr></table> </div> <table border="0" cellpadding="4"> <xsl:if test="server_name"> <tr><td>Stream Title:</td><td class="streamdata"> <xsl:value-of select="server_name" /></td></tr> </xsl:if> <xsl:if test="server_description"> <tr><td>Stream Description:</td><td class="streamdata"> <xsl:value-of select="server_description" /></td></tr> </xsl:if> <xsl:if test="server_type"> <tr><td>Content Type:</td><td class="streamdata"><xsl:value-of select="server_type" /></td></tr> </xsl:if> <xsl:if test="stream_start"> <tr><td>Mount started:</td><td class="streamdata"><xsl:value-of select="stream_start" /></td></tr> </xsl:if> <xsl:if test="bitrate"> <tr><td>Bitrate:</td><td class="streamdata"> <xsl:value-of select="bitrate" /></td></tr> </xsl:if> <xsl:if test="quality"> <tr><td>Quality:</td><td class="streamdata"> <xsl:value-of select="quality" /></td></tr> </xsl:if> <xsl:if test="video_quality"> <tr><td>Video Quality:</td><td class="streamdata"> <xsl:value-of select="video_quality" /></td></tr> </xsl:if> <xsl:if test="frame_size"> <tr><td>Framesize:</td><td class="streamdata"> <xsl:value-of select="frame_size" /></td></tr> </xsl:if> <xsl:if test="frame_rate"> <tr><td>Framerate:</td><td class="streamdata"> <xsl:value-of select="frame_rate" /></td></tr> </xsl:if> <xsl:if test="listeners"> <tr><td>Current Listeners:</td><td class="streamdata"> <xsl:value-of select="listeners" /></td></tr> </xsl:if> <xsl:if test="listener_peak"> <tr><td>Peak Listeners:</td><td class="streamdata"> <xsl:value-of select="listener_peak" /></td></tr> </xsl:if> <xsl:if test="genre"> <tr><td>Stream Gen </td><td class="streamdata"> <xsl:value-of select="genre" /></td></tr> </xsl:if> <xsl:if test="server_url"> <tr><td>Stream URL:</td><td class="streamdata"> <a target="_blank" href="{server_url}"><xsl:value-of select="server_url" /></a></td></tr> </xsl:if> <tr><td>Current Song:</td><td class="streamdata"> <xsl:if test="artist"><xsl:value-of select="artist" /> - </xsl:if><xsl:value-of select="title" /></td></tr> </table> </div> <div class="roundbottom"> <img src="/corner_bottomleft.jpg" class="corner" style="display: none" /> </div> </div> <br /> <br /> </xsl:when> <xsl:otherwise> <h3><xsl:value-of select="@mount" /> - Not Connected</h3> </xsl:otherwise> </xsl:choose> </xsl:for-each> <xsl:text disable-output-escaping="yes">&</xsl:text>nbsp; <div class="poster">Support icecast development at <a class="nav" target="_blank" href="http://www.icecast.org">www.icecast.org</a></div> </body> </html> </xsl:template> </xsl:stylesheet> now what the problem is, is that it won't display the "now playing" info. not sure exactly where the error might be, but I am sure it has to do with that array. you can view what does display here http://grimradio.com/ |