queerfm
09-13-2006, 03:25 AM
hi i would like this php to open in a new window.
{
header(Target: blank "Location: http://www.queerfm.net/webmail");
}
this was the code the program came with i would like it to show a blank page but with the menu on the left hand side i am using PHProject
// mail.php - PHProjekt Version 5.1
// copyright © 2000-2004 Albrecht Guenther ag@phprojekt.com
// www.phprojekt.com
// Author: Albrecht Guenther, $auth$
// $Id: mail.php,v 1.33.2.1 2006/07/26 07:22:42 albrecht Exp $
$module = 'mail';
$contextmenu = 1;
$path_pre = '../';
$include_path = $path_pre.'lib/lib.inc.php';
include_once($include_path);
mail_init();
$_SESSION['common']['module'] = 'mail';
require_once($path_pre.'lib/dbman_lib.inc.php');
// check if exists the trash can and get his number
$trash_can_ID = check_trash_can($user_ID);
// check if the user is replying a folder
if ($mode == 'send_form' && isset($action2) && is_mail_folder($ID)) {
message_stack_in(__('It is not possible to reply/forward folders').$ID,$module,"error");
$mode = 'view';
print("AAAAAA<br><br><br><br><br><br>");
}
//$sent_ID = check_sent_folder($user_ID);
// array with port types, will be used on several stages
// array for mail account types and ports
// mind that the database's columnsize is currently only 10 chars for the arraykeys!
/* moved to lib.inc.php (this array is used by reminder to fecth emails
$port = array( 'pop3' => '110/pop3',
'pop3s' => '995/pop3/ssl',
'pop3 NOTLS' => '110/pop3/NOTLS',
'pop3s NVC' => '995/pop3/ssl/novalidate-cert',
'imap' => '143/imap',
'imap3' => '220/imap3',
'imaps' => '993/imap/ssl',
'imaps NVC' => '993/imap/ssl/novalidate-cert',
'imap4ssl' => '585/imap4/ssl',
'imap NOTLS' => '143/imap/NOTLS',
'imap NOVAL' => '143/imap/NOVALIDATE' );
*/
// no full mail client installed? -> only send mail possible
if (PHPR_QUICKMAIL == 1 and !$action) $mode = 'send_form';
if ($mode=='send_form') $js_inc[] = "src='../lib/fckeditor.js'>";
// call the distinct selectors
require_once('mail_selector_data.php');
echo set_page_header();
require_once($path_pre.'lib/dbman_lib.inc.php');
// include the navigation
include_once($path_pre.'lib/navigation.inc.php');
// now the actual content
echo '
<div class="outer_content">
<div class="content">
';
if ($mode=='view' or $mode=='forms') $fields = build_array('mail', $ID, $mode);
else if ($mode=='data') $fields = build_array('mail', $ID, 'forms');
// other values of the form
if (isset($_POST['subj'])) $formdata['subj'] = xss($_POST['subj']);
if (isset($_POST['body'])) $formdata['body'] = xss($_POST['body']);
if (isset($_POST['placehold'])) $formdata['placehold'] = xss($_POST['placehold']);
if (isset($_POST['receipt'])) $formdata['receipt'] = xss($_POST['receipt']);
if (isset($_POST['single'])) $formdata['single'] = xss($_POST['single']);
if (isset($_POST['sender_ID'])) $formdata['sender_ID'] = xss($_POST['sender_ID']);
if (isset($_POST['dirname'])) $formdata['dirname'] = xss($_POST['dirname']);
if (isset($_POST['additional_fax'])) $formdata['additional_fax'] = xss($_POST['additional_fax']);
// Added GET option when email is sent by the 'mailto' javascript funtion
if (isset($_GET['recipient'])) $formdata['additional_mail'] = xss($_GET['recipient']);
if (isset($_POST['additional_mail'])) $formdata['additional_mail'] = xss($_POST['additional_mail']);
if (isset($_POST['cc'])) $formdata['cc'] = xss($_POST['cc']);
if (isset($_POST['bcc'])) $formdata['bcc'] = xss($_POST['bcc']);
if (isset($_POST['modify_c'])) $formdata['modify_c'] = xss($_POST['modify_c']);
if (!isset($formdata['mem'])) {
if (isset($_POST['mem'])) $formdata['mem'] = xss_array($_POST['mem']);
}
if (!isset($formdata['con'])) {
if (isset($_POST['con'])) $formdata['con'] = xss_array($_POST['con']);
}
if (isset($formdata['persons']) && ($mode == "forms" || $formdata['modify_c']<> '')) {
$persons = $formdata['persons'];
}
include_once('./mail_'.$mode.'.php');
echo '
</div>
</div>
</body>
</html>
';
/**
* initialize the mail stuff and make some security checks
*
* @return void
*/
function mail_init() {
global $ID, $mode, $action, $output;
$output = '';
$ID = $_REQUEST['ID'] = (int) $_REQUEST['ID'];
$action = $_REQUEST['action'] = xss($_REQUEST['action']);
if (!isset($_REQUEST['mode']) ||
!in_array($_REQUEST['mode'], array('view', 'forms', 'data', 'accounts', 'down', 'fetch', 'forms',
'list', 'options', 'rules', 'send', 'send_form', 'sender'))) {
$_REQUEST['mode'] = 'view';
}
$mode = xss($_REQUEST['mode']);
}
/**
* Checks if there ara a trash can for the provided user
*
* @param int $user_ID user ID
* @return int trash can ID
*/
function check_trash_can($user_ID) {
global $dbTSnull, $user_group, $dbIDnull;
// first we will check if trash can exists
$query = "SELECT ID FROM ".DB_PREFIX."mail_client
WHERE trash_can = 'Y'
AND von = '$user_ID' ";
$result = db_query($query) or db_die();
if ($row = db_fetch_row($result)) {
$trashCanId = $row[0];
}
else {
// no trash can found, we will create one
$query = "INSERT INTO ".DB_PREFIX."mail_client
( ID, von, date_received,typ,subject, parent,acc,acc_write,gruppe, date_inserted, trash_can )
values ($dbIDnull,'$user_ID','$dbTSnull', 'd','".__("Trash Can")."','','private','','$user_group','$dbTSnull', 'Y')";
$result = db_query($query) or db_die();
$query = "SELECT ID FROM ".DB_PREFIX."mail_client
WHERE trash_can = 'Y'
AND von = '$user_ID' ";
$result = db_query($query);
if ($row = db_fetch_row($result)) {
$trashCanId = $row[0];
}
else {
die("Please, contact the sysamdin!");
}
}
return $trashCanId;
}
/**
* This function will check if the mail is into the trash can or not
*
* @param int $mail_ID mail ID
* @param int $trash_can_ID trash can folder ID
* @return boolena true or false if the mail is on trash can
*/
function in_tash_can($mail_ID, $trash_can_ID) {
while (($mail_ID <> $trash_can_ID) && ($mail_ID <> 0) && ($mail_ID <> '')) {
$query = "SELECT parent from ".DB_PREFIX."mail_client
where ID = '$mail_ID'";
$result = db_query($query);
if ($row = db_fetch_row($result)) {
$mail_ID = $row[0];
}
else {
$mail_ID = 0;
}
}
if ($mail_ID == $trash_can_ID) {
return true;
}
else {
return false;
}
}
/**
* Enter description here...
*
* @param unknown_type $mail2con
*/
function update_mail_to_contact($mail2con) {
global $user_ID, $dbIDnull;
// first of all - delete any rule for incoming/outgoing mail for this user :-))
$result = db_query("delete from ".DB_PREFIX."mail_rules
where von = '$user_ID' and
type like 'mail2con'") or db_die();
if ($mail2con <> '') {
$result = db_query("insert into ".DB_PREFIX."mail_rules
( ID, von, type )
values ($dbIDnull, '$user_ID', 'mail2con')") or db_die();
}
}
<p> </p>
If any one can help me and tell me how to edit this or you could make it so it say click here to login to your webmail and then opens a new window to http://www.queerfm.com.au/webmail
That would be great
{
header(Target: blank "Location: http://www.queerfm.net/webmail");
}
this was the code the program came with i would like it to show a blank page but with the menu on the left hand side i am using PHProject
// mail.php - PHProjekt Version 5.1
// copyright © 2000-2004 Albrecht Guenther ag@phprojekt.com
// www.phprojekt.com
// Author: Albrecht Guenther, $auth$
// $Id: mail.php,v 1.33.2.1 2006/07/26 07:22:42 albrecht Exp $
$module = 'mail';
$contextmenu = 1;
$path_pre = '../';
$include_path = $path_pre.'lib/lib.inc.php';
include_once($include_path);
mail_init();
$_SESSION['common']['module'] = 'mail';
require_once($path_pre.'lib/dbman_lib.inc.php');
// check if exists the trash can and get his number
$trash_can_ID = check_trash_can($user_ID);
// check if the user is replying a folder
if ($mode == 'send_form' && isset($action2) && is_mail_folder($ID)) {
message_stack_in(__('It is not possible to reply/forward folders').$ID,$module,"error");
$mode = 'view';
print("AAAAAA<br><br><br><br><br><br>");
}
//$sent_ID = check_sent_folder($user_ID);
// array with port types, will be used on several stages
// array for mail account types and ports
// mind that the database's columnsize is currently only 10 chars for the arraykeys!
/* moved to lib.inc.php (this array is used by reminder to fecth emails
$port = array( 'pop3' => '110/pop3',
'pop3s' => '995/pop3/ssl',
'pop3 NOTLS' => '110/pop3/NOTLS',
'pop3s NVC' => '995/pop3/ssl/novalidate-cert',
'imap' => '143/imap',
'imap3' => '220/imap3',
'imaps' => '993/imap/ssl',
'imaps NVC' => '993/imap/ssl/novalidate-cert',
'imap4ssl' => '585/imap4/ssl',
'imap NOTLS' => '143/imap/NOTLS',
'imap NOVAL' => '143/imap/NOVALIDATE' );
*/
// no full mail client installed? -> only send mail possible
if (PHPR_QUICKMAIL == 1 and !$action) $mode = 'send_form';
if ($mode=='send_form') $js_inc[] = "src='../lib/fckeditor.js'>";
// call the distinct selectors
require_once('mail_selector_data.php');
echo set_page_header();
require_once($path_pre.'lib/dbman_lib.inc.php');
// include the navigation
include_once($path_pre.'lib/navigation.inc.php');
// now the actual content
echo '
<div class="outer_content">
<div class="content">
';
if ($mode=='view' or $mode=='forms') $fields = build_array('mail', $ID, $mode);
else if ($mode=='data') $fields = build_array('mail', $ID, 'forms');
// other values of the form
if (isset($_POST['subj'])) $formdata['subj'] = xss($_POST['subj']);
if (isset($_POST['body'])) $formdata['body'] = xss($_POST['body']);
if (isset($_POST['placehold'])) $formdata['placehold'] = xss($_POST['placehold']);
if (isset($_POST['receipt'])) $formdata['receipt'] = xss($_POST['receipt']);
if (isset($_POST['single'])) $formdata['single'] = xss($_POST['single']);
if (isset($_POST['sender_ID'])) $formdata['sender_ID'] = xss($_POST['sender_ID']);
if (isset($_POST['dirname'])) $formdata['dirname'] = xss($_POST['dirname']);
if (isset($_POST['additional_fax'])) $formdata['additional_fax'] = xss($_POST['additional_fax']);
// Added GET option when email is sent by the 'mailto' javascript funtion
if (isset($_GET['recipient'])) $formdata['additional_mail'] = xss($_GET['recipient']);
if (isset($_POST['additional_mail'])) $formdata['additional_mail'] = xss($_POST['additional_mail']);
if (isset($_POST['cc'])) $formdata['cc'] = xss($_POST['cc']);
if (isset($_POST['bcc'])) $formdata['bcc'] = xss($_POST['bcc']);
if (isset($_POST['modify_c'])) $formdata['modify_c'] = xss($_POST['modify_c']);
if (!isset($formdata['mem'])) {
if (isset($_POST['mem'])) $formdata['mem'] = xss_array($_POST['mem']);
}
if (!isset($formdata['con'])) {
if (isset($_POST['con'])) $formdata['con'] = xss_array($_POST['con']);
}
if (isset($formdata['persons']) && ($mode == "forms" || $formdata['modify_c']<> '')) {
$persons = $formdata['persons'];
}
include_once('./mail_'.$mode.'.php');
echo '
</div>
</div>
</body>
</html>
';
/**
* initialize the mail stuff and make some security checks
*
* @return void
*/
function mail_init() {
global $ID, $mode, $action, $output;
$output = '';
$ID = $_REQUEST['ID'] = (int) $_REQUEST['ID'];
$action = $_REQUEST['action'] = xss($_REQUEST['action']);
if (!isset($_REQUEST['mode']) ||
!in_array($_REQUEST['mode'], array('view', 'forms', 'data', 'accounts', 'down', 'fetch', 'forms',
'list', 'options', 'rules', 'send', 'send_form', 'sender'))) {
$_REQUEST['mode'] = 'view';
}
$mode = xss($_REQUEST['mode']);
}
/**
* Checks if there ara a trash can for the provided user
*
* @param int $user_ID user ID
* @return int trash can ID
*/
function check_trash_can($user_ID) {
global $dbTSnull, $user_group, $dbIDnull;
// first we will check if trash can exists
$query = "SELECT ID FROM ".DB_PREFIX."mail_client
WHERE trash_can = 'Y'
AND von = '$user_ID' ";
$result = db_query($query) or db_die();
if ($row = db_fetch_row($result)) {
$trashCanId = $row[0];
}
else {
// no trash can found, we will create one
$query = "INSERT INTO ".DB_PREFIX."mail_client
( ID, von, date_received,typ,subject, parent,acc,acc_write,gruppe, date_inserted, trash_can )
values ($dbIDnull,'$user_ID','$dbTSnull', 'd','".__("Trash Can")."','','private','','$user_group','$dbTSnull', 'Y')";
$result = db_query($query) or db_die();
$query = "SELECT ID FROM ".DB_PREFIX."mail_client
WHERE trash_can = 'Y'
AND von = '$user_ID' ";
$result = db_query($query);
if ($row = db_fetch_row($result)) {
$trashCanId = $row[0];
}
else {
die("Please, contact the sysamdin!");
}
}
return $trashCanId;
}
/**
* This function will check if the mail is into the trash can or not
*
* @param int $mail_ID mail ID
* @param int $trash_can_ID trash can folder ID
* @return boolena true or false if the mail is on trash can
*/
function in_tash_can($mail_ID, $trash_can_ID) {
while (($mail_ID <> $trash_can_ID) && ($mail_ID <> 0) && ($mail_ID <> '')) {
$query = "SELECT parent from ".DB_PREFIX."mail_client
where ID = '$mail_ID'";
$result = db_query($query);
if ($row = db_fetch_row($result)) {
$mail_ID = $row[0];
}
else {
$mail_ID = 0;
}
}
if ($mail_ID == $trash_can_ID) {
return true;
}
else {
return false;
}
}
/**
* Enter description here...
*
* @param unknown_type $mail2con
*/
function update_mail_to_contact($mail2con) {
global $user_ID, $dbIDnull;
// first of all - delete any rule for incoming/outgoing mail for this user :-))
$result = db_query("delete from ".DB_PREFIX."mail_rules
where von = '$user_ID' and
type like 'mail2con'") or db_die();
if ($mail2con <> '') {
$result = db_query("insert into ".DB_PREFIX."mail_rules
( ID, von, type )
values ($dbIDnull, '$user_ID', 'mail2con')") or db_die();
}
}
<p> </p>
If any one can help me and tell me how to edit this or you could make it so it say click here to login to your webmail and then opens a new window to http://www.queerfm.com.au/webmail
That would be great