0byt3m1n1
Path:
/
data
/
applications
/
aps
/
owl
/
1.0-0
/
standard
/
htdocs
/
[
Home
]
File: mtool.php
<?php /** * mtool.php * * Author: Steve Bourgeois <owl@bozzit.com> * * Copyright (c) 2006-2009 Bozz IT Consulting Inc * * Licensed under the GNU GPL. For full terms see the file LICENSE. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ require_once(dirname(__FILE__)."/config/owl.php"); require_once($default->owl_fs_root ."/lib/disp.lib.php"); require_once($default->owl_fs_root ."/lib/owl.lib.php"); require_once($default->owl_fs_root ."/lib/security.lib.php"); if(!fIsEmailToolAccess($userid)) { displayBrowsePage($parent); } include_once($default->owl_fs_root ."/lib/header.inc"); include_once($default->owl_fs_root ."/lib/userheader.inc"); if ($sess == "0" && $default->anon_ro > 1) { printError($owl_lang->err_login); } if(!isset($type)) { $type = ""; } // V4B RNG Start $urlArgs = array(); $urlArgs['sess'] = $sess; $urlArgs['parent'] = $parent; $urlArgs['expand'] = $expand; $urlArgs['order'] = $order; $urlArgs['sortorder'] = $sortorder; $urlArgs['curview'] = $curview; // V4B RNG End printModifyHeader(); print("<br />"); $sql = new Owl_DB; $sql->query("SELECT * from $default->owl_users_table where id = '$userid'"); $sql->next_record(); $default_reply_to = $sql->f("email"); $urlArgs2 = $urlArgs; $urlArgs2['id'] = $id; $urlArgs2['action'] = 'email'; $urlArgs2['type'] = $type; //$urlArgs2['MAX_FILE_SIZE'] = $default->max_filesize; print("<form enctype='multipart/form-data' action='dbmodify.php' method='post'>\n"); print fGetHiddenFields ($urlArgs2); if (!$default->use_smtp) { print("<input type='hidden' name='ccto' value=''></input>\n"); } print("<table class='margin2' cellspacing='0' cellpadding='0' border='0' width='100%'>\n"); print("<tr>\n"); print("<td align='left' valign='top'>\n"); print("<table cellspacing='0' cellpadding='0' border='0' width='100%'>\n"); fPrintFormTextLine($owl_lang->email_to . ":" , "mailto", 60); $sql = new Owl_DB; $sQuery = "SELECT distinct username,name ,email from $default->owl_users_table u , $default->owl_users_grpmem_table m where email <> '' and disabled = '0' and (u.groupid = '$usergroupid' or m.groupid = '$usergroupid' "; $sql->query("SELECT groupid from $default->owl_users_grpmem_table where userid = '$userid' and groupid is NOT NULL"); $i = 1; while ($sql->next_record()) { if ($sql->f("groupid") != $usergroupid) { $sQuery .= " or u.groupid = '" . $sql->f("groupid") . "' or m.groupid = '" . $sql->f("groupid") . "'"; } } $sQuery .= ") order by name"; $sql->query("$sQuery"); print("<tr>\n"); print("<td class='form1'> </td>\n"); print("<td class='form1' width='100%'>"); print("<select multiple=\"multiple\" class='fpull1' name='pick_mailto[]' size='10'>\n"); print("<option value=''>" . $owl_lang->pick_select . "</option>\n"); while ($sql->next_record()) { $sUsername = $sql->f("username"); $sName = $sql->f("name"); $sEmail = $sql->f("email"); if ($sName == "") { print("<option value=" . $sEmail . " >" . $sUsername . " – (" . $sEmail . ")</option>\n"); } else { print("<option value=" . $sEmail . " >" . $sName . " – (" . $sEmail . ")</option>\n"); } } print("</select>\n</td>\n</tr>\n"); if ($default->use_smtp) { fPrintFormTextLine($owl_lang->email_cc . ":" , "ccto"); } fPrintFormTextLine($owl_lang->email_reply_to . ":" , "replyto", 30, $default_reply_to); fPrintFormTextLine($owl_lang->email_subject . ":" , "subject", 80, "$default->owl_email_subject"); fPrintFormTextArea($owl_lang->email_body . ":", "mailbody", "",20,80); fPrintFormCheckBox($owl_lang->owl_use_email_signature, "use_sig", "1", "checked"); fPrintFormTextArea($owl_lang->owl_use_email_signature, "email_sig", fGetUserEmailSignature($userid), 5,50); print("<tr>\n"); print("<td class='form1'>"); fPrintButtonSpace(1, 1); print("</td>\n"); print("<td class='form2' width='100%'>"); fPrintSubmitButton($owl_lang->btn_send_email, $owl_lang->alt_send_email, "submit", "send_file_x"); fPrintSubmitButton($owl_lang->btn_reset, $owl_lang->alt_reset_form, "reset"); print("</td>\n"); print("</tr>\n"); print("</table>\n"); print("</td></tr></table>\n"); print("</form>\n"); fPrintButtonSpace(1, 12); if ($default->show_prefs == 2 or $default->show_prefs == 3) { fPrintPrefs("infobar2"); } print("</td></tr></table>\n"); include($default->owl_fs_root . "/lib/footer.inc"); ?>