whats wrong with this

Started on the old forum in June 2011 · view the original in the archive · old links redirect here

6 replies · 742 views · started 15 years ago · 2 min read

4 participants
woody Developer · 176 posts #1

i had it working once and now i've edited something and cant find what the problem is lo, can anyone help

 ///////////////////////////mms inbox//////////////////////////////
else if($action=="mms"){

addonline(getuid_sid($sid),"MMs Inbox","mms.php$chatlink2$pass");
$main.= head_tag(getnick_sid($sid)."@MMS Inbox",1,getnick_sid($sid));
$title="<b>MMS Inbox</b>";

     
$main="<div class=".align().">";

$view = $_GET["view"];
//////ALL LISTS SCRIPT <<
if($view=="")$view="all";
if($page=="" || $page<=0)$page=1;
$myid = getuid_sid($sid);
$doit=false;
$num_items = getmmscount($myid,$view); //changable
$items_per_page= 7;
$num_pages = ceil($num_items/$items_per_page);
if($page>$num_pages)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
if($num_items>0){
if($doit){
$exp = "&rwho=$myid";
}else{
$exp = "";
}
if($view=="all"){
$sql = "SELECT
			a.username, a.id, b.byuid, b.unread, b.starred FROM users a
			INNER JOIN mms b ON a.id = b.byuid
			WHERE b.touid='".$myid."'
			ORDER BY b.timesent DESC
			LIMIT $limit_start, $items_per_page
	";
}
else if($view=="snt"){
	$sql = "SELECT
			a.username, a.id, b.touid, b.unread, b.starred FROM users a
			INNER JOIN mms b ON a.id = b.touid
			WHERE b.byuid='".$myid."'
			ORDER BY b.timesent DESC
			LIMIT $limit_start, $items_per_page
	";
}
	else if($view=="str"){
	$sql = "SELECT
			a.username, a.id, b.byuid, b.unread, b.starred FROM users a
			INNER JOIN mms b ON a.id = b.byuid
			WHERE b.touid='".$myid."' AND b.starred = '1'
			ORDER BY b.timesent DESC
			LIMIT $limit_start, $items_per_page
	";
	}
	else if($view=="urd"){
$sql = "SELECT
			a.username, a.id, b.byuid, b.unread, b.starred FROM users a
			INNER JOIN mms b ON a.id = b.byuid
			WHERE  b.unread = '1'
			ORDER BY b.timesent DESC
			LIMIT $limit_start, $items_per_page
   ";
}
}

$items = mysql_query($sql);
if (!$items) {
$main.= "<br/>You have no messages!<br/><a href=\"mms.php?action=sendmms&sid=$sid\">compose new</a><br/>";
$main.= "<br/><a href=\"mms.php?action=mmsdisp&sid=$sid\">go back</a><br/>";

$L1="$sixkey<a $key6 title=\"Inbox\" href=\"../inbox/inbox.php?sid=$sid\">Inbox</a>";
$L2="$sevenkey<a $key7 title=\"BuddyList\" href=\"../buds/buds.php?sid=$sid\">BuddyList</a>";
$L3="$eightkey<a $key8 title=\"Chat\" href=\"../chat/public.php?sid=$sid\">Chat</a>";
$L4="$ninekey<a $key9 title=\"Forums\" href=\"../forums/forums.php?sid=$sid\">Forums</a>";
$L5="$zerokey<a $key0 title=\"Main Menu\" href=\"../main.php?sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a>";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,0,0,0,$main);
echo foot_tag();

exit();
}
$main.= mysql_error();
while ($item = mysql_fetch_array($items)){
if($item[3]=="1"){
$iml = "<img src=\"../images/npm.gif\" alt=\"»\"/>";
}else{
if($item[4]=="1"){
$iml = "<img src=\"../images/spm.gif\" alt=\"*\"/>";
}else{
$iml = "<img src=\"../images/opm.gif\" alt=\"-\"/>";
}
}
$lnk = "$iml<a href=\"mms.php?action=readmms&pmid=$item[1]\">$item[0]</a>";
$main.= "$lnk<br/>";
}
$main.= "<p align=\"center\">";
$npage = $page+1;
$main.= "<a href=\"mms.php?action=sendmms\">Compose</a><br/>";
if($page>1){
$ppage = $page-1;
$main.= "<a href=\"mms.php?action=mms&page=$ppage&view=$view\">«Previous</a> ";
}
if($page<$num_pages){
$npage = $page+1;
$main.= "<a href=\"mms.php?action=mms&page=$npage&view=$view\">»Next</a>";
}
$main.= "<br/>Page $page of $num_pages<br/>";
if($num_pages>2){
$rets = "Jump to page<form action=\"mms.php\" method=\"get\"><input name=\"page\" format=\"*N\" size=\"3\"/>";
$rets .= "<input type=\"hidden\" name=\"action\" value=\"mms\"/>";
$rets .= "<input type=\"hidden\" name=\"view\" value=\"$view\"/>";
$rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
$rets .= "<input type=\"submit\" value=\"Go\"/></form>";
$main.= $rets;

}else{

}

$L5="$sixkey<a $key6 href=\"../online.php?sid=$sid\">Online List</a>";

$L6="$sevenkey<a $key7 href=\"../buds/buds.php?sid=$sid\">BuddyList</a>";
$L7="$eightkey<a $key8 href=\"../chat/public.php?sid=$sid\">Chat</a>";
$L8="$ninekey<a $key9 href=\"../forums/forums.php?sid=$sid\">Forums</a>";
$L9="$zerokey<a $key0 href=\"../main.php?sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a>";
$main.= xhtml($sid,$title,$L6,$L7,$L8,$L9,$main);
$main.= foot_tag();

exit();

its just not displaying anything,

Ponick Developer · 216 posts #2

is it showing blank page? Cheak your xhtml() function.

echo $main ;
/* I don't know everything hehe */

Find me on facebook

woody Developer · 176 posts #3

Ponick wrote: is it showing blank page? Cheak your xhtml() function.

echo $main ;

no it shows the page it just doesnt display the messages recieved, the image is in the folder its sent to and the data is in the mms table in the db but nothing shows up

Ponick Developer · 216 posts #4
$items = mysql_query($sql);

after this line ,add something like

 echo" items[0] <br/>items[1] <br/>items[2] <br/>items[3] <br/>items[4] <br/> items[5]";

if it show ,you are getting all the information then u can make it work anyway..

/* I don't know everything hehe */

Find me on facebook

arnage Lead · 811 posts #5

Try to replace last two lines:

$main.= xhtml($sid,$title,$L6,$L7,$L8,$L9,$main);
$main.= foot_tag();

with:

echo xhtml($sid,$title,$L6,$L7,$L8,$L9,$main);
echo foot_tag();
<!DOCTYPE html PUBLIC "-//***WAPFORUM**.**RS***
woody Developer · 176 posts #6

arnage wrote: Try to replace last two lines:

$main.= xhtml($sid,$title,$L6,$L7,$L8,$L9,$main);
$main.= foot_tag();

with:

echo xhtml($sid,$title,$L6,$L7,$L8,$L9,$main);
echo foot_tag();

thanks but still not joy it just shows 'you have no new messages'

atef Developer · 224 posts #7

add this code at the top of ur page after <?php and tell us to error

error_reporting (E_ALL); 
ini_set ('display_errors', true);

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close