Go Back   Webmaster Malaysia Forum » Website Design & Development » Website Programming

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 21-08-2002, 10:20 AM
ejoe's Avatar
Novice Webmaster
 
Join Date: Aug 2001
Location: www.ejoe.net
Posts: 25
Rep Power: 0
ejoe is on a distinguished road
Send a message via Yahoo to ejoe
printer frindly

camner nak buat printer frindly page

sbg cth aku ade page php
then variable2 gini
$tajuk
$mesej

camner nak biar dia papar kat page satu lagi tanpa guna form
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 22-09-2002, 02:47 AM
hymns's Avatar
Senior Webmaster
 
Join Date: Nov 2001
Location: Johor
Posts: 769
Rep Power: 101
hymns is on a distinguished road
Send a message via ICQ to hymns Send a message via Yahoo to hymns
amik le nih... yang biasa je kod... baru blajo dari buku pasal eregi_replace


<?php
//cetak.php

$cetak_gambar = "0"; // 0 off 1 on
$cetak_mula = "<!-- cetak_mula -->"; //kene letak dalam fail cite
$cetak_tamat = "<!-- cetak_tamat -->"; //nih pun same

$baca = fopen($HTTP_REFERER, "rb");
$nilai = "";
while(!feof($baca)) {
$value .= fread($baca, 4096);
}
fclose($baca);
$mula= strpos($nilai, "$cetak_mula");
$tamat= strpos($nilai, "$cetak_tamat");
$panjang= $tamat-$mula;
$nilai=substr($nilai, $mula, $panjang);

function takde_gambar($isi) {
return(eregi_replace("<img src=[^>]*>", "", $isi));
}

function takde_kaler($isi) {
return(eregi_replace("<font[^>]*>", "", $isi));
}

$cetak = ("$nilai");

if ($cetak_gambar == "1") {
$cetak = takde_gambar("$cetak");
}

$cetak = takde_kaler("$cetak");
$cetak = str_replace("</font>", "", $cetak);
$cetak = stripslashes("$cetak");

echo "$cetak";
echo "<br><br>Cetak isikandungan dari laman: $HTTP_REFERER";
flush ();
?>


Kalau nak print... letak je links fail nih cam <a href=cetak.php>cetak</a> ke... ikut suke leee

sekian..........
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT +8. The time now is 03:28 AM. Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0 vBulletin skin by ForumMonkeys.com.


WebmasterMalaysia.com is Proudly Hosted by Exabytes Semi Dedicated Server.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61