Jump to content

jdurden

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

jdurden's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. This should be simple but I cant figure it out. Basically, I just need to only display titles that have thumbnails, and it should always show titles with dates from the next two months. Therefore, since it is October, it should show the October and November titles, if it's November, it shows Nov and Dec, etc. The part of the code i need help with is at the bottom. [syntax=php]<?php $width = 940; $height = 277; $classtext = ''; $titletext = get_the_title(); $date = print(Date("l F d, Y")); $thumbnail = get_thumbnail($width,$height,$classtext,$titletext,$titletext,false); $thumb = $thumbnail["thumb"]; ?> <?php // if there's a thumbnail if($thumb != '' && $date == ? ) { ?>[/syntax]
  2. Here you go: http://www.coldfusiondesignstudio.com/cron.jpg
  3. Can this be done? Was going to use the cPanel Cron Managar but that only allows for daily, weekly, monthly... I have a simple "events" section on this site: http://www.coldfusiondesignstudio.com/nts/caba/ and one of the events occurs every 3rd Tuesday. Just need that particular "event" to have the data change in the database every 3rd Tues.
  4. Yes, you are correct. The issue happens when you click one of the press releases in the left column. The pressdetail.php page should open up with the text of the press release. Instead, it is just blank. Then, when you click "Press Releases", it should go to the page press.php. The following error occurs when trying to access press.php: [color=red]"Warning: mysql_fetch_assoc(): 11 is not a valid MySQL result resource in /home/mavetcom/public_html/press.php on line 80"[/color] Here is the PHP code for pressdetail.php: [code]<?php require('Connections/connDatabase.php'); ?> <?php $colname_rsNews = "1"; if (isset($HTTP_GET_VARS['NewsID'])) {   $colname_rsNews = (get_magic_quotes_gpc()) ? $HTTP_GET_VARS['NewsID'] : addslashes($HTTP_GET_VARS['NewsID']); } mysql_select_db($database_connDatabase, $connDatabase); $query_rsNews = sprintf("SELECT NewsID, NewsName, NewsDate, NewsShort, NewsFull FROM News", $colname_rsNews); $rsNews = mysql_query($query_rsNews, $connDatabase) or die(mysql_error()); $row_rsNews = mysql_fetch_assoc($rsNews); $totalRows_rsNews = mysql_num_rows($rsNews); require('includes/configure.php'); ?> <html><!-- InstanceBegin template="/Templates/pagelayout2003.dwt.php" codeOutsideHTMLIsLocked="false" --> <head> <!-- InstanceBeginEditable name="doctitle" --> <title><?php echo substr($row_rsNews['NewsShort'], 0, 50); ?>...</title> <meta name="description" content="<?php echo $row_rsNews['NewsShort']; ?>"> <!-- InstanceEndEditable --> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="keywords" content="Maverick Entertainment, Maverick Home Video, Doug Schwab, Urban Film Distribution, Urban Film Production, Urban Films, Urban Movies, gangsta movies, a miami tail, african american movies, Afro-American Movies, American Black Film Festival, black african american movies, Black Cinema, black film festivals, Black Films, Blockbuster Distribution, blockbuster video, dvd movies, eva longoria, film distribution, film makers, film production companies, hip hop movies, hollywood black film festival, independent film festivals, independent film production, independent films, latino actresses, latino movies, Maverick Pictures, movie production companies, rapper trina, Rappers in Movies, trina the rapper"> <link href="styles.css" rel="stylesheet" type="text/css"> <!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable --><!-- InstanceParam name="onload" type="text" value="" --> </head> <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <table width="100%"  border="0" cellpadding="0" cellspacing="0" background="../images/headerbg.jpg" style="border-bottom:1px solid #cccccc;">   <tr>     <td height="75">&nbsp;</td>         <td width="580" height="75" align="right" valign="bottom"><img src="../images/division.gif" width="273" height="20" style="margin-bottom:5px; margin-right:10px;"></td>     <td height="75">&nbsp;</td>   </tr> </table> <table width="100%">   <tr>     <td height="100">&nbsp;</td>         <td width="5000" height="100" align="center" valign="middle"><div style="position:relative;top:7px"><img src="../images/spirit.jpg" width="760" height="100" class="pictureframe"></td>     <td height="100">&nbsp;</td>   </tr> </table> <table width="760"  border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top:15px;">   <tr align="left" valign="top">     <td width="180"> <?php include(DIR_INCLUDES . 'leftcol.php'); ?> <!-- InstanceBeginEditable name="leftcol" --><!-- InstanceEndEditable --></td>     <td width="10"><img src="../images/spacer.gif" width="10" height="10"></td>     <td class="contentarea"><!-- InstanceBeginEditable name="content" --> <h1><img src="images/spiritpress.jpg" alt="" height="81" width="536" border="0"></h1> <table width="380" border="0" cellspacing="4" cellpadding="0" align="center"> <tr> <td valign="top">&nbsp;</td> </tr> <tr> <td valign="top"><a href="../press.php">&laquo; Press Releases</a></td> </tr> <tr> <td class="bodystandard" valign="top">&nbsp;</td> </tr> <tr> <td class="bodystandard" valign="top"><?php echo $row_rsNews['NewsFull']; ?></td> </tr> <tr> <td valign="top"><img src="../images/spacer10x10.gif" height="18" width="100%"></td> </tr> </table> <div> <em><font color="#996699"></font></em></div> </td></tr></tbody></td></tr></tbody></table> <table class="bottomtable" cellspacing="0" cellpadding="5" width="650" align="center" bgcolor="#ffffff" border="0"> <tbody> <tr> <td valign="top" align="center"> <p align="center" class="footer">   <?php include(DIR_INCLUDES . 'footer.php'); ?> </p> </body> <!-- InstanceEnd --></html>[/code] and the code for press.php: [code]<?php require_once('Connections/connDatabase.php'); ?> <?php require('includes/configure.php'); ?> <?php mysql_select_db($database_connDatabase, $connDatabase); $query_rsNews = "SELECT SQL_CACHE NewsCategory, NewsID, NewsName, NewsDate, NewsShort, NewsActive FROM News WHERE NewsCategory = 1 AND NewsActive = 'Yes' ORDER BY NewsDate DESC LIMIT 5"; $rsNews = mysql_query($query_rsNews, $connDatabase) or die(mysql_error()); $row_rsNews = mysql_fetch_assoc($rsNews); $totalRows_rsNews = mysql_num_rows($rsNews); mysql_select_db($database_connDatabase, $connDatabase); $query_rsPressReleases = "SELECT SQL_CACHE NewsCategory, NewsID, NewsDate, NewsShort, NewsActive FROM News WHERE NewsCategory = 2 AND NewsActive = 'Yes' ORDER BY NewsDate DESC LIMIT 5"; $rsPressReleases = mysql_query($query_rsPressReleases, $connDatabase) or die(mysql_error()); $row_rsPressReleases = mysql_fetch_assoc($rsPressReleases); $totalRows_rsPressReleases = mysql_num_rows($rsPressReleases); mysql_select_db($database_connDatabase, $connDatabase); $query_rsAdvisories = "SELECT SQL_CACHE NewsCategory, NewsID, NewsDate, NewsShort, NewsActive FROM News WHERE NewsCategory = 3 AND NewsActive = 'Yes' ORDER BY NewsDate DESC LIMIT 5"; $rsAdvisories = mysql_query($query_rsAdvisories, $connDatabase) or die(mysql_error()); $row_rsAdvisories = mysql_fetch_assoc($rsAdvisories); $totalRows_rsAdvisories = mysql_num_rows($rsAdvisories); ?> <html><!-- InstanceBegin template="/Templates/pagelayout2003.dwt.php" codeOutsideHTMLIsLocked="false" --> <head> <!-- InstanceBeginEditable name="doctitle" --> <title><?php echo substr($row_rsNews['NewsShort'], 0, 50); ?>...</title> <meta name="description" content="<?php echo $row_rsNews['NewsShort']; ?>"> <!-- InstanceEndEditable --> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="keywords" content="Maverick Entertainment, Maverick Home Video, Doug Schwab, Urban Film Distribution, Urban Film Production, Urban Films, Urban Movies, gangsta movies, a miami tail, african american movies, Afro-American Movies, American Black Film Festival, black african american movies, Black Cinema, black film festivals, Black Films, Blockbuster Distribution, blockbuster video, dvd movies, eva longoria, film distribution, film makers, film production companies, hip hop movies, hollywood black film festival, independent film festivals, independent film production, independent films, latino actresses, latino movies, Maverick Pictures, movie production companies, rapper trina, Rappers in Movies, trina the rapper"> <link href="styles.css" rel="stylesheet" type="text/css"> <!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable --><!-- InstanceParam name="onload" type="text" value="" --> </head> <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <table width="100%"  border="0" cellpadding="0" cellspacing="0" background="../images/headerbg.jpg" style="border-bottom:1px solid #cccccc;">   <tr>     <td height="75">&nbsp;</td>         <td width="580" height="75" align="right" valign="bottom"><img src="../images/division.gif" width="273" height="20" style="margin-bottom:5px; margin-right:10px;"></td>     <td height="75">&nbsp;</td>   </tr> </table> <table width="100%">   <tr>     <td height="100">&nbsp;</td>         <td width="5000" height="100" align="center" valign="middle"><div style="position:relative;top:7px"><img src="../images/spirit.jpg" width="760" height="100" class="pictureframe"></td>     <td height="100">&nbsp;</td>   </tr> </table> <table width="760"  border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top:15px;">   <tr align="left" valign="top">     <td width="180"> <?php include(DIR_INCLUDES . 'leftcol.php'); ?> <!-- InstanceBeginEditable name="leftcol" --><!-- InstanceEndEditable --></td>     <td width="10"><img src="../images/spacer.gif" width="10" height="10"></td>     <td class="contentarea"><!-- InstanceBeginEditable name="content" --> <h1><img src="images/spiritpress.jpg" alt="" height="81" width="536" border="0"></h1> <table width="380" border="0" align="center" cellpadding="0" cellspacing="4"> <tr> <td valign="top"> </td> </tr> <?php if ($totalRows_rsNews > 0) { // Show if recordset not empty ?> <tr> <td valign="top" class="bodybold">In The News <span class="bodysmall">[ <a href="press_archive.php?NewsCategoryID=1">View Archive for more stories</a> ]</span></td> </tr> <tr> <td valign="top" class="bodybold"> </td> </tr> <tr> <td valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <?php do { ?> <tr align="left" valign="baseline"> <td width="80" valign="top"><img src="images/icon_doc.gif" width="10" height="10"> <?php echo DoDateTime( $row_rsNews['NewsDate'], 'm/d/y'); ?> :</td> <td valign="top"><a href="pressdetail.php?NewsID=<?php echo $row_rsNews['NewsID']; ?>"><?php echo $row_rsNews['NewsShort']; ?> ...</a></td> </tr> <tr align="left" valign="baseline"> <td height="10" colspan="2" valign="top"><img src="images/spacer10x10.gif" width="10" height="10"></td> </tr> <?php } while ($row_rsNews = mysql_fetch_assoc($rsNews)); ?> </table> </td> </tr> <?php } // Show if recordset not empty ?><?php if ($totalRows_rsPressReleases > 0) { // Show if recordset not empty ?> <tr> <td valign="top" class="bodybold"> </td> </tr> <tr> <td valign="top" class="bodybold">Press Releases <span class="bodysmall">[ <a href="press_archive.php?NewsCategoryID=2">View Archive for more stories</a> ]</span></td> </tr> <tr> <td valign="top" class="bodybold"> </td> </tr> <tr> <td valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <?php do { ?> <tr align="left" valign="baseline"> <td width="80" valign="top"><img src="images/icon_doc.gif" width="10" height="10"> <?php echo DoDateTime( $row_rsPressReleases['NewsDate'], 'm/d/y'); ?> :</td> <td valign="top"><a href="pressdetail.php?NewsID=<?php echo $row_rsPressReleases['NewsID']; ?>"><?php echo $row_rsPressReleases['NewsShort']; ?> ...</a></td> </tr> <tr align="left" valign="baseline"> <td height="10" colspan="2" valign="top"><img src="images/spacer10x10.gif" width="10" height="10"></td> </tr> <?php } while ($row_rsPressReleases = mysql_fetch_assoc($rsPressReleases)); ?> </table> </td> </tr> <?php } // Show if recordset not empty ?><?php if ($totalRows_rsAdvisories > 0) { // Show if recordset not empty ?> <tr> <td valign="top" class="bodybold"> </td> </tr> <tr> <td valign="top" class="bodybold">Media Advisories <span class="bodysmall">[ <a href="press_archive.php?NewsCategoryID=3">View Archive for more stories</a> ]</span></td> </tr> <tr> <td valign="top" class="bodybold"> </td> </tr> <tr> <td valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <?php do { ?> <tr align="left" valign="baseline"> <td width="80" valign="top"><img src="images/icon_doc.gif" width="10" height="10"> <?php echo DoDateTime( $row_rsAdvisories['NewsDate'], 'm/d/y'); ?> :</td> <td valign="top"><a href="pressdetail.php?NewsID=<?php echo $row_rsAdvisories['NewsID']; ?>"><?php echo $row_rsAdvisories['NewsShort']; ?> ...</a></td> </tr> <tr align="left" valign="baseline"> <td height="10" colspan="2" valign="top"><img src="images/spacer10x10.gif" width="10" height="10"></td> </tr> <?php } while ($row_rsAdvisories = mysql_fetch_assoc($rsAdvisories)); ?> </table> </td> </tr> <?php } // Show if recordset not empty ?> <tr> <td valign="top"><img src="images/spacer10x10.gif" width="100%" height="18"></td> </tr> </table> <div> <em><font color="#996699"></font></em></div> </td></tr></tbody></td></tr></tbody></table> <table class="bottomtable" cellspacing="0" cellpadding="5" width="650" align="center" bgcolor="#ffffff" border="0"> <tbody> <tr> <td valign="top" align="center"> <p align="center" class="footer">   <?php include(DIR_INCLUDES . 'footer.php'); ?> </p> </body> <!-- InstanceEnd --></html>[/code]
  5. OK, I just deleted the table and copied the table over exactly from the main site and it didn't fix the issue. The errors I am getting refer to this particular line of code: [code]<?php } while ($row_rsNews = mysql_fetch_assoc($rsNews)); ?>[/code] Does that help?
  6. I am currently woking on building this site: www.maverick-spirit.com. everything seems to be fine except the press releases page. When you click on one of the press releases in the left column under the menu, nothing comes up. I copied the code for the page directly from the press releases page on our main site: www.maverickentertainment.cc, and it is using an identical database, so I am unsure what is wrong. Can somebody assist with this? please let me know what you need me to procide in order to assist me with this issue... thanks, J.
×
×
  • 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.