Jump to content

thirteen13

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

thirteen13's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. First of all thanks for the replies I may have to upload different flash banners for different pages. So it is not practical the way you did it. I need the PHP and SQL to carry out the same transactions as my original code.
  2. The value which $row["value"] gets is: assets/files/banner.swf Any idea?
  3. I have tried your suggestion. My snippet now looks like this: <div id="banner"> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="746" height="235"> <param name="movie" value="<?php echo htmlspecialchars($row["value"]); ?>" /> <param name="quality" value="high" /> <embed src="<?php echo htmlspecialchars($row["value"]); ?>" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="746" height="235"></embed> </object> </div> but it still shows the same error as before
  4. Hi I have the following script: <?php $table = 'web_site_content'; $tableVars = 'web_site_tmplvar_contentvalues'; $id = $modx->documentObject['id']; $sql = "Select * from $tableVars where contentid = $id and tmplvarid = 2"; $result = $modx->db->query($sql); if($row = $modx->db->getRow($result)) { ?> <div id="banner"> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="746" height="235"> <param name="movie" value="<?php echo $row["value"]; ?>" /> <param name="quality" value="high" /> <embed src="<?php echo $row["value"]; ?>" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="746" height="235"></embed> </object> </div> <?php } else { $sql = "Select * from $tableVars where contentid = $id and tmplvarid = 1"; $result = $modx->db->query($sql); if($row = $modx->db->getRow($result)) { echo'<div id="banner"><img src="'.$row["value"].'" width="746" height="235" /></div>'; } } ?> Basically it checks whether there is a flash banner uploaded and loads it into a div. If there isn't a flash banner uploaded then it loads the image. The image loads without a problem when there isn't a flash item, but when there is a flash item, instead of the flash item, it loads the following error message: " /> " quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="746" height="235"> Any suggestions?
  5. I want one php script which gets the URL and displays 'This is the first page' if the page visited is 'http://test.com/page.php?id=10&p=17&s=25&i=26' and to display 'This is the second page' if the page visited is 'http://test.com/page.php?id=10&p=18&s=109&i=104'
  6. The content changes according to url.
  7. I need to display different content according to the URL of the website. For example: If the url is: http://test.com/page.php?id=10&p=17&s=25&i=26 then the html displays <p>This is the first page</p> If the url is: http://test.com/page.php?id=10&p=18&s=109&i=104 then the html displays <p>This is the second page</p> How can it be done?
  8. I will re-explain. I have a side-menu generating the menu items from the database as seen in my first post. For example, the following menu items are generated: Nokia Siemens Samsung Motorola Each menu item has a link to a different page. If I press on Samsung, I want Samsung to go on the top of the menu list and the content loaded. Now the content loads all right. The thing which I cannot do is make the clicked menu item go on top of the list.
  9. Each list item is a hyperlink so it will load a new page with the same menu items. I need the previously clicked menu item to display on top of the menu when the menu is generated from the database.
  10. I'm still a junior programmer in PHP, could you please refer me a demo example or code?
  11. I have the following PHP Code which queries a database and generates a list of 4 items. echo'<a href="index.php?id='.$id.'&p='.$row["id"].'"><li style="width:207px; background-color:#bcbec0; color:#ffffff; border:0px; font-weight:bold;" class="mainli">'.$row["pagetitle"].'</li></a>'; $sql2 = "Select * from $table where parent = $row[id] and published = 1 order by menuindex asc"; It works fine and as needed. What I need now is that when I click on a certain item, it moves to the top of the list and the rest remain as they are. For example it generates: Nokia Samsung Siemens Motorola When I lick on Siemens, the list is displayed as follows: Siemens Nokia Samsung Motorola
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.