JSGTPD
-
Posts
8 -
Joined
-
Last visited
Never
Posts posted by JSGTPD
-
-
It is a linux server and it is our own dedicated server.
-
OK where can I find that to show you?
-
Hey All
Ok so looking for a bit of help for a rookie PHP coder here. The guys who designed our website have dissapeared into the night so I have to do all the tweaking myself and I am stumped.
This code displays the coming movies by week (from our database) but it only shows the current months movies, and once we are past the date they dissapear. I need it to show the next 4 weeks worth of movies at any given time even if it goes into the necxt month. Make sense? Here is our site notice the big grey EMPTY box, (it will only be empty till Feb 1st then all of February's titles will show up)
http://www.newthisweek.ca/index.php?action=newthisweek&cat=dvd
And here is the php
<?
include("admin/config.php");
if(isset($_REQUEST['month']) && $_REQUEST['month']!='' && isset($_REQUEST['cat']) && $_REQUEST['cat']!='')
{
$month=$_REQUEST['month'];
$cat=$_REQUEST['cat'];
$current = date("Y-m-d", mktime(0, 0, 0, date("m") , date("d")+7, date("Y")));
$thisweek1 = date("Y-m-d",mktime(0, 0, 0, date("m") , date("d")+1, date("Y")));
$current_org=date("Y-m-d", mktime(0, 0, 0, date("m") , date("d"), date("Y")));
$thissql="SELECT * FROM dvd WHERE MONTH(rel_date) = '$month' AND status='DVD' AND rel_date > '$current_org' GROUP BY rel_date";
}
else
{
$current = date("Y-m-d", mktime(0, 0, 0, date("m") , date("d"), date("Y")));
list($year, $month, $day) = split('[/.-]', $current);
$thissql="SELECT * FROM dvd WHERE MONTH(rel_date) = '$month' AND status='DVD' AND rel_date > '$current' GROUP BY rel_date";
//echo $thissql;
}
$thisresult=mysql_query($thissql) or die(mysql_error());
?>
<STYLE type=text/css>
A:link {COLOR: #0000FF; font-size:12px; font-family:Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none}
A:visited {COLOR: #000000; font-size:12px; font-family:Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none}
A:hover {COLOR: #FF0000; font-size:12px; font-family:Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none}
A:active {COLOR: #FF0000; font-size:12px; font-family:Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none}
</STYLE>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<?
$thissql1="SELECT * FROM dvd WHERE MONTH(rel_date) = '$month' AND status='DVD' AND rel_date > '$current_org' GROUP BY rel_date";
//echo $thissql1;
//die();
$thisresult1=mysql_query($thissql) or die(mysql_error());
if(mysql_num_rows($thisresult1)!=0)
{
while($nrowdvd=mysql_fetch_array($thisresult1))
{
?>
<tr>
<td width="100%" valign="top">
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="margin-top: 1; margin-bottom: 1">
<tr>
<td width="100%" valign="top">
<p style="margin-left: 10; margin-right: 10; margin-top: 5; margin-bottom: 5"><font face="Verdana" size="2">
<b>
<?
$rel_date=$nrowdvd['rel_date'];
list($year,$month,$date)=explode("-",$rel_date);
echo date("F j, Y", mktime(0, 0, 0, $month, $date, $year));
?>
</b></font></td>
</tr>
<?
$sql="SELECT * FROM dvd WHERE status='DVD' AND rel_date='$rel_date'";
$result=mysql_query($sql) or die(mysql_error());
while($newrowdvd=mysql_fetch_array($result))
{
?>
<tr>
<td width="100%" valign="top">
<p style="margin-left: 10; margin-right: 10; margin-top: 5; margin-bottom: 5"><font face="Verdana" size="2">
<a target="_parent" href="index.php?action=listdvd&cat=dvd&dvd_id=<?=$newrowdvd['dvd_id']?>"><?=$newrowdvd['title']?></a></font></td>
</tr>
<?
}
?>
</table>
</td>
</tr>
<?
}
}
?>
</table> -
Anyone??
-
Hey all
I have a webpage that is formatted to query my database and list the results like this
Date
DVD Move Release
DVD Move Release
DVD Move Release
DVD Move Release
Date
DVD Move Release
DVD Move Release
DVD Move Release
DVD Move Release
etc
Problem is it only list what is coming out for the current month. I want it to list the next 4 weeks worth of titiles, and then every monday get rid of the current week (which whould be the first one listed and do the NEXT 4 weeks worth of releases.
Here is my current PHP file. Any help would be great.
THANKS!
[code]<?
include("admin/config.php");
if(isset($_REQUEST['month']) && $_REQUEST['month']!='' && isset($_REQUEST['cat']) && $_REQUEST['cat']!='')
{
$month=$_REQUEST['month'];
$cat=$_REQUEST['cat'];
$current = date("Y-m-d", mktime(0, 0, 0, date("m") , date("d")+7, date("Y")));
$thisweek1 = date("Y-m-d",mktime(0, 0, 0, date("m") , date("d")+1, date("Y")));
$current_org=date("Y-m-d", mktime(0, 0, 0, date("m") , date("d"), date("Y")));
$thissql="SELECT * FROM dvd WHERE MONTH(rel_date) = '$month' AND status='DVD' AND rel_date > '$current_org' GROUP BY rel_date";
}
else
{
$current = date("Y-m-d", mktime(0, 0, 0, date("m") , date("d"), date("Y")));
list($year, $month, $day) = split('[/.-]', $current);
$thissql="SELECT * FROM dvd WHERE MONTH(rel_date) = '$month' AND status='DVD' AND rel_date > '$current' GROUP BY rel_date";
//echo $thissql;
}
$thisresult=mysql_query($thissql) or die(mysql_error());
?>
<STYLE type=text/css>
A:link {COLOR: #0000FF; font-size:12px; font-family:Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none}
A:visited {COLOR: #000000; font-size:12px; font-family:Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none}
A:hover {COLOR: #FF0000; font-size:12px; font-family:Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none}
A:active {COLOR: #FF0000; font-size:12px; font-family:Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none}
</STYLE>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<?
$thissql1="SELECT * FROM dvd WHERE MONTH(rel_date) = '$month' AND status='DVD' AND rel_date > '$current_org' GROUP BY rel_date";
//echo $thissql1;
//die();
$thisresult1=mysql_query($thissql) or die(mysql_error());
if(mysql_num_rows($thisresult1)!=0)
{
while($nrowdvd=mysql_fetch_array($thisresult1))
{
?>
<tr>
<td width="100%" valign="top">
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="margin-top: 1; margin-bottom: 1">
<tr>
<td width="100%" valign="top">
<p style="margin-left: 10; margin-right: 10; margin-top: 5; margin-bottom: 5"><font face="Verdana" size="2">
<b>
<?
$rel_date=$nrowdvd['rel_date'];
list($year,$month,$date)=explode("-",$rel_date);
echo date("F j, Y", mktime(0, 0, 0, $month, $date, $year));
?>
</b></font></td>
</tr>
<?
$sql="SELECT * FROM dvd WHERE status='DVD' AND rel_date='$rel_date'";
$result=mysql_query($sql) or die(mysql_error());
while($newrowdvd=mysql_fetch_array($result))
{
?>
<tr>
<td width="100%" valign="top">
<p style="margin-left: 10; margin-right: 10; margin-top: 5; margin-bottom: 5"><font face="Verdana" size="2">
<a target="_parent" href="index.php?action=listdvd&cat=dvd&dvd_id=<?=$newrowdvd['dvd_id']?>"><?=$newrowdvd['title']?></a></font></td>
</tr>
<?
}
?>
</table>
</td>
</tr>
<?
}
}
?>
</table>[/code] -
Ok here's my situation. Any time I go to "View New Posts" on my vBulletin boards it lists the new posts. Cool. Now if I click on one and read it, then hit "New Posts" again then they are all gone! Ok so I solved that by hitting the back button instead. Now if there are 10 New Posts and I only have time to read say 3 of them, the next time I log in, the rest of my "Unread New Posts" are gone?! Any idea why??
-
Hey all
I have a vBulletin forum on my site. Whenever someone signs up to receive instant notification of new posts they get this link in their email.
[a href=\"http://www.sbtconsulting.net/movieexperts/VBulletin/showthread.php?t=196&goto=newpost\" target=\"_blank\"]http://www.sbtconsulting.net/movieexperts/...96&goto=newpost[/a]
"http://www.sbtconsulting.net/movieexperts/VBulletin/showthread.php?t=196&goto=newpost"
I need it to go to them like this
[a href=\"http://www.sbtconsulting.net/VBulletin/showthread.php?t=196&goto=newpost\" target=\"_blank\"]http://www.sbtconsulting.net/VBulletin/sho...96&goto=newpost[/a]
"http://www.sbtconsulting.net/movieexperts/VBulletin/showthread.php?t=196&goto=newpost"
Any idea how or what I edit to get rid of that one section of the link?
Thaks
How do I tweak this coding to do what I want?
in PHP Coding Help
Posted
Operating system Linux
Service Status Click to View
Kernel version 2.6.9-42.0.3.ELsmp
Machine Type i686
Apache version 1.3.36 (Unix)
PERL version 5.8.7
Path to PERL /usr/bin/perl
Path to sendmail /usr/sbin/sendmail
Installed Perl Modules Click to View
PHP version 4.4.3
MySQL version 4.1.21-standard
cPanel Build 10.9.0-RELEASE 44
Theme cPanel X v2.6.0