whats wrong with this

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    whats wrong with this

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

    Code:
     ///////////////////////////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 = "&amp;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&amp;sid=$sid\">compose new</a><br/>";
    $main.= "<br/><a href=\"mms.php?action=mmsdisp&amp;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=\"&#187;\"/>";
    }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&amp;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&amp;page=$ppage&amp;view=$view\">&#171;Previous</a> ";
    }
    if($page<$num_pages){
    $npage = $page+1;
    $main.= "<a href=\"mms.php?action=mms&amp;page=$npage&amp;view=$view\">&#187;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,

    #2
    is it showing blank page? Cheak your xhtml() function.
    PHP Code:
    echo $main 
    Last edited by Ponick; 05.06.11, 18:00.
    PHP Code:
    /* I don't know everything hehe */ 
    Find me on facebook

    Comment


      #3
      Originally posted by Ponick View Post
      is it showing blank page? Cheak your xhtml() function.
      PHP Code:
      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

      Comment


        #4
        PHP Code:
        $items mysql_query($sql); 
        after this line ,add something like
        PHP Code:
         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..
        PHP Code:
        /* I don't know everything hehe */ 
        Find me on facebook

        Comment


          #5
          Try to replace last two lines:
          PHP Code:
          $main.= xhtml($sid,$title,$L6,$L7,$L8,$L9,$main);
          $main.= foot_tag(); 
          with:
          PHP Code:
          echo xhtml($sid,$title,$L6,$L7,$L8,$L9,$main);
          echo 
          foot_tag(); 
          <!DOCTYPE html PUBLIC "-//WAPFORUM.RS

          Comment


            #6
            Originally posted by arnage View Post
            Try to replace last two lines:
            PHP Code:
            $main.= xhtml($sid,$title,$L6,$L7,$L8,$L9,$main);
            $main.= foot_tag(); 
            with:
            PHP Code:
            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'

            Comment


              #7
              add this code at the top of ur page after <?php and tell us to error
              PHP Code:
              error_reporting (E_ALL); 
              ini_set ('display_errors'true); 

              Comment

              Working...
              X