Location: PHPKode > projects > Warp.cms - php/mysql content management > warp_121/adm_contact.php
<?php

// [administrator contact / company contact module v.1.2.1] 
// xantis.warp.cms - version 1.2
// (c) 2002 xantis - all rights reserved
// this code is registered and protected by international copyrights laws


//####### Register Globals !

extract($HTTP_ENV_VARS);
extract($HTTP_GET_VARS);
extract($HTTP_POST_VARS);
extract($HTTP_COOKIE_VARS);
extract($HTTP_SERVER_VARS);

//#########################

$xnt_control_var = 'xnt2002warp.cms';

require("lib_adv.php");


//check session
if (strlen($wpsid) < '32') {
	$hlocal_sess_req_redr = "$ywebsite_addr".'xindex.php';
	header("Location: $hlocal_sess_req_redr");
} //end if

//#######################################



function xadmin_contact () {


global	$wpsid, $ywusr_adm_cont_frm_name, $warp_user_admin_contact,
	$ywebsite_addr, $y_warp_picts_dir, $PHP_AUTH_USER, $PHP_AUTH_PW,
	$arr_var_result, $vxmsgx ;

global	$ywarp_max_display_cfg, $ybar_menu_color, $y_warp_back_text_x,
	$ybar_color, $ymain_color, $warp_enquiry_adm, $ysmall_text_color,
	$y_warp_back_text, $ywusr_adm_cont_process, $ywusr_adm_cont_status,
	$ywusr_adm_cont_xname, $ywusr_adm_cont_xemail, $ywusr_adm_cont_xmsg,
	$y_warp_post_text_mark, $y_warp_post_text_hint, $ywusr_adm_cont_bttn, $yprods_back_text,
	$yprods_item_askfordetails, $yprods_item_reffer_x, $refxmsg,
	$warp_user_office_contact, $y_warp_events_reff_x, $y_warp_events_text,
	$y_warp_events_contacting, $warp_user_office_contact, $ywusr_adm_cont_frm_name_ofx ;

global $opvar, $xbackurl;


//------------------------ get user auth
//read from users
$WARP_B64_ENC_AUTH_PASSW = base64_encode($PHP_AUTH_PW);
xmysql_read_data_fl ("SELECT id, usr_email, usr_fname, usr_sname FROM users WHERE ( (usr_name='$PHP_AUTH_USER') AND (usr_pass='$WARP_B64_ENC_AUTH_PASSW') )");
$crrx_usr_id = $arr_var_result[0];
$crrx_usr_email = $arr_var_result[1];
$crrx_usr_fname = $arr_var_result[2];
$crrx_usr_sname = $arr_var_result[3];
//------------------------ 




//---------------------
if (empty($opvar)) {
   $opvar = 'admx';
} //end if
//---------------------

$hv_local_pictx = 'contact_us.jpg';

//############################## operation default

if ($opvar == 'admx') {

	$hv_local_pagetitle = $warp_user_admin_contact;
	$hv_local_pagetitle_xsubj = $ywusr_adm_cont_frm_name;
	$hv_local_msgvar = $vxmsgx;
	$hv_local_backtext = "$y_warp_back_text_x";
	$hv_local_backurl = "$ywebsite_addr"."xw_main.php"."?wpsid=$wpsid" ;
	$hv_local_opsend = 'admin';

} //end if

//############################## operation products

if ($opvar == 'pquote') {

	$hv_local_pagetitle = $warp_user_office_contact;
	$hv_local_pagetitle_xsubj = $yprods_item_askfordetails;
	$hv_local_msgvar = $yprods_item_askfordetails."\n".$yprods_item_reffer_x.' : '.$refxmsg."\n".'--------------------------------------------------------------------------------------------------'."\n";
	$hv_local_backtext = "$yprods_back_text";
	$hv_local_backurl = $xbackurl;
	$hv_local_opsend = 'offx';

} //end if

//#############################


//############################## operation events

if ($opvar == 'event') {

	$hv_local_pagetitle = $warp_user_office_contact;
	$hv_local_pagetitle_xsubj = $y_warp_events_contacting;
	$hv_local_msgvar = $y_warp_events_contacting."\n".$y_warp_events_reff_x.' : '.$refxmsg."\n".'--------------------------------------------------------------------------------------------------'."\n";
	$hv_local_backtext = "$y_warp_events_text";
	$hv_local_backurl = $xbackurl;
	$hv_local_opsend = 'offx';

} //end if

//#############################

if ($opvar == 'office') {

	$hv_local_pagetitle = $warp_user_office_contact;
	$hv_local_pagetitle_xsubj = $ywusr_adm_cont_frm_name_ofx;
	$hv_local_msgvar = $vxmsgx;
	$hv_local_backtext = "$y_warp_back_text_x";
	$hv_local_backurl = "$ywebsite_addr"."xw_main.php"."?wpsid=$wpsid" ;
	$hv_local_opsend = 'offx';

} //end if

//#############################


$hv_local_msgvar = stripslashes($hv_local_msgvar);


//---------------------------------------------------------page header
xheader ("$hv_local_pagetitle", '');
xcenter_start ();
xshow_page_title ("$hv_local_pagetitle", "$wpsid");
xnewline ();
//---------------------------------------------------------


//==================== where bar

	xtable_start ("$ywarp_max_display_cfg");
		xtable_row_start ();
			xtable_column_start ('1', '', "$ybar_menu_color");
				xtext_small ('|');
				xspace ();
				xtext_small ("<b>$hv_local_pagetitle_xsubj</b>");
				xspace ();
				xtext_small ('|');
				xspace ();
				xtext_link ("$hv_local_backtext", "$hv_local_backurl", '_self');
				xspace ();
				xtext_small ('|');
			xtable_column_end ();
		xtable_row_end ();
	xtable_end ();

	xnewline ();

//=====================================


xtable_start ("$ywarp_max_display_cfg");

	xtable_row_start ();
		xtable_column_start ('1', '100%', "$ybar_color");
			xtext_title ("&nbsp;"."$warp_enquiry_adm");
		xtable_column_end ();
	xtable_row_end ();

	xtable_row_start ();
		xtable_column_start ('1', '100%', "$ymain_color");
			xvline ('100%');
		xtable_column_end ();
	xtable_row_end ();

	xtable_row_start ();
		xtable_column_start ('1', '100%', "$ymain_color");
			xcenter_start ();

				xwriteflash_nobg_var ("$ywebsite_addr"."admc_frm.swf",
					"&flash_form_backcolor=".rawurlencode($ybar_menu_color).
					"&flash_form_textcolor=".rawurlencode($ysmall_text_color).
					"&flash_form_text_bttn=".rawurlencode($ywusr_adm_cont_bttn).
					"&flash_form_text_back=".rawurlencode($y_warp_back_text).
					"&flash_form_text_status=".rawurlencode($ywusr_adm_cont_status." : ").
					"&flash_form_text_process=".rawurlencode($ywusr_adm_cont_process).

					"&name_txt=".rawurlencode("$y_warp_post_text_mark"."$ywusr_adm_cont_xname".' :').
					"&msg_txt=".rawurlencode("$y_warp_post_text_mark"."$ywusr_adm_cont_xmsg".' :').
					"&email_txt=".rawurlencode("$y_warp_post_text_mark"."$ywusr_adm_cont_xemail".' :').
					"&hint_txt=".rawurlencode("$y_warp_post_text_hint").

					"&email_var=".rawurlencode("$crrx_usr_email").
					"&name_var=".rawurlencode("$crrx_usr_fname"." "."$crrx_usr_sname").
					"&msg_var=".rawurlencode("$hv_local_msgvar").

					"&xcntyp=".rawurlencode("$hv_local_opsend").
					"&xcnt_subj=".rawurlencode("$hv_local_pagetitle_xsubj").

					"&flash_form_logo=".rawurlencode("$ywebsite_addr"."$y_warp_picts_dir".'/'."$hv_local_pictx").
					"&xurl=".rawurlencode("$ywebsite_addr"."admc_op.php").
					"&"
				, '450', '450');

			xcenter_end ();
		xtable_column_end ();
	xtable_row_end ();

	xtable_row_start ();
		xtable_column_start ('1', '100%', "$ymain_color");
			xvline ('100%');
		xtable_column_end ();
	xtable_row_end ();

xtable_end ();



//---------------------------------------------------------page footer
xcenter_end ();
xfooter ();
//---------------------------------------------------------

} //end function




//-------------------------------
xadmin_contact ();
//-------------------------------




// end of php code
?>
Return current item: Warp.cms - php/mysql content management