[ Index ] |
|
Code source de e107 0.7.8 |
1 <?php 2 /* 3 + ----------------------------------------------------------------------------+ 4 | e107 website system 5 | 6 | ©Steve Dunstan 2001-2002 7 | http://e107.org 8 | jalist@e107.org 9 | 10 | Released under the terms and conditions of the 11 | GNU General Public License (http://gnu.org). 12 | 13 | $Source: /cvsroot/e107/e107_0.7/e107_handlers/emailprint_class.php,v $ 14 | $Revision: 1.11 $ 15 | $Date: 2006/09/03 13:43:18 $ 16 | $Author: e107coders $ 17 +----------------------------------------------------------------------------+ 18 */ 19 20 if (!defined('e107_INIT')) { exit; } 21 22 @include_once(e_LANGUAGEDIR.e_LANGUAGE."/lan_print.php"); 23 @include_once(e_LANGUAGEDIR."English/lan_print.php"); 24 @include_once(e_LANGUAGEDIR.e_LANGUAGE."/lan_email.php"); 25 @include_once(e_LANGUAGEDIR."English/lan_email.php"); 26 27 class emailprint { 28 function render_emailprint($mode, $id, $look = 0) { 29 // $look = 0 --->display all icons 30 // $look = 1 --->display email icon only 31 // $look = 2 --->display print icon only 32 $text_emailprint = ""; 33 34 //new method emailprint_class : (only news is core, rest is plugin: searched for e_emailprint.php which should hold $email and $print values) 35 if($mode == "news"){ 36 $email = "news"; 37 $print = "news"; 38 }else{ 39 //load the others from plugins 40 $handle = opendir(e_PLUGIN); 41 while (false !== ($file = readdir($handle))) { 42 if ($file != "." && $file != ".." && is_dir(e_PLUGIN.$file)) { 43 $plugin_handle = opendir(e_PLUGIN.$file."/"); 44 while (false !== ($file2 = readdir($plugin_handle))) { 45 if ($file2 == "e_emailprint.php") { 46 require_once(e_PLUGIN.$file."/".$file2); 47 } 48 } 49 } 50 } 51 } 52 53 if ($look == 0 || $look == 1) { 54 $ico_mail = (file_exists(THEME."images/email.png") ? THEME."images/email.png" : e_IMAGE."generic/".IMODE."/email.png"); 55 $text_emailprint .= "<a href='".e_BASE."email.php?".$email.".".$id."'><img src='".$ico_mail."' style='border:0' alt='".LAN_EMAIL_7."' title='".LAN_EMAIL_7."' /></a> "; 56 } 57 if ($look == 0 || $look == 2) { 58 $ico_print = (file_exists(THEME."images/printer.png") ? THEME."images/printer.png" : e_IMAGE."generic/".IMODE."/printer.png"); 59 $text_emailprint .= "<a href='".e_BASE."print.php?".$print.".".$id."'><img src='".$ico_print."' style='border:0' alt='".LAN_PRINT_1."' title='".LAN_PRINT_1."' /></a>"; 60 } 61 return $text_emailprint; 62 } 63 } 64 65 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Apr 1 01:23:32 2007 | par Balluche grâce à PHPXref 0.7 |