mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 20:00:37 +02:00
@@ -66,6 +66,17 @@ define('LAN_PM_62', "File: [{FILENAME}] exceeds size limit - not attached");
|
||||
define('LAN_PM_63', "class:");
|
||||
define('LAN_PM_64', 'ERROR: You are not permitted to block messages from site administrators');
|
||||
define('LAN_PM_65', 'ERROR: Nothing to send');
|
||||
define('LAN_PM_66', 'Blocked Senders');
|
||||
define('LAN_PM_67', 'No users blocked');
|
||||
define('LAN_PM_68', 'User Name');
|
||||
define('LAN_PM_69', 'Date blocked');
|
||||
define('LAN_PM_70', 'Deleting block on user');
|
||||
define('LAN_PM_71', '--GOOD-- attachment(s) deleted. --FAIL-- failure(s)');
|
||||
define('LAN_PM_72', '');
|
||||
define('LAN_PM_73', '');
|
||||
define('LAN_PM_74', '');
|
||||
define('LAN_PM_75', '');
|
||||
define('LAN_PM_76', '');
|
||||
|
||||
define("LAN_PM_100", "New PM from ");
|
||||
define("LAN_PM_101", "You have received a new Private Message from ");
|
||||
|
@@ -9,13 +9,14 @@
|
||||
*
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/pm/pm.php,v $
|
||||
* $Revision: 1.12 $
|
||||
* $Date: 2009-11-18 01:05:53 $
|
||||
* $Author: e107coders $
|
||||
* $Revision: 1.13 $
|
||||
* $Date: 2009-12-10 20:40:38 $
|
||||
* $Author: e107steved $
|
||||
*/
|
||||
|
||||
|
||||
$retrieve_prefs[] = 'pm_prefs';
|
||||
require_once("../../class2.php");
|
||||
require_once('../../class2.php');
|
||||
|
||||
if($_POST['keyword'])
|
||||
{
|
||||
@@ -25,21 +26,25 @@ require_once("../../class2.php");
|
||||
|
||||
|
||||
|
||||
if (!e107::isInstalled('pm'))
|
||||
{
|
||||
header('location:'.e_BASE.'index.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
require_once(e_PLUGIN."pm/pm_class.php");
|
||||
require_once(e_PLUGIN."pm/pm_func.php");
|
||||
$lan_file = e_PLUGIN."pm/languages/".e_LANGUAGE.".php";
|
||||
include_once(is_readable($lan_file) ? $lan_file : e_PLUGIN."pm/languages/English.php");
|
||||
require_once(e_PLUGIN.'pm/pm_class.php');
|
||||
require_once(e_PLUGIN.'pm/pm_func.php');
|
||||
include_lan(e_PLUGIN.'pm/languages/'.e_LANGUAGE.'.php');
|
||||
|
||||
define("ATTACHMENT_ICON", "<img src='".e_PLUGIN."pm/images/attach.png' alt='' />");
|
||||
define('ATTACHMENT_ICON', "<img src='".e_PLUGIN."pm/images/attach.png' alt='' />");
|
||||
|
||||
$qs = explode(".", e_QUERY);
|
||||
$qs = explode('.', e_QUERY);
|
||||
$action = varset($qs[0],'inbox');
|
||||
if (!$action) $action = 'inbox';
|
||||
|
||||
$pm_proc_id = intval(varset($qs[1],0));
|
||||
|
||||
$pm_prefs = $sysprefs->getArray("pm_prefs");
|
||||
$pm_prefs = $sysprefs->getArray('pm_prefs');
|
||||
|
||||
if(!isset($pm_prefs['pm_class']) || !check_class($pm_prefs['pm_class']))
|
||||
{
|
||||
@@ -50,12 +55,24 @@ if(!isset($pm_prefs['pm_class']) || !check_class($pm_prefs['pm_class']))
|
||||
}
|
||||
|
||||
$pm =& new private_message;
|
||||
$message = "";
|
||||
$message = '';
|
||||
$pm_prefs['perpage'] = intval($pm_prefs['perpage']);
|
||||
if($pm_prefs['perpage'] == 0)
|
||||
{
|
||||
$pm_prefs['perpage'] = 10;
|
||||
}
|
||||
$pmSource = '';
|
||||
if (isset($_POST['pm_come_from']))
|
||||
{
|
||||
$pmSource = $tp->toDB($_POST['pm_come_from']);
|
||||
}
|
||||
elseif (isset($qs[2]))
|
||||
{
|
||||
$pmSource = $tp->toDB($qs[2]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//Auto-delete message, if timeout set in admin
|
||||
$del_qry = array();
|
||||
$read_timeout = intval($pm_prefs['read_timeout']);
|
||||
@@ -72,8 +89,8 @@ if($unread_timeout > 0)
|
||||
}
|
||||
if(count($del_qry) > 0)
|
||||
{
|
||||
$qry = implode(" OR ", $del_qry);
|
||||
if($sql->db_Select("private_msg", "pm_id", $qry))
|
||||
$qry = implode(' OR ', $del_qry).' AND (pm_from = '.USERID.' OR pm_to = '.USERID.')';
|
||||
if($sql->db_Select('private_msg', 'pm_id', $qry))
|
||||
{
|
||||
$delList = $sql->db_getList();
|
||||
foreach($delList as $p)
|
||||
@@ -83,13 +100,15 @@ if(count($del_qry) > 0)
|
||||
}
|
||||
}
|
||||
|
||||
if("del" == $action || isset($_POST['pm_delete_selected']))
|
||||
|
||||
|
||||
if('del' == $action || isset($_POST['pm_delete_selected']))
|
||||
{
|
||||
if(isset($_POST['pm_delete_selected']))
|
||||
{
|
||||
foreach(array_keys($_POST['selected_pm']) as $id)
|
||||
{
|
||||
$message .= LAN_PM_24.": $id <br />";
|
||||
$message .= LAN_PM_24.": {$id} <br />";
|
||||
$message .= $pm->del($id);
|
||||
}
|
||||
}
|
||||
@@ -97,25 +116,47 @@ if("del" == $action || isset($_POST['pm_delete_selected']))
|
||||
{
|
||||
$message = $pm->del($pm_proc_id);
|
||||
}
|
||||
if($qs[2] != "")
|
||||
if ($pmSource)
|
||||
{
|
||||
$action = $qs[2];
|
||||
$action = $pmSource;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(substr($_SERVER['HTTP_REFERER'], -5) == "inbox")
|
||||
if(substr($_SERVER['HTTP_REFERER'], -5) == 'inbox')
|
||||
{
|
||||
$action = "inbox";
|
||||
$action = 'inbox';
|
||||
}
|
||||
if(substr($_SERVER['HTTP_REFERER'], -6) == "outbox")
|
||||
elseif(substr($_SERVER['HTTP_REFERER'], -6) == 'outbox')
|
||||
{
|
||||
$action = "outbox";
|
||||
$action = 'outbox';
|
||||
}
|
||||
}
|
||||
$pm_proc_id = 0;
|
||||
unset($qs);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if('delblocked' == $action || isset($_POST['pm_delete_blocked_selected']))
|
||||
{
|
||||
if(isset($_POST['pm_delete_blocked_selected']))
|
||||
{
|
||||
foreach(array_keys($_POST['selected_pm']) as $id)
|
||||
{
|
||||
$message .= LAN_PM_70.": {$id} <br />";
|
||||
$message .= $pm->block_del($id).'<br />';
|
||||
}
|
||||
}
|
||||
elseif('delblocked' == $action)
|
||||
{
|
||||
$message = $pm->block_del($pm_proc_id);
|
||||
}
|
||||
$action = 'blocked';
|
||||
$pm_proc_id = 0;
|
||||
unset($qs);
|
||||
}
|
||||
|
||||
|
||||
if('block' == $action)
|
||||
{
|
||||
$message = $pm->block_add($pm_proc_id);
|
||||
@@ -130,17 +171,12 @@ if('unblock' == $action)
|
||||
$pm_proc_id = 0;
|
||||
}
|
||||
|
||||
if("get" == $action)
|
||||
if('get' == $action)
|
||||
{
|
||||
$pm->send_file($pm_proc_id, intval($qs[2]));
|
||||
exit;
|
||||
}
|
||||
|
||||
$eplug_js[] = e_FILE."jslib/prototype/prototype.js";
|
||||
$eplug_js[] = e_PLUGIN."pm/textboxlist.js";
|
||||
$eplug_js[] = e_PLUGIN."pm/test.js";
|
||||
$eplug_css[] = e_PLUGIN."pm/test.css";
|
||||
// test.
|
||||
|
||||
require_once(HEADERF);
|
||||
|
||||
@@ -150,54 +186,66 @@ if(isset($_POST['postpm']))
|
||||
$action = 'outbox';
|
||||
}
|
||||
|
||||
if($message != "")
|
||||
|
||||
|
||||
if($message != '')
|
||||
{
|
||||
$ns->tablerender("", $message);
|
||||
}
|
||||
|
||||
if("send" == $action)
|
||||
{
|
||||
$ns->tablerender(LAN_PM, show_send($pm_proc_id));
|
||||
}
|
||||
|
||||
if("reply" == $action)
|
||||
|
||||
switch ($action)
|
||||
{
|
||||
$pmid = $pm_proc_id;
|
||||
if($pm_info = $pm->pm_get($pmid))
|
||||
{
|
||||
if($pm_info['pm_to'] != USERID)
|
||||
case 'send' :
|
||||
$ns->tablerender(LAN_PM, show_send($pm_proc_id));
|
||||
break;
|
||||
|
||||
case 'reply' :
|
||||
$pmid = $pm_proc_id;
|
||||
if($pm_info = $pm->pm_get($pmid))
|
||||
{
|
||||
$ns->tablerender(LAN_PM, LAN_PM_56);
|
||||
if($pm_info['pm_to'] != USERID)
|
||||
{
|
||||
$ns->tablerender(LAN_PM, LAN_PM_56);
|
||||
}
|
||||
else
|
||||
{
|
||||
$ns->tablerender(LAN_PM, show_send());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$ns->tablerender(LAN_PM, show_send());
|
||||
$ns->tablerender(LAN_PM, LAN_PM_57);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$ns->tablerender(LAN_PM, LAN_PM_57);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'inbox' :
|
||||
$ns->tablerender(LAN_PM." - ".LAN_PM_25, show_inbox($pm_proc_id), 'PM');
|
||||
break;
|
||||
|
||||
case 'outbox' :
|
||||
$ns->tablerender(LAN_PM." - ".LAN_PM_26, show_outbox($pm_proc_id), 'PM');
|
||||
break;
|
||||
|
||||
case 'show' :
|
||||
show_pm($pm_proc_id, $pmSource);
|
||||
break;
|
||||
|
||||
case 'blocked' :
|
||||
$ns->tablerender(LAN_PM." - ".LAN_PM_66, showBlocked($pm_proc_id), 'PM');
|
||||
break;
|
||||
}
|
||||
|
||||
if("inbox" == $action)
|
||||
{
|
||||
$ns->tablerender(LAN_PM." - ".LAN_PM_25, show_inbox($pm_proc_id), "PM");
|
||||
}
|
||||
|
||||
if("outbox" == $action)
|
||||
{
|
||||
$ns->tablerender(LAN_PM." - ".LAN_PM_26, show_outbox($pm_proc_id), "PM");
|
||||
}
|
||||
|
||||
if("show" == $action)
|
||||
{
|
||||
show_pm($pm_proc_id);
|
||||
}
|
||||
|
||||
require_once(FOOTERF);
|
||||
exit;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function show_send($to_uid)
|
||||
{
|
||||
global $tp, $pm_info, $pm_prefs;
|
||||
@@ -216,9 +264,9 @@ function show_send($to_uid)
|
||||
{
|
||||
return str_replace('{PERCENT}', $pm_outbox['outbox']['filled'], LAN_PM_13);
|
||||
}
|
||||
require_once(e_PLUGIN."pm/pm_shortcodes.php");
|
||||
require_once(e_PLUGIN.'pm/pm_shortcodes.php');
|
||||
$tpl_file = THEME."pm_template.php";
|
||||
include_once(is_readable($tpl_file) ? $tpl_file : e_PLUGIN."pm/pm_template.php");
|
||||
include_once(is_readable($tpl_file) ? $tpl_file : e_PLUGIN.'pm/pm_template.php');
|
||||
$enc = (check_class($pm_prefs['attach_class']) ? "enctype='multipart/form-data'" : "");
|
||||
$text = "<form {$enc} method='post' action='".e_SELF."' id='dataform'>
|
||||
<div><input type='hidden' name='numsent' value='{$pm_outbox['outbox']['total']}' />".
|
||||
@@ -227,6 +275,8 @@ function show_send($to_uid)
|
||||
return $text;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function show_inbox($start = 0)
|
||||
{
|
||||
global $pm, $tp, $pm_shortcodes, $pm_info, $pm_blocks, $pmlist, $pm_start, $pm_prefs;
|
||||
@@ -256,13 +306,16 @@ function show_inbox($start = 0)
|
||||
return $txt;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function show_outbox($start = 0)
|
||||
{
|
||||
global $pm, $tp, $pm_shortcodes, $pm_info, $pm_start, $pm_prefs, $pmlist;
|
||||
$pm_start = $start;
|
||||
require_once(e_PLUGIN."pm/pm_shortcodes.php");
|
||||
$tpl_file = THEME."pm_template.php";
|
||||
include(is_readable($tpl_file) ? $tpl_file : e_PLUGIN."pm/pm_template.php");
|
||||
require_once(e_PLUGIN.'pm/pm_shortcodes.php');
|
||||
$tpl_file = THEME.'pm_template.php';
|
||||
include(is_readable($tpl_file) ? $tpl_file : e_PLUGIN.'pm/pm_template.php');
|
||||
$pmlist = $pm->pm_get_outbox(USERID, $pm_start, $pm_prefs['perpage']);
|
||||
$txt = "<form method='post' action='".e_SELF."?".e_QUERY."'>";
|
||||
$txt .= $tp->parseTemplate($PM_OUTBOX_HEADER, true, $pm_shortcodes);
|
||||
@@ -270,7 +323,7 @@ function show_outbox($start = 0)
|
||||
{
|
||||
foreach($pmlist['messages'] as $rec)
|
||||
{
|
||||
if(trim($rec['pm_subject']) == '') { $rec['pm_subject'] = "[".LAN_PM_61."]"; }
|
||||
if(trim($rec['pm_subject']) == '') { $rec['pm_subject'] = '['.LAN_PM_61.']'; }
|
||||
$pm_info = $rec;
|
||||
$txt .= $tp->parseTemplate($PM_OUTBOX_TABLE, true, $pm_shortcodes);
|
||||
}
|
||||
@@ -284,12 +337,14 @@ function show_outbox($start = 0)
|
||||
return $txt;
|
||||
}
|
||||
|
||||
function show_pm($pmid)
|
||||
|
||||
|
||||
function show_pm($pmid, $comeFrom = '')
|
||||
{
|
||||
global $pm, $tp, $pm_shortcodes, $pm_info, $ns;
|
||||
require_once(e_PLUGIN."pm/pm_shortcodes.php");
|
||||
$tpl_file = THEME."pm_template.php";
|
||||
include_once(is_readable($tpl_file) ? $tpl_file : e_PLUGIN."pm/pm_template.php");
|
||||
require_once(e_PLUGIN.'pm/pm_shortcodes.php');
|
||||
$tpl_file = THEME.'pm_template.php';
|
||||
include_once(is_readable($tpl_file) ? $tpl_file : e_PLUGIN.'pm/pm_template.php');
|
||||
$pm_info = $pm->pm_get($pmid);
|
||||
if($pm_info['pm_to'] != USERID && $pm_info['pm_from'] != USERID)
|
||||
{
|
||||
@@ -305,16 +360,24 @@ function show_pm($pmid)
|
||||
}
|
||||
$txt .= $tp->parseTemplate($PM_SHOW, true, $pm_shortcodes);
|
||||
$ns -> tablerender(LAN_PM, $txt);
|
||||
if($pm_info['pm_from'] == USERID)
|
||||
if (!$comeFrom)
|
||||
{
|
||||
if ($pm_info['pm_from'] == USERID) { $comeFrom = 'outbox'; }
|
||||
}
|
||||
if ($comeFrom == 'outbox')
|
||||
{ // Show Outbox
|
||||
$ns->tablerender(LAN_PM." - ".LAN_PM_26, show_outbox($pm_proc_id), "PM");
|
||||
$ns->tablerender(LAN_PM." - ".LAN_PM_26, show_outbox($pm_proc_id), 'PM');
|
||||
}
|
||||
else
|
||||
{ // Show Inbox
|
||||
$ns->tablerender(LAN_PM." - ".LAN_PM_25, show_inbox($pm_proc_id), "PM");
|
||||
$ns->tablerender(LAN_PM." - ".LAN_PM_25, show_inbox($pm_proc_id), 'PM');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function post_pm()
|
||||
{
|
||||
global $pm_prefs, $pm, $pref, $sql, $tp;
|
||||
@@ -335,7 +398,7 @@ function post_pm()
|
||||
}
|
||||
if(isset($_POST['pm_to']))
|
||||
{
|
||||
$msg = "";
|
||||
$msg = '';
|
||||
if(isset($_POST['to_userclass']) && $_POST['to_userclass'])
|
||||
{
|
||||
if(!$pm_prefs['allow_userclass'])
|
||||
@@ -468,34 +531,38 @@ function pm_user_lookup()
|
||||
|
||||
echo implode(",",$u);
|
||||
echo "]";
|
||||
|
||||
// echo "[{\"caption\":\"Manuel Mujica Lainez\",\"value\":4},{\"caption\":\"Gustavo Nielsen\",\"value\":3},{\"caption\":\"Silvina Ocampo\",\"value\":3},{\"caption\":\"Victoria Ocampo\", \"value\":3},{\"caption\":\"Hector German Oesterheld\", \"value\":3},{\"caption\":\"Olga Orozco\", \"value\":3},{\"caption\":\"Juan L. Ortiz\", \"value\":3},{\"caption\":\"Alicia Partnoy\", \"value\":3},{\"caption\":\"Roberto Payro\", \"value\":3},{\"caption\":\"Ricardo Piglia\", \"value\":3},{\"caption\":\"Felipe Pigna\", \"value\":3},{\"caption\":\"Alejandra Pizarnik\", \"value\":3},{\"caption\":\"Antonio Porchia\", \"value\":3},{\"caption\":\"Juan Carlos Portantiero\", \"value\":3},{\"caption\":\"Manuel Puig\", \"value\":3},{\"caption\":\"Andres Rivera\", \"value\":3},{\"caption\":\"Mario Rodriguez Cobos\", \"value\":3},{\"caption\":\"Arturo Andres Roig\", \"value\":3},{\"caption\":\"Ricardo Rojas\", \"value\":3}]";
|
||||
}
|
||||
|
||||
exit;
|
||||
}
|
||||
|
||||
function headerjs()
|
||||
|
||||
function showBlocked($start = 0)
|
||||
{
|
||||
return " <script type='text/javascript'>
|
||||
document.observe('dom:loaded', function() {
|
||||
|
||||
|
||||
// init
|
||||
tlist2 = new FacebookList('facebook-demo', 'facebook-auto',{fetchFile:'".e_SELF."'});
|
||||
|
||||
// fetch and feed
|
||||
new Ajax.Request('".e_SELF."', {
|
||||
onSuccess: function(transport) {
|
||||
transport.responseText.evalJSON(true).each(function(t){tlist2.autoFeed(t)});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
global $pm, $tp, $pm_shortcodes, $pmBlocked, $pmTotalBlocked, $pm_start, $pm_prefs ;
|
||||
$pm_start = $start;
|
||||
require_once(e_PLUGIN.'pm/pm_shortcodes.php');
|
||||
$tpl_file = THEME.'pm_template.php';
|
||||
include(is_readable($tpl_file) ? $tpl_file : e_PLUGIN.'pm/pm_template.php');
|
||||
$pmBlocks = $pm->block_get_user(); // TODO - handle pagination, maybe (is it likely to be necessary?)
|
||||
$txt = "<form method='post' action='".e_SELF."?".e_QUERY."'>";
|
||||
$txt .= $tp->parseTemplate($PM_BLOCKED_HEADER, true, $pm_shortcodes);
|
||||
if($pmTotalBlocked = count($pmBlocks))
|
||||
{
|
||||
foreach($pmBlocks as $pmBlocked)
|
||||
{
|
||||
$txt .= $tp->parseTemplate($PM_BLOCKED_TABLE, true, $pm_shortcodes);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$txt .= $tp->parseTemplate($PM_BLOCKED_EMPTY, true, $pm_shortcodes);
|
||||
}
|
||||
$txt .= $tp->parseTemplate($PM_BLOCKED_FOOTER, true, $pm_shortcodes);
|
||||
$txt .= "</form>";
|
||||
return $txt;
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
@@ -9,9 +9,9 @@
|
||||
*
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/pm/pm_class.php,v $
|
||||
* $Revision: 1.8 $
|
||||
* $Date: 2009-11-18 01:05:53 $
|
||||
* $Author: e107coders $
|
||||
* $Revision: 1.9 $
|
||||
* $Date: 2009-12-10 20:40:38 $
|
||||
* $Author: e107steved $
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
@@ -146,22 +146,22 @@ class private_message
|
||||
{
|
||||
global $sql;
|
||||
$pmid = (int)$pmid;
|
||||
$ret = "";
|
||||
$ret = '';
|
||||
$del_pm = FALSE;
|
||||
$newvals = "";
|
||||
if($sql->db_Select("private_msg", "*", "pm_id = ".$pmid." AND (pm_from = ".USERID." OR pm_to = ".USERID.")"))
|
||||
$newvals = '';
|
||||
if($sql->db_Select('private_msg', '*', 'pm_id = '.$pmid.' AND (pm_from = '.USERID.' OR pm_to = '.USERID.')'))
|
||||
{
|
||||
$row = $sql->db_Fetch();
|
||||
if($row['pm_to'] == USERID)
|
||||
{
|
||||
$newvals = "pm_read_del = 1";
|
||||
$ret .= LAN_PM_42."<br />";
|
||||
$newvals = 'pm_read_del = 1';
|
||||
$ret .= LAN_PM_42.'<br />';
|
||||
if($row['pm_sent_del'] == 1) { $del_pm = TRUE; }
|
||||
}
|
||||
if($row['pm_from'] == USERID)
|
||||
{
|
||||
if($newvals != "") { $del_pm = TRUE; }
|
||||
$newvals = "pm_sent_del = 1";
|
||||
if($newvals != '') { $del_pm = TRUE; }
|
||||
$newvals = 'pm_sent_del = 1';
|
||||
$ret .= LAN_PM_43."<br />";
|
||||
if($row['pm_read_del'] == 1) { $del_pm = TRUE; }
|
||||
}
|
||||
@@ -170,16 +170,26 @@ class private_message
|
||||
{
|
||||
// Delete any attachments and remove PM from db
|
||||
$attachments = explode(chr(0), $row['pm_attachments']);
|
||||
$aCount = array(0,0);
|
||||
foreach($attachments as $a)
|
||||
{
|
||||
$filename = getcwd()."/attachments/{$a}";
|
||||
unlink($filename);
|
||||
$a = trim($a);
|
||||
if ($a)
|
||||
{
|
||||
// $filename = getcwd()."/attachments/{$a}";
|
||||
$filename = e_PLUGIN.'pm/attachments/'.$a;
|
||||
if (unlink($filename)) $aCount[0]++; else $aCount[1]++;
|
||||
}
|
||||
}
|
||||
$sql->db_Delete("private_msg", "pm_id = ".$pmid);
|
||||
if ($aCount[0] || $aCount[1])
|
||||
{
|
||||
$ret .= str_replace(array('--GOOD--', '--FAIL--'), $aCount, LAN_PM_71).'<br />';
|
||||
}
|
||||
$sql->db_Delete('private_msg', 'pm_id = '.$pmid);
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql->db_Update("private_msg", $newvals." WHERE pm_id = ".$pmid);
|
||||
$sql->db_Update('private_msg', $newvals.' WHERE pm_id = '.$pmid);
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
@@ -187,7 +197,7 @@ class private_message
|
||||
|
||||
function pm_send_notify($uid, $pminfo, $pmid, $attach_count = 0)
|
||||
{
|
||||
require_once(e_HANDLER."mail.php");
|
||||
require_once(e_HANDLER.'mail.php');
|
||||
global $PLUGINS_DIRECTORY;
|
||||
$subject = LAN_PM_100.SITENAME;
|
||||
$pmlink = SITEURL.$PLUGINS_DIRECTORY."pm/pm.php?show.{$pmid}";
|
||||
@@ -215,15 +225,43 @@ class private_message
|
||||
sendemail($pminfo['from_email'], $subject, $txt, $pminfo['from_name']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get list of users blocked from sending to a specific user ID.
|
||||
* @param integer $to - user ID
|
||||
* @return array of blocked users as user IDs
|
||||
*/
|
||||
function block_get($to = USERID)
|
||||
{
|
||||
global $sql;
|
||||
$ret = array();
|
||||
$to = intval($to); // Precautionary
|
||||
if ($sql->db_Select('private_msg_block', 'pm_block_from', 'pm_block_to = '.$to))
|
||||
{
|
||||
while($row = $sql->db_Fetch(MYSQL_ASSOC))
|
||||
{
|
||||
$ret[] = $row['pm_block_from'];
|
||||
}
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get list of users blocked from sending to a specific user ID.
|
||||
* @param integer $to - user ID
|
||||
* @return array of blocked users, including specific user info
|
||||
*/
|
||||
function block_get_user($to = USERID)
|
||||
{
|
||||
global $sql, $tp;
|
||||
$ret = array();
|
||||
if($sql->db_Select("private_msg_block", "pm_block_from", "pm_block_to = '".$tp -> toDB($to)."'"))
|
||||
$to = intval($to); // Precautionary
|
||||
if ($sql->db_Select_gen('SELECT pm.*, u.user_name FROM `#private_msg_block` AS pm LEFT JOIN `#user` AS u ON `pm`.`pm_block_from` = `u`.`user_id` WHERE pm_block_to = '.$to))
|
||||
{
|
||||
while($row = $sql->db_Fetch())
|
||||
while($row = $sql->db_Fetch(MYSQL_ASSOC))
|
||||
{
|
||||
$ret[] = $row['pm_block_from'];
|
||||
$ret[] = $row;
|
||||
}
|
||||
}
|
||||
return $ret;
|
||||
@@ -265,15 +303,16 @@ class private_message
|
||||
function block_del($from, $to = USERID)
|
||||
{
|
||||
global $sql;
|
||||
if($sql->db_Select("user", "user_name", "user_id = '".intval($from)."'"))
|
||||
$from = intval($from);
|
||||
if($sql->db_Select('user', 'user_name', 'user_id = '.$from))
|
||||
{
|
||||
$uinfo = $sql->db_Fetch();
|
||||
if($sql->db_Select("private_msg_block", "pm_block_id", "pm_block_from = '".intval($from)."' AND pm_block_to = '".intval($to)."'"))
|
||||
if($sql->db_Select('private_msg_block', 'pm_block_id', 'pm_block_from = '.$from.' AND pm_block_to = '.intval($to)))
|
||||
{
|
||||
$row = $sql->db_Fetch();
|
||||
if($sql->db_Delete("private_msg_block", "pm_block_id = '".intval($row['pm_block_id'])."'"))
|
||||
if($sql->db_Delete('private_msg_block', 'pm_block_id = '.intval($row['pm_block_id'])))
|
||||
{
|
||||
return str_replace("{UNAME}", $uinfo['user_name'], LAN_PM_44);
|
||||
return str_replace('{UNAME}', $uinfo['user_name'], LAN_PM_44);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -282,7 +321,7 @@ class private_message
|
||||
}
|
||||
else
|
||||
{
|
||||
return str_replace("{UNAME}", $uinfo['user_name'], LAN_PM_46);
|
||||
return str_replace('{UNAME}', $uinfo['user_name'], LAN_PM_46);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -294,7 +333,7 @@ class private_message
|
||||
function pm_getuid($var)
|
||||
{
|
||||
global $sql, $tp;
|
||||
|
||||
$var = trim($var);
|
||||
if($sql->db_Select("user", "user_id, user_name, user_class, user_email", "user_name LIKE '".$sql -> escape(trim($var), TRUE)."'"))
|
||||
{
|
||||
$row = $sql->db_Fetch();
|
||||
|
@@ -9,45 +9,47 @@
|
||||
*
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/pm/pm_conf.php,v $
|
||||
* $Revision: 1.6 $
|
||||
* $Date: 2009-11-18 01:05:53 $
|
||||
* $Author: e107coders $
|
||||
* $Revision: 1.7 $
|
||||
* $Date: 2009-12-10 20:40:38 $
|
||||
* $Author: e107steved $
|
||||
*/
|
||||
|
||||
$retrieve_prefs[] = 'pm_prefs';
|
||||
$eplug_admin = TRUE;
|
||||
require_once("../../class2.php");
|
||||
require_once(e_PLUGIN."pm/pm_class.php");
|
||||
require_once(e_HANDLER."userclass_class.php");
|
||||
require_once(e_HANDLER."form_handler.php");
|
||||
require_once('../../class2.php');
|
||||
require_once(e_PLUGIN.'pm/pm_class.php');
|
||||
require_once(e_HANDLER.'userclass_class.php');
|
||||
require_once(e_HANDLER.'form_handler.php');
|
||||
|
||||
if (!getperms("P"))
|
||||
if (!e107::isInstalled('pm') || !getperms('P'))
|
||||
{
|
||||
header("location:".e_BASE."index.php");
|
||||
header('location:'.e_BASE.'index.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
$action = e_QUERY;
|
||||
|
||||
require_once(e_ADMIN."auth.php");
|
||||
require_once(e_ADMIN.'auth.php');
|
||||
|
||||
if($action == "")
|
||||
if($action == '')
|
||||
{
|
||||
$action = "main";
|
||||
$action = 'main';
|
||||
}
|
||||
|
||||
$pm_prefs = $sysprefs->getArray("pm_prefs");
|
||||
$pm_prefs = $sysprefs->getArray('pm_prefs');
|
||||
|
||||
//pm_prefs record not found in core table, set to defaults and create record
|
||||
if(!is_array($pm_prefs))
|
||||
{
|
||||
require_once(e_PLUGIN."pm/pm_default.php");
|
||||
$pm_prefs = pm_set_default_prefs();
|
||||
require_once(e_PLUGIN.'pm/pm_default.php');
|
||||
$pm_prefs = pm_set_default_prefs(); // Use the default settings
|
||||
$sysprefs->setArray('pm_prefs');
|
||||
$message = ADLAN_PM_3;
|
||||
}
|
||||
|
||||
$lan_file = e_PLUGIN."pm/languages/admin/".e_LANGUAGE.".php";
|
||||
|
||||
|
||||
//$lan_file = e_PLUGIN.'pm/languages/admin/'.e_LANGUAGE.'.php';
|
||||
// include_once(is_readable($lan_file) ? $lan_file : e_PLUGIN."pm/languages/admin/English.php");
|
||||
|
||||
if (isset($_POST['update_prefs']))
|
||||
@@ -60,6 +62,7 @@ if (isset($_POST['update_prefs']))
|
||||
$message = ADLAN_PM_4;
|
||||
}
|
||||
|
||||
|
||||
if(isset($_POST['addlimit']))
|
||||
{
|
||||
if($sql->db_Select('generic','gen_id',"gen_type = 'pm_limit' AND gen_datestamp = {$_POST['newlimit_class']}"))
|
||||
@@ -109,24 +112,25 @@ if(isset($_POST['updatelimits']))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(isset($message))
|
||||
{
|
||||
$ns->tablerender("", $message);
|
||||
$ns->tablerender('', $message);
|
||||
}
|
||||
|
||||
|
||||
if($action == "main")
|
||||
switch ($action)
|
||||
{
|
||||
$ns->tablerender(ADLAN_PM_12, show_options());
|
||||
case 'main' :
|
||||
$ns->tablerender(ADLAN_PM_12, show_options());
|
||||
break;
|
||||
case 'limits' :
|
||||
$ns->tablerender(ADLAN_PM_14, show_limits());
|
||||
$ns->tablerender(ADLAN_PM_15, add_limit());
|
||||
break;
|
||||
}
|
||||
|
||||
if($action == "limits")
|
||||
{
|
||||
$ns->tablerender(ADLAN_PM_14, show_limits());
|
||||
$ns->tablerender(ADLAN_PM_15, add_limit());
|
||||
}
|
||||
|
||||
require_once(e_ADMIN."footer.php");
|
||||
require_once(e_ADMIN.'footer.php');
|
||||
|
||||
function yes_no($fname)
|
||||
{
|
||||
@@ -138,6 +142,7 @@ function yes_no($fname)
|
||||
}
|
||||
|
||||
|
||||
|
||||
function show_options()
|
||||
{
|
||||
global $pm_prefs;
|
||||
@@ -217,6 +222,10 @@ function show_options()
|
||||
return $txt;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function show_limits()
|
||||
{
|
||||
global $sql, $pref;
|
||||
|
@@ -4,19 +4,20 @@ if (!defined('e107_INIT')) { exit; }
|
||||
function pm_set_default_prefs()
|
||||
{
|
||||
$ret = array(
|
||||
'title' => 'PMLAN_PM',
|
||||
'title' => 'PMLAN_PM',
|
||||
'animate' => '1',
|
||||
'dropdown' => '0',
|
||||
'read_timeout' => '0',
|
||||
'read_timeout' => '0',
|
||||
'unread_timeout' => '0',
|
||||
'popup' => '0',
|
||||
'popup_delay' => '',
|
||||
'perpage' => '10',
|
||||
'pm_class' => e_UC_MEMBER,
|
||||
'notify_class' => e_UC_ADMIN,
|
||||
'receipt_class' => e_UC_MEMBER,
|
||||
'receipt_class' => e_UC_MEMBER,
|
||||
'attach_class' => e_UC_ADMIN,
|
||||
'attach_size' => 500,
|
||||
'sendall_class' => e_UC_ADMIN,
|
||||
'sendall_class' => e_UC_ADMIN,
|
||||
'multi_class' => e_UC_ADMIN,
|
||||
'allow_userclass' => '1'
|
||||
);
|
||||
|
@@ -9,9 +9,9 @@
|
||||
*
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/pm/pm_shortcodes.php,v $
|
||||
* $Revision: 1.13 $
|
||||
* $Date: 2009-11-18 01:05:53 $
|
||||
* $Author: e107coders $
|
||||
* $Revision: 1.14 $
|
||||
* $Date: 2009-12-10 20:40:38 $
|
||||
* $Author: e107steved $
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
@@ -29,27 +29,6 @@ if($pm_info['from_name'])
|
||||
require_once(e_HANDLER."user_select_class.php");
|
||||
$us = new user_select;
|
||||
$type = ($pm_prefs['dropdown'] == TRUE ? 'list' : 'popup');
|
||||
|
||||
|
||||
$ret = "<ol>
|
||||
|
||||
<li id=\"facebook-list\" class=\"input-text\">
|
||||
<input type=\"text\" value=\"\" id=\"facebook-demo\" />
|
||||
<div id=\"facebook-auto\">
|
||||
|
||||
<div class=\"default\">Type the name of a user</div>
|
||||
<ul class=\"feed\">
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
</ol>";
|
||||
|
||||
return $ret;
|
||||
|
||||
|
||||
|
||||
if(check_class($pm_prefs['multi_class']))
|
||||
{
|
||||
$ret = $us->select_form($type, 'textarea.pm_to');
|
||||
@@ -61,6 +40,7 @@ else
|
||||
return $ret;
|
||||
SC_END
|
||||
|
||||
|
||||
SC_BEGIN FORM_TOCLASS
|
||||
global $pm_prefs, $pm_info;
|
||||
if($pm_info['from_name'])
|
||||
@@ -259,10 +239,13 @@ SC_END
|
||||
|
||||
SC_BEGIN PM_SUBJECT
|
||||
global $pm_info, $tp;
|
||||
$ret = $tp->toHTML($pm_info['pm_subject'], true, 'no_make_clickable,no_hook');
|
||||
if('link' == $parm)
|
||||
$ret = $tp->toHTML($pm_info['pm_subject'], true, 'USER_TITLE');
|
||||
$prm = explode(',',$parm);
|
||||
if('link' == $prm[0])
|
||||
{
|
||||
$ret = "<a href='".e_PLUGIN_ABS."pm/pm.php?show.{$pm_info['pm_id']}'>".$ret."</a>";
|
||||
$extra = '';
|
||||
if (isset($prm[1])) $extra = '.'.$prm[1];
|
||||
$ret = "<a href='".e_PLUGIN_ABS."pm/pm.php?show.{$pm_info['pm_id']}{$extra}'>".$ret."</a>";
|
||||
}
|
||||
return $ret;
|
||||
SC_END
|
||||
@@ -392,10 +375,63 @@ if($pm_prefs['animate'])
|
||||
return '';
|
||||
SC_END
|
||||
|
||||
|
||||
|
||||
SC_BEGIN PM_NEXTPREV
|
||||
global $pmlist, $tp, $pm_start, $pm_prefs, $pmlist;
|
||||
return $tp->parseTemplate("{NEXTPREV={$pmlist['total_messages']},{$pm_prefs['perpage']},{$pm_start},".e_SELF."?{$parm}.[FROM]}");
|
||||
SC_END
|
||||
|
||||
|
||||
//---------------------------------------
|
||||
// Blocked senders management
|
||||
//---------------------------------------
|
||||
SC_BEGIN BLOCKED_SENDERS_MANAGE
|
||||
global $sql;
|
||||
$count = $sql->db_Count('private_msg_block', '(*)', 'WHERE `pm_block_to` = '.USERID);
|
||||
if (!$count) return '';
|
||||
return LAN_PM_66;
|
||||
SC_END
|
||||
|
||||
|
||||
SC_BEGIN PM_BLOCKED_SELECT
|
||||
global $pmBlocked;
|
||||
return "<input type='checkbox' name='selected_pm[{$pmBlocked['pm_block_from']}]' value='1' />";
|
||||
SC_END
|
||||
|
||||
|
||||
|
||||
SC_BEGIN PM_BLOCKED_USER
|
||||
global $pmBlocked;
|
||||
if (!$pmBlocked['user_name'])
|
||||
{
|
||||
return LAN_PM_72;
|
||||
}
|
||||
if('link' == $parm)
|
||||
{
|
||||
return "<a href='".e_BASE."user.php?id.{$pmBlocked['pm_block_from']}'>{$pmBlocked['user_name']}</a>";
|
||||
}
|
||||
else
|
||||
{
|
||||
return $pmBlocked['user_name'];
|
||||
}
|
||||
SC_END
|
||||
|
||||
|
||||
SC_BEGIN PM_BLOCKED_DATE
|
||||
global $pmBlocked;
|
||||
require_once(e_HANDLER.'date_handler.php');
|
||||
return convert::convert_date($pmBlocked['pm_block_datestamp'], $parm);
|
||||
SC_END
|
||||
|
||||
SC_BEGIN PM_BLOCKED_DELETE
|
||||
global $pmBlocked;
|
||||
return "<a href='".e_PLUGIN_ABS."pm/pm.php?delblocked.{$pmBlocked['pm_block_from']}'><img src='".e_PLUGIN_ABS."pm/images/mail_delete.png' title='".LAN_PM_52."' alt='".LAN_PM_52."' class='icon S16' /></a>";
|
||||
SC_END
|
||||
|
||||
SC_BEGIN DELETE_BLOCKED_SELECTED
|
||||
return "<input type='submit' name='pm_delete_blocked_selected' class='button' value='".LAN_PM_53."' />";
|
||||
SC_END
|
||||
|
||||
*/
|
||||
?>
|
@@ -9,9 +9,9 @@
|
||||
*
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/pm/pm_template.php,v $
|
||||
* $Revision: 1.5 $
|
||||
* $Date: 2009-11-18 01:05:53 $
|
||||
* $Author: e107coders $
|
||||
* $Revision: 1.6 $
|
||||
* $Date: 2009-12-10 20:40:39 $
|
||||
* $Author: e107steved $
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
@@ -101,7 +101,7 @@ $PM_INBOX_TABLE = "
|
||||
<tr>
|
||||
<td class='forumheader3'>{PM_SELECT}</td>
|
||||
<td class='forumheader3'>{PM_READ_ICON}</td>
|
||||
<td class='forumheader3'>{PM_SUBJECT=link}{PM_ATTACHMENT_ICON}</td>
|
||||
<td class='forumheader3'>{PM_SUBJECT=link,inbox}{PM_ATTACHMENT_ICON}</td>
|
||||
<td class='forumheader3'>{PM_FROM=link}</td>
|
||||
<td class='forumheader3'>{PM_DATE}</td>
|
||||
<td class='forumheader3' style='text-align: center; white-space: nowrap'>{PM_DELETE=inbox} {PM_BLOCK_USER}</td>
|
||||
@@ -117,6 +117,7 @@ $PM_INBOX_EMPTY = "
|
||||
$PM_INBOX_FOOTER = "
|
||||
<tr>
|
||||
<td class='forumheader' colspan='6' style='text-align:center'>
|
||||
<input type='hidden' name='pm_come_from' value='inbox' />
|
||||
{DELETE_SELECTED}
|
||||
</td>
|
||||
</tr>
|
||||
@@ -140,7 +141,7 @@ $PM_OUTBOX_TABLE = "
|
||||
<tr>
|
||||
<td class='forumheader3'>{PM_SELECT}</td>
|
||||
<td class='forumheader3'>{PM_READ_ICON}</td>
|
||||
<td class='forumheader3'>{PM_SUBJECT=link}{PM_ATTACHMENT_ICON}</td>
|
||||
<td class='forumheader3'>{PM_SUBJECT=link,outbox}{PM_ATTACHMENT_ICON}</td>
|
||||
<td class='forumheader3'>{PM_TO=link}</td>
|
||||
<td class='forumheader3'>{PM_DATE}</td>
|
||||
<td class='forumheader3' style='text-align: center'>{PM_DELETE=outbox}</td>
|
||||
@@ -156,6 +157,7 @@ $PM_OUTBOX_EMPTY = "
|
||||
$PM_OUTBOX_FOOTER = "
|
||||
<tr>
|
||||
<td class='forumheader' colspan='6' style='text-align:center'>
|
||||
<input type='hidden' name='pm_come_from' value='outbox' />
|
||||
{DELETE_SELECTED}
|
||||
</td>
|
||||
</tr>
|
||||
@@ -163,6 +165,43 @@ $PM_OUTBOX_FOOTER = "
|
||||
</table>
|
||||
";
|
||||
|
||||
|
||||
$PM_BLOCKED_HEADER = "
|
||||
<table class='fborder' style='width:95%'>
|
||||
<tr>
|
||||
<td class='fcaption' style='width:5%'> </td>
|
||||
<td class='fcaption' style='width:48%'>".LAN_PM_68."</td>
|
||||
<td class='fcaption' style='width:42%'>".LAN_PM_69."</td>
|
||||
<td class='fcaption' style='width:5%'> </td>
|
||||
</tr>
|
||||
";
|
||||
|
||||
$PM_BLOCKED_TABLE = "
|
||||
<tr>
|
||||
<td class='forumheader3'>{PM_BLOCKED_SELECT}</td>
|
||||
<td class='forumheader3'>{PM_BLOCKED_USER=link}</td>
|
||||
<td class='forumheader3'>{PM_BLOCKED_DATE}</td>
|
||||
<td class='forumheader3' style='text-align: center'>{PM_BLOCKED_DELETE}</td>
|
||||
</tr>
|
||||
";
|
||||
|
||||
$PM_BLOCKED_EMPTY = "
|
||||
<tr>
|
||||
<td colspan='4' class='forumheader'>".LAN_PM_67."</td>
|
||||
</tr>
|
||||
";
|
||||
|
||||
$PM_BLOCKED_FOOTER = "
|
||||
<tr>
|
||||
<td class='forumheader' colspan='4' style='text-align:center'>
|
||||
{DELETE_BLOCKED_SELECTED}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
";
|
||||
|
||||
|
||||
|
||||
$PM_SHOW =
|
||||
"<div style='text-align: center'>
|
||||
<table class='fborder' style='width:95%'>
|
||||
|
@@ -9,24 +9,25 @@
|
||||
*
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/pm/private_msg_menu.php,v $
|
||||
* $Revision: 1.9 $
|
||||
* $Date: 2009-11-18 01:05:53 $
|
||||
* $Author: e107coders $
|
||||
* $Revision: 1.10 $
|
||||
* $Date: 2009-12-10 20:40:39 $
|
||||
* $Author: e107steved $
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
if (!e107::isInstalled('pm')) { return ''; }
|
||||
global $sysprefs, $pref, $pm_prefs;
|
||||
if(!isset($pm_prefs['perpage']))
|
||||
{
|
||||
$pm_prefs = $sysprefs->getArray("pm_prefs");
|
||||
$pm_prefs = $sysprefs->getArray('pm_prefs');
|
||||
}
|
||||
require_once(e_PLUGIN."pm/pm_func.php");
|
||||
require_once(e_PLUGIN.'pm/pm_func.php');
|
||||
pm_getInfo('clear');
|
||||
|
||||
define("PM_INBOX_ICON", "<img src='".e_PLUGIN_ABS."pm/images/mail_get.png' class='icon S16' alt='".LAN_PM_25."' title='".LAN_PM_25."' />");
|
||||
define("PM_OUTBOX_ICON", "<img src='".e_PLUGIN_ABS."pm/images/mail_send.png' class='icon S16' alt='".LAN_PM_26."' title='".LAN_PM_26."' />");
|
||||
define("PM_SEND_LINK", LAN_PM_35);
|
||||
define("NEWPM_ANIMATION", "<img src='".e_PLUGIN_ABS."pm/images/newpm.gif' alt='' />");
|
||||
define('PM_INBOX_ICON', "<img src='".e_PLUGIN_ABS."pm/images/mail_get.png' class='icon S16' alt='".LAN_PM_25."' title='".LAN_PM_25."' />");
|
||||
define('PM_OUTBOX_ICON', "<img src='".e_PLUGIN_ABS."pm/images/mail_send.png' class='icon S16' alt='".LAN_PM_26."' title='".LAN_PM_26."' />");
|
||||
define('PM_SEND_LINK', LAN_PM_35);
|
||||
define('NEWPM_ANIMATION', "<img src='".e_PLUGIN_ABS."pm/images/newpm.gif' alt='' />");
|
||||
|
||||
|
||||
$sc_style['SEND_PM_LINK']['pre'] = "<br /><br />[ ";
|
||||
@@ -41,6 +42,9 @@ $sc_style['OUTBOX_FILLED']['post'] = "%]";
|
||||
$sc_style['NEWPM_ANIMATE']['pre'] = "<a href='".e_PLUGIN_ABS."pm/pm.php?inbox'>";
|
||||
$sc_style['NEWPM_ANIMATE']['post'] = "</a>";
|
||||
|
||||
$sc_style['BLOCKED_SENDERS_MANAGE']['pre'] = "<br />[ <a href='".e_PLUGIN_ABS."pm/pm.php?blocked'>";
|
||||
$sc_style['BLOCKED_SENDERS_MANAGE']['post'] = '</a> ]';
|
||||
|
||||
|
||||
if(!isset($pm_menu_template))
|
||||
{
|
||||
@@ -55,6 +59,7 @@ if(!isset($pm_menu_template))
|
||||
<a href='{URL=pm|main|f=box&box=outbox}'>".LAN_PM_26."</a><br />
|
||||
{OUTBOX_TOTAL} ".LAN_PM_36.", {OUTBOX_UNREAD} ".LAN_PM_37." {OUTBOX_FILLED}
|
||||
{SEND_PM_LINK}
|
||||
{BLOCKED_SENDERS_MANAGE}
|
||||
";
|
||||
}
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
include_lan(e_PLUGIN."pm/languages/".e_LANGUAGE.".php");
|
||||
include_lan(e_PLUGIN.'pm/languages/'.e_LANGUAGE.'.php');
|
||||
|
||||
global $sysprefs, $pm_prefs;
|
||||
$pm_prefs = $sysprefs->getArray("pm_prefs");
|
||||
@@ -6,13 +6,13 @@ if(check_class($pm_prefs['pm_class']))
|
||||
{
|
||||
if(file_exists(THEME."forum/pm.png"))
|
||||
{
|
||||
$img = "<img src='".THEME."forum/pm.png' alt='".LAN_PM."' title='".LAN_PM."' style='border:0' />";
|
||||
$img = "<img src='".THEME_ABS."forum/pm.png' alt='".LAN_PM."' title='".LAN_PM."' style='border:0' />";
|
||||
}
|
||||
else
|
||||
{
|
||||
$img = "<img src='".e_PLUGIN."pm/images/pm.png' alt='".LAN_PM."' title='".LAN_PM."' style='border:0' />";
|
||||
$img = "<img src='".e_PLUGIN_ABS."pm/images/pm.png' alt='".LAN_PM."' title='".LAN_PM."' style='border:0' />";
|
||||
}
|
||||
return "<a href='".e_PLUGIN."pm/pm.php?send.{$parm}'>{$img}</a>";
|
||||
return "<a href='".e_PLUGIN_ABS."pm/pm.php?send.{$parm}'>{$img}</a>";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user