Lava PM + Att Image *Centi*

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

No replies · 463 views · started 15 years ago · 3 min read

centi Developer · 159 posts #1

Im finally done with Lava.... Every one Shoud Have these Codings,,, im sharing caus that matter some wap owners thinks this is big deal codings... simple stuff only thing u have to do is try try try do exactly what i say... this is perfectly working 100% codings!!!!

Only for Wapdesire Old Ver! Make your own Modifications thats all Uploadrs Are Safe If You Have Any Problems Installing Jus Tell I Will Help Personally

1.Download The Zip File 2.Make a Folder Name pmimages on your root folder 2.1. put att.png to the images folder on root 3.Put pm_image.php and class.uplaod.php on your wap folder or what ever u called it 4.Go to phpmyadmin and add these one row under ibwf_private image varchar(100) NOT NULL,

5.add this under else if($action=="readpm") in inbox.php

find

$pminfo = mysql_fetch_array(mysql_query("SELECT text, byuid, timesent,touid, reported, image FROM ibwf_private WHERE id='".$pmid."'"));

replace

$pminfo = mysql_fetch_array(mysql_query("SELECT text, byuid, timesent,touid, reported, image FROM ibwf_private WHERE id='".$pmid."'"));

find

echo $pmtext;
echo "<br/>";

add after

$image = ($pminfo[5]);
if($image=="")
  {
 
  }else{
  echo "<hr/> <img src=\"$pminfo[5]\" width=\"80\" height=\"100\ alt=\"+\"/> <br/> <img src=\"../images/att.png\" width=\"15\" height=\"15\ alt=\"att\"/> <a href=\"$pminfo[5]\">Download Attachment</a>";
 
  }

after pm reply button add

echo "<a href=\"inbox.php?action=pmimage&sid=$sid&towho=$pminfo[1]\">Reply + Att Image to $whose</a><br/>";

add under inbox.php

//////////////////////////////////////////PM with image
else if($action=="pmimage")

{

$towho = $_GET["towho"];
$whose = getnick_uid($towho);
addonline(getuid_sid($sid),"PM + image to $whose","");

   echo "<head>";
  echo "<title>Space</title>";
  echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/stylesheet.css\">";
  echo "</head>";
  echo "<body>";
  echo "<p align=\"center\"><small>";
  print'<div class="header">PM with Image to</div>';

  echo "<p>";
	echo "<br/><b>Pick a Photo for send to $whose</b>";

	echo "<form enctype=\"multipart/form-data\" method=\"post\" action=\"pm_image.php?action=upload&sid=$sid\">";
	echo "<input type=\"file\" name=\"f1\" size=\"15\"><br/>";
	echo "<b>Subject</b><br/> <input name=\"subject\" value=\"Your Subject\" maxlength=\"500\" size=\"20\"/>";
    echo "<br/><b>Reply Text</b><br/> <input name=\"descript\" value=\"Hello\" maxlength=\"500\" size=\"20\"/>";
	echo "<input type=\"hidden\" name=\"action\" value=\"image\" /><br/>";
    echo "<input type=\"hidden\" name=\"towho\" value=\"$towho\"/>";
    echo "<INPUT TYPE=\"submit\" name=\"upl\" VALUE=\"Reply\"></form>";   

  echo "<br/><small>Note:<br/>";   
  	echo "* File size limit 512kb. If your upload does not work, try a smaller Photo.<br/>";
  	echo "* Allowed formats: <b>.jpg, .gif, .bmp, .png</b><br/>";
  	
  echo "</center></small></p>"; 

echo "<a href=\"inbox.php?action=main&sid=$sid\">Inbox</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";

   /////////////////////////////footer
echo"<br/><div class=\"logo\">";
echo"<b>© Centi - ".date("Y")."</b><br/>";
echo"</small></div>";
echo"<div class=\"center\">";
//echo'<center><a href="http://top.slhitz.com/in.php?sid=1"><img src="http://top.slhitz.com/cou.php?sid=1" alt="SM" /></a><center>';
echo"</div></small></p>";
echo"</body>";
}

find ($action=="main") replace the whole part with the original

echo "</p>";

    $view = $_GET["view"];

    //////ALL LISTS SCRIPT <<

    if($view=="")$view="all";

    if($page=="" || $page<=0)$page=1;

    $myid = getuid_sid($sid);

    $doit=false;

    $num_items = getpmcount($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 = "";

      }

    //changable sql

    if($view=="all")

  {

    $sql = "SELECT

            a.name, b.id, b.byuid, b.unread, b.starred, title, text, image FROM ibwf_users a

            INNER JOIN ibwf_private 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.name, b.id, b.touid, b.unread, b.starred, title, text, image FROM ibwf_users a

            INNER JOIN ibwf_private 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.name, b.id, b.byuid, b.unread, b.starred, title, text, image FROM ibwf_users a

            INNER JOIN ibwf_private 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.name, b.id, b.byuid, b.unread, b.starred, title, text, image FROM ibwf_users a

            INNER JOIN ibwf_private b ON a.id = b.byuid

            WHERE b.touid='".$myid."' AND b.unread='1'

            ORDER BY b.timesent DESC

            LIMIT $limit_start, $items_per_page

    ";

  }

    

    echo "<p>";

    $items = mysql_query($sql);

    echo 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 = "<a href=\"inbox.php?action=readpm&pmid=$item[1]&sid=$sid\">$iml $item[0]</a>";

      $msg = " ".htmlspecialchars((strlen($item[6])<15?$item[6]:substr($item[6], 0, 15)));

    $image = ($item[7]);
if($image=="")
  {
 echo "<small>$lnk -  $msg...</small><br/>";

  }else{

  echo "<small>$lnk -  $msg...</small> <img src=\"../images/att.png\" width=\"15\" height=\"15\ alt=\"att\"/> <a href=\"$item[7]\">+</a><br/>";
 
  }

      
    }

    echo "</p>";

    echo "<p align=\"center\"><small>";

    

      $npage = $page+1;

     

    if($page>1)

    {

      $ppage = $page-1;

      echo "<a href=\"inbox.php?action=main&page=$ppage&sid=$sid&view=$view$exp\">«PREV</a> ";

    }

    if($page<$num_pages)

    {

      $npage = $page+1;

      echo "<a href=\"inbox.php?action=main&page=$npage&sid=$sid&view=$view$exp\">Next»</a>";

    }

    echo "<br/>Page $page of $num_pages<br/>";

    if($num_pages>2)

    {

      if($lastloc=="cht"){

	    $rets = "<form action=\"inbox.php&lstloc=cht&rid=$rid\" method=\"get\">";

	}else{

	    $rets = "<form action=\"inbox.php\" method=\"get\">";

	}

	$rets .= "<input name=\"page\" style=\"-wap-input-format: '*N'\" size=\"3\"/>";

	$rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";

	$rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";

	$rets .= "<input type=\"hidden\" name=\"view\" value=\"$view\"/>";

	$rets .= "<input type=\"Submit\" value=\"Go To Page\" Name=\"Submit\"/></form>";

        echo $rets;

    }

  echo "</p>";

  echo "<p align=\"center\">";

    }else{

      echo "You have no Inbox Messages<br/><br/>";

    }

  ////// UNTILL HERE >>

Thats all enjoy!!!!

😳 .................................... http://photomag.lk/ .................................... 🤨

Attachments: pm.zip

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