| [Top level directory] [Classes] [Functions] [Constants] [Variables] |
XMB Open Source Forum Software - PHP Cross Reference |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * eXtreme Message Board 4 * XMB 1.9.11 5 * 6 * Developed And Maintained By The XMB Group 7 * Copyright (c) 2001-2010, The XMB Group 8 * http://www.xmbforum.com 9 * 10 * Sponsored By iEntry, Inc. 11 * http://www.ientry.com 12 * 13 * This program is free software; you can redistribute it and/or 14 * modify it under the terms of the GNU General Public License 15 * as published by the Free Software Foundation; either version 2 16 * of the License, or (at your option) any later version. 17 * 18 * This program is distributed in the hope that it will be useful, 19 * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 * GNU General Public License for more details. 22 * 23 * You should have received a copy of the GNU General Public License 24 * along with this program. If not, see <http://www.gnu.org/licenses/>. 25 * 26 **/ 27 28 define('X_SCRIPT', 'u2u.php'); 29 30 require 'header.php'; 31 require ROOT.'include/u2u.inc.php'; 32 33 header('X-Robots-Tag: noindex'); 34 35 loadtemplates( 36 'u2u_header', 37 'u2u_footer', 38 'u2u_msg', 39 'u2u', 40 'u2u_folderlink', 41 'u2u_inbox', 42 'u2u_outbox', 43 'u2u_drafts', 44 'u2u_row', 45 'u2u_row_none', 46 'u2u_view', 47 'u2u_ignore', 48 'u2u_send', 49 'u2u_send_preview', 50 'u2u_folders', 51 'u2u_main', 52 'u2u_quotabar', 53 'u2u_old', 54 'u2u_printable', 55 'email_html_header', 56 'email_html_footer' 57 ); 58 59 smcwcache(); 60 61 eval('$css = "'.template('css').'";'); 62 63 $action = postedVar('action', '', FALSE, FALSE, FALSE, 'g'); 64 $sendmode = ($action == 'send') ? "true" : "false"; 65 66 eval('$u2uheader = "'.template('u2u_header').'";'); 67 eval('$u2ufooter = "'.template('u2u_footer').'";'); 68 69 if (X_GUEST) { 70 redirect("{$full_url}misc.php?action=login", 0); 71 exit; 72 } 73 74 $folder = postedVar('folder', '', TRUE, FALSE, TRUE); 75 if ($folder == '') { 76 $folder = postedVar('folder', '', TRUE, FALSE, TRUE, 'g'); 77 } 78 79 $tofolder = postedVar('tofolder', '', TRUE, FALSE, TRUE); 80 81 $folderlist = ''; 82 $folders = ''; 83 $farray = array(); 84 if ($folder != '' && ($action == '' || $action == 'mod' || $action == 'view')) { 85 //$folder = checkInput($folder, true); 86 } else { 87 $folder = 'Inbox'; 88 } 89 90 $u2ucount = u2u_folderList(); //Sets several global vars 91 $u2uid = getInt('u2uid'); 92 if (!$u2uid) { 93 $u2uid = postedVar('u2uid'); 94 } 95 96 $thewidth = ($self['useoldu2u'] == 'yes') ? $tablewidth : '100%'; 97 98 $u2upreview = ''; 99 $leftpane = ''; 100 101 switch($action) { 102 case 'modif': 103 $mod = postedVar('mod', '', FALSE, FALSE); 104 switch($mod) { 105 case 'send': 106 if ($u2uid > 0) { 107 redirect($full_url."u2u.php?action=send&u2uid=$u2uid", 0); 108 } else { 109 redirect($full_url.'u2u.php?action=send', 0); 110 } 111 break; 112 case 'reply': 113 if ($u2uid > 0) { 114 redirect($full_url."u2u.php?action=send&u2uid=$u2uid&reply=yes", 0); 115 } else { 116 redirect($full_url."u2u.php?action=send&reply=yes", 0); 117 } 118 break; 119 case 'replydel': 120 if ($u2uid > 0) { 121 redirect($full_url."u2u.php?action=send&u2uid=$u2uid&reply=yes&del=yes", 0); 122 } else { 123 redirect($full_url."u2u.php?action=send&reply=yes&del=yes", 0); 124 } 125 break; 126 case 'forward': 127 if ($u2uid > 0) { 128 redirect($full_url."u2u.php?action=send&u2uid=$u2uid&forward=yes", 0); 129 } else { 130 redirect($full_url."u2u.php?action=send&forward=yes", 0); 131 } 132 break; 133 case 'sendtoemail': 134 u2u_print($u2uid, true); 135 break; 136 case 'delete': 137 u2u_delete($u2uid, $folder); 138 break; 139 case 'move': 140 u2u_move($u2uid, $tofolder); 141 break; 142 case 'markunread': 143 u2u_markUnread($u2uid, $folder, $type); 144 break; 145 default: 146 $leftpane = u2u_display($folder, $folders); 147 break; 148 } 149 break; 150 case 'mod': 151 $modaction = postedVar('modaction', '', FALSE, FALSE); 152 $u2u_select = getFormArrayInt('u2u_select'); 153 $tofolder = postedVar('tofolder', '', TRUE, FALSE); 154 $folder_url = recodeOut($folder); 155 switch($modaction) { 156 case 'delete': 157 if (!isset($u2u_select) || empty($u2u_select)) { 158 error($lang['textnonechosen'], false, $u2uheader, $u2ufooter, $full_url."u2u.php?folder=$folder_url", true, false, false); 159 } 160 u2u_mod_delete($folder, $u2u_select); 161 break; 162 case 'move': 163 if (!isset($tofolder) || empty($tofolder)) { 164 error($lang['textnofolder'], false, $u2uheader, $u2ufooter, $full_url.'u2u.php', true, false, false); 165 } 166 167 if (!isset($u2u_select) || empty($u2u_select)) { 168 error($lang['textnonechosen'], false, $u2uheader, $u2ufooter, $full_url."u2u.php?folder=$folder_url", true, false, false); 169 return; 170 } 171 u2u_mod_move($tofolder, $u2u_select); 172 break; 173 case 'markunread': 174 if (!isset($u2u_select) || empty($u2u_select)) { 175 error($lang['textnonechosen'], false, $u2uheader, $u2ufooter, $full_url."u2u.php?folder=$folder_url", true, false, false); 176 } 177 u2u_mod_markUnread($folder, $u2u_select); 178 break; 179 default: 180 error($lang['testnothingchos'], false, $u2uheader, $u2ufooter, $full_url."u2u.php?folder=$folder_url", true, false, false); 181 break; 182 } 183 break; 184 case 'send': 185 $msgto = postedVar('msgto', 'javascript', TRUE, FALSE, TRUE); 186 $subject = postedVar('subject', 'javascript', TRUE, FALSE, TRUE); 187 $message = postedVar('message', '', TRUE, FALSE); 188 $leftpane = u2u_send($u2uid, $msgto, $subject, $message, $u2upreview); 189 break; 190 case 'view': 191 $leftpane = u2u_view($u2uid, $folders); 192 break; 193 case 'printable': 194 u2u_print($u2uid, false); 195 break; 196 case 'folders': 197 if (onSubmit('folderssubmit')) { 198 $u2ufolders = postedVar('u2ufolders', 'javascript', TRUE, FALSE, TRUE); 199 u2u_folderSubmit($u2ufolders, $folders); 200 } else { 201 eval('$leftpane = "'.template('u2u_folders').'";'); 202 } 203 break; 204 case 'ignore': 205 $leftpane = u2u_ignore(); 206 break; 207 case 'emptytrash': 208 $db->query("DELETE FROM ".X_PREFIX."u2u WHERE folder='Trash' AND owner='$xmbuser'"); 209 u2u_msg($lang['texttrashemptied'], 'u2u.php'); 210 break; 211 default: 212 $leftpane = u2u_display($folder, $folders); 213 break; 214 } 215 216 if (!X_STAFF) { 217 $percentage = (0 == $SETTINGS['u2uquota']) ? 0 : (float)(($u2ucount / $SETTINGS['u2uquota']) * 100); 218 if ($percentage > 100) { 219 $barwidth = 100; 220 eval($lang['evaluqinfo_over']); 221 } else { 222 $percent = number_format($percentage, 2); 223 $barwidth = number_format($percentage, 0); 224 eval($lang['evaluqinfo']); 225 } 226 } else { 227 $barwidth = $percentage = 0; 228 eval($lang['evalu2ustaffquota']); 229 } 230 eval('$u2uquotabar = "'.template('u2u_quotabar').'";'); 231 $tu2u = ($self['useoldu2u'] == 'yes') ? 'u2u_old' : 'u2u'; 232 eval('echo "'.template($tu2u).'";'); 233 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Tue Jan 26 20:11:23 2010 | Home | Forum | Download | SVN | Bug Tracker | Documentation | Cross-referenced by PHPXref 0.7 |