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

// [events 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


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

if ($warp_module_var_check_auth != 'x99warpv12.cms') {
	$y_hlocalmodz_xdate = date("Y-m-d");
	$y_hlocalmodz_xtime = date("H:i:s");
	$wpmod_xdyech =	"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n".
			"<!--:: xantis.warp.cms :: Xantis Warp - Content Management Server - v.1.2 :: $y_hlocalmodz_xdate :: $y_hlocalmodz_xtime :: -->\n".
			"<html>\n".
			"<head>\n".
			"<title>! ! !</title>\n".
			"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\n".
			"</head>\n".
			"<body bgcolor=\"#FFFFFF\" leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">\n".
			"<br>\n".
			"<div align=\"center\"><object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://active.macromedia.com/flash6/cabs/swflash.cab#version=6,0,0,0\" width=\"30\" height=\"30\">\n".
			"<param name=\"movie\" value=\"flagger.swf\">\n".
			"<param name=\"flashvars\" value=\"&xaction=err&\">\n".
			"<param name=\"quality\" value=\"high\">\n".
			"<param name=\"bgcolor\" value=\"#FFFFFF\">\n".
			"<param name=\"menu\" value=\"false\">\n".
			"<embed src=\"flagger.swf\" flashvars=\"&xaction=err&\" quality=\"high\" bgcolor=\"#FFFFFF\" width=\"30\" height=\"30\" menu=\"false\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"></embed>\n".
			"</object>\n".
			"</div>\n".
			"</body>\n".
			"</html>\n" ;
	die("$wpmod_xdyech");
} //end if



//---------------------
if (empty($evop)) {
   $evop = 'evlst';
}
//---------------------


//======================require secure

function events_secure () {

	global 	$mod_req_sec;
	global 	$evop;
	global	$y_warp_events_restrict_details_acc ;

	if (($evop == 'evdet') AND ($y_warp_events_restrict_details_acc == 'y')) {
		$mod_req_sec = 'y';
	} // end if

	return $mod_req_sec;

} //end function

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


//--------------------- data display events


function xshow_rep_events_data ($ytitle, $y_sdate, $y_edate, $ytext, $yid, $y_typ, $y_link) {

	global 	$ybar_color, $y_warp_print_text, $y_warp_xdate;
	global 	$ymain_color, $y_warp_picts_dir, $ywebsite_addr;
	global 	$ydisplay_width_corrected;
	global	$wpsid;
	global	$y_warp_events_sdate, $y_warp_events_edate;

	global	$ysmall_text_color, $y_warp_events_curr_date, $y_warp_events_ev_date ;
	global	$warp_month_01, $warp_month_02, $warp_month_03, $warp_month_04,
		$warp_month_05, $warp_month_06, $warp_month_07, $warp_month_08,
		$warp_month_09, $warp_month_10, $warp_month_11, $warp_month_12 ;
	global	$warp_fday_of_week, $warp_calendar_start, $warp_calendar_end ;
	global	$warp_day_01, $warp_day_02, $warp_day_03, $warp_day_04,
		$warp_day_05, $warp_day_06, $warp_day_07 ;

	global 	$y_warp_events_view_details, $wpqid, $wpsid,
		$offset, $qy, $qm, $qd, $qg, $qval, $evidx,
		$y_warp_events_contact_txt;


if ($y_typ == 'full') {

	$ysize = $ydisplay_width_corrected;
	$ysize_icon = '40';
	$ysize_prn = '40';
	$ysize_date = '200';
	$ysize_xcontx = '270';

	xtable_start ("$ysize");

	xtable_row_start ();
		xtable_column_start ('1', "$ysize", "$ybar_color");
			xtext_title ("$ytitle");
		xtable_column_end ();
	xtable_row_end ();

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


	xtable_row_start ();
		xtable_column_start ('1', "$ysize", "$ymain_color");

		xtable_start ("$ysize");

		xtable_row_start ();

			if ($y_warp_xdate < $y_edate) {
				$ylocal_icon_name = 'events.jpg';
			} //end if
			else {
				$ylocal_icon_name = 'events_old.jpg';
			} //end else

			//the icon
			xtable_column_start ('1', "$ysize_icon", "$ymain_color");
				xspace ();
				xpict ("$ywebsite_addr"."$y_warp_picts_dir".'/'."$ylocal_icon_name", '30', '30');
			xtable_column_end ();

			//the text
			xtable_column_start ('1', "$ysize_date", "$ymain_color");
				xspace ();
				xtext_small ("$y_warp_events_sdate".' : '.'<b>'."$y_sdate".'</b><br>');
				xspace ();
				xtext_small ("$y_warp_events_edate".' : '.'<b>'."$y_edate".'</b><br>');
				xnewline ();
			xtable_column_end ();


			xtable_column_start ('1', "$ysize_xcontx", "$ymain_color");

				if ($y_warp_xdate < $y_edate) {
					$qval = rawurlencode($qval);
					xtext_small('<br>');
					xwriteflash_bg_var ('alinker.swf',
						"&alinker_txt=".rawurlencode("$y_warp_events_contact_txt").
						"&alinker_url=".rawurlencode("$ywebsite_addr".'adm_contact.php').
						"&wpsid=".rawurlencode($wpsid).
						"&opvar=".rawurlencode('event').
						"&refxmsg=".rawurlencode(' ['.$ytitle.']').
						"&xbackurl=".rawurlencode("$ywebsite_addr"."xw_main.php"."?wpqid=$wpqid&wpsid=$wpsid&offset=$offset&qy=$qy&qm=$qm&qd=$qd&qg=$qg&qval=$qval&evop=evdet&evidx=$evidx").
						"&"
					, '250', '20', "$ymain_color");
				} //end if
				else {
					xspace();
				} //end else

			xtable_column_end ();


			//the prn
			xtable_column_start ('1', "$ysize_prn", "$ymain_color");

				xcenter_right_start ();

					$op_var = 'events';
					$op_var = base64_encode($op_var);
					$op_var = rawurlencode($op_var);

					xpict_link ("$ywebsite_addr"."$y_warp_picts_dir".'/print_mini.jpg', "$y_warp_print_text", '20', '20', "$ywebsite_addr"."print_redir.php?xid=$yid&xop=$op_var&wpsid=$wpsid", 'wnd_prn');

					xspace ();
				xcenter_end ();

			xtable_column_end ();

		xtable_row_end ();

		xtable_end ();

		xtable_column_end ();
	xtable_row_end ();
	

	xtable_row_start ();
		xtable_column_start ('1', "$ysize", "$ymain_color");

				$yxl_ev_today_arr = array ();

				$yxl_ev_es_arr = array ();
				$yxl_ev_ee_arr = array ();

				$yxl_ev_today_arr = explode("-", $y_warp_xdate);

				$yxl_ev_es_arr = explode("-", $y_sdate);
				$yxl_ev_ee_arr = explode("-", $y_edate);

				xcenter_start ();
				xwriteflash_nobg_var ("$ywebsite_addr"."ev_calend.swf",
					"&flash_form_backcolor=".rawurlencode($ymain_color).
					"&flash_form_textcolor=".rawurlencode($ysmall_text_color).
					"&curr_titl_var=".rawurlencode($y_warp_events_curr_date).
					"&event_titl_var=".rawurlencode($y_warp_events_ev_date).
					"&xnt_today_y=".rawurlencode($yxl_ev_today_arr[0]).
					"&xnt_today_m=".rawurlencode($yxl_ev_today_arr[1]).
					"&xnt_today_d=".rawurlencode($yxl_ev_today_arr[2]).
					"&xnt_start_y=".rawurlencode($warp_calendar_start).
					"&xnt_end_y=".rawurlencode($warp_calendar_end).
					"&xe_start_y=".rawurlencode($yxl_ev_es_arr[0]).
					"&xe_start_m=".rawurlencode($yxl_ev_es_arr[1]).
					"&xe_start_d=".rawurlencode($yxl_ev_es_arr[2]).
					"&xe_end_y=".rawurlencode($yxl_ev_ee_arr[0]).
					"&xe_end_m=".rawurlencode($yxl_ev_ee_arr[1]).
					"&xe_end_d=".rawurlencode($yxl_ev_ee_arr[2]).
					"&month_01=".rawurlencode($warp_month_01).
					"&month_02=".rawurlencode($warp_month_02).
					"&month_03=".rawurlencode($warp_month_03).
					"&month_04=".rawurlencode($warp_month_04).
					"&month_05=".rawurlencode($warp_month_05).
					"&month_06=".rawurlencode($warp_month_06).
					"&month_07=".rawurlencode($warp_month_07).
					"&month_08=".rawurlencode($warp_month_08).
					"&month_09=".rawurlencode($warp_month_09).
					"&month_10=".rawurlencode($warp_month_10).
					"&month_11=".rawurlencode($warp_month_11).
					"&month_12=".rawurlencode($warp_month_12).
					"&day_fw=".rawurlencode($warp_fday_of_week).
					"&day_01=".rawurlencode($warp_day_01).
					"&day_02=".rawurlencode($warp_day_02).
					"&day_03=".rawurlencode($warp_day_03).
					"&day_04=".rawurlencode($warp_day_04).
					"&day_05=".rawurlencode($warp_day_05).
					"&day_06=".rawurlencode($warp_day_06).
					"&day_07=".rawurlencode($warp_day_07).
					"&"
				, '500', '220');

				xcenter_end ();
				xvline ("$ysize");
		xtable_column_end ();
	xtable_row_end ();


	xtable_row_start ();
		xtable_column_start ('1', "$ysize", "$ymain_color");
			xtext_small ("$ytext");
			xnewline ();
			xvline ("$ysize");
		xtable_column_end ();
	xtable_row_end ();


	xtable_end ();

} //end if


if ($y_typ == 'basic') {

	$ysize = $ydisplay_width_corrected;
	$ysize_icon = '40';
	$ysize_prn = '200';
	$ysize_date = $ysize - ($ysize_icon + $ysize_prn);

	xtable_start ("$ysize");

	xtable_row_start ();
		xtable_column_start ('1', "$ysize", "$ybar_color");
			xtext_title ("$ytitle");
		xtable_column_end ();
	xtable_row_end ();

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


	xtable_row_start ();
		xtable_column_start ('1', "$ysize", "$ymain_color");

		xtable_start ("$ysize");

		xtable_row_start ();

			if ($y_warp_xdate < $y_edate) {
				$ylocal_icon_name = 'events.jpg';
			} //end if
			else {
				$ylocal_icon_name = 'events_old.jpg';
			} //end else

			//the icon
			xtable_column_start ('1', "$ysize_icon", "$ymain_color");
				xspace ();
				xpict ("$ywebsite_addr"."$y_warp_picts_dir".'/'."$ylocal_icon_name", '30', '30');
			xtable_column_end ();

			//the link
			xtable_column_start ('1', "$ysize_date", "$ymain_color");
				xspace ();
				xtext_link ("$y_warp_events_view_details", "$y_link", '_self');
			xtable_column_end ();

			//the dates
			xtable_column_start ('1', "$ysize_prn", "$ymain_color");
				xcenter_right_start ();
					xtext_small ("$y_warp_events_sdate".' : '.'<b>'."$y_sdate".'</b>');
					xspace ();
					xnewline();
					xtext_small ("$y_warp_events_edate".' : '.'<b>'."$y_edate".'</b>');
					xspace ();
					xnewline();
				xcenter_end ();
			xtable_column_end ();

		xtable_row_end ();

		xtable_end ();

		xtable_column_end ();
	xtable_row_end ();


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


	xtable_end ();

} //end if


} //end function
//----------------




function events_module () {
//-------------------


//remote and lib vars
global	$ywebsite_addr, $arr_var_result, $var_result_size, $wpqid, $wpsid ;

//cfg vars
global	$ydisplay_width_corrected, $ysite_back_color, $ybar_menu_color ;
global	$y_warp_total_text, $y_warp_filter_text, $y_warp_filter_text_bttn, $y_warp_filter_hint, $ymain_color, $ysmall_text_color ;
global	$y_warp_prev_text, $y_warp_next_text, $y_warp_filtered_text, $y_warp_picts_dir, $y_warp_filter_remove, $y_warp_filter_sign;

//events cfg vars
global	$y_warp_events_text, $y_warp_max_events_perpage, $y_warp_events_subj;
global	$warp_month_01, $warp_month_02, $warp_month_03, $warp_month_04,
	$warp_month_05, $warp_month_06, $warp_month_07, $warp_month_08,
	$warp_month_09, $warp_month_10, $warp_month_11, $warp_month_12 ;
global	$warp_fday_of_week, $warp_calendar_start, $warp_calendar_end,
	$y_warp_events_src_hint, $y_warp_xdate, $y_warp_events_date,
	$y_warp_events_src_hint_o, $y_warp_events_src_hint_n, 
	$y_warp_events_src_hint_f, $y_warp_events_view_details ;
global	$warp_day_01, $warp_day_02, $warp_day_03, $warp_day_04,
	$warp_day_05, $warp_day_06, $warp_day_07 ;

//local vars
global	$evop, $evidx, $offset, 
	$qval, $qy, $qm, $qd, $qg, $qflash_src_frm_reset;




//##################################################### Events List

if ($evop == 'evlst') {


//vars
$y_db_tablename = "events";
$limit = $y_warp_max_events_perpage;
$xdesired_fields = 'title, s_date, e_date, id';


//------------------------------------------------------search process
//vars
$qval = rawurldecode($qval);
$qval_url = rawurlencode(stripslashes($qval));
$qwval_src = trim($qval);
$qwval_src_arr = array ();
$qwval_src_arr = explode("$y_warp_filter_sign", $qwval_src);

$hlocal_querr1_ctrl = 'notok';
$hlocal_querr2_ctrl = 'notok';

$ylocal_qg_ctrl = '';
if ( ($qg=='o') OR ($qg=='n') OR ($qg=='f') ) {
	$ylocal_qg_ctrl = 'ok';
} //end if

if ( (empty($qy)) OR (empty($qm)) OR (empty($qd)) OR ($ylocal_qg_ctrl<>'ok') OR (!is_numeric($qy)) OR (!is_numeric($qm)) OR (!is_numeric($qd)) OR ($qflash_src_frm_reset == 'y') ) {
	$qy = "";
	$qm = "";
	$qd = "";
	$qg = "";
	$hlocal_date_check = 'empty' ;
} //end if
else {

	$hlocal_zzdate_val = "$qy".'-'."$qm".'-'."$qd";

	if ($qg=='n') {
		$hlocal_zzdate_compare = " (e_date>='$hlocal_zzdate_val') ";
	} //end if

	if ($qg=='o') {
		$hlocal_zzdate_compare = " (e_date<='$hlocal_zzdate_val') ";
	} //end if

	if ($qg=='f') {
		$hlocal_zzdate_compare = " ( (s_date<='$hlocal_zzdate_val') AND (e_date>='$hlocal_zzdate_val') )";
	} //end if

	$hlocal_zzdate_querr = $hlocal_zzdate_compare;
	$hlocal_querr1_ctrl = 'ok';

} //end else




$xurl = "$ywebsite_addr"."xw_main.php"."?wpqid=$wpqid&wpsid=$wpsid&offset=0";
//----------------------------------------

//filter empties
$qwval_src_arr_new = array ();
for ($i=0 ; $i<count($qwval_src_arr) ; $i++) {
	if ( trim($qwval_src_arr[$i]) <> '' ) {
		array_push ($qwval_src_arr_new, trim($qwval_src_arr[$i]));
	} //end if
} //end for

//build the querry
if (count($qwval_src_arr_new) <> '0') {
	$w_querryx_bld = " ";
	$hlocal_querr2_ctrl = 'ok';
	for ($i=0 ; $i<count($qwval_src_arr_new) ; $i++) {
		$w_querryx_bld_i = $qwval_src_arr_new[$i];
		$w_querryx_bld = " ".$w_querryx_bld." ( (event LIKE '%".$w_querryx_bld_i."%') OR (title LIKE '%".$w_querryx_bld_i."%') ) ";
		if ($i <> ( count($qwval_src_arr_new) - 1 ) ) {
			$w_querryx_bld = $w_querryx_bld." AND " ;
		} //end if
	} //end for
} //end if

//[set text if filtered] or [empty querry]
$w_src_filteredby = " - ".$y_warp_filtered_text ;
if ( (count($qwval_src_arr_new) == '0') AND ($hlocal_date_check == 'empty') ) {
	$w_querryx_bld = ' ';
	$w_src_filteredby = '';
} //end if

//-----------------------------------------------------------------


//---------------------
if (empty($offset)) {
   $offset = 0;
}
//---------------------

if ( ($hlocal_querr1_ctrl == 'ok') AND ($hlocal_querr1_ctrl == 'ok') ) {
	$w_querryx = "  WHERE ( ".$hlocal_zzdate_querr." AND ".$w_querryx_bld." ) ";
} //end if

if ( ($hlocal_querr1_ctrl == 'ok') AND ($hlocal_querr2_ctrl <> 'ok') ) {
	$w_querryx = "  WHERE ".$hlocal_zzdate_querr." ";
} //end if

if ( ($hlocal_querr1_ctrl <> 'ok') AND ($hlocal_querr2_ctrl == 'ok') ) {
	$w_querryx = "  WHERE ".$w_querryx_bld." ";
} //end if

if ( ($hlocal_querr1_ctrl <> 'ok') AND ($hlocal_querr2_ctrl <> 'ok') ) {
	$w_querryx = "  ";
} //end if


	$wquerry_main = "SELECT $xdesired_fields FROM $y_db_tablename ".$w_querryx;

	$wquerry_main_c = "SELECT COUNT(*) FROM $y_db_tablename ".$w_querryx;

	xmysql_count_data ($wquerry_main_c);
	xmysql_read_data ($wquerry_main." ORDER BY id DESC LIMIT $offset, $limit");


//---------------------------------------------
	//vars
	$newoffsetnext = $offset + $limit ;
	$newoffsetprev = $offset - $limit ;
	$offsetlistedmin = $offset + 1;

	if ($newoffsetnext <= $var_result_size) {
		$offsetlistedmax = $newoffsetnext;
	} //end if
	else {
		$offsetlistedmax = $var_result_size;
	} //end else

	if ($offsetlistedmax == 0) {
		$offsetlistedmin = 0;
	} //end if
//---------------------------------------------


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

xtable_start ("$ydisplay_width_corrected");
	xtable_row_start ();
		xtable_column_start ('1', '', "$ysite_back_color");
			xcenter_start ();

				xwriteflash_nobg_var ("$ywebsite_addr"."src_frm.swf",
					"&flash_form_backcolor=".rawurlencode($ymain_color).
					"&flash_form_textcolor=".rawurlencode($ysmall_text_color).
					"&flash_form_text_flby=".rawurlencode($y_warp_filter_text).
					"&flash_form_text_hint=".rawurlencode($y_warp_filter_hint).
					"&flash_form_text_bttn=".rawurlencode($y_warp_filter_text_bttn).
					"&flash_form_logo=".rawurlencode("$ywebsite_addr"."$y_warp_picts_dir".'/events.jpg').
					"&flash_form_listall=".rawurlencode($y_warp_filter_remove).
					"&qval_hint=".rawurlencode("[$y_warp_events_subj | $y_warp_events_text]").
					"&qval=".$qval_url.
					"&xurl=".rawurlencode("$xurl"."&qy=$qy&qm=$qm&qd=$qd&qg=$qg").
					"&"
				, '500', '40');

				xnewline ();

			//---------------------------
				$yxl_evw_today_arr = array ();
				$yxl_evw_today_arr = explode("-", $y_warp_xdate);
			//---------------------------


				xwriteflash_nobg_var ("$ywebsite_addr"."src_date.swf",
					"&flash_form_backcolor=".rawurlencode($ymain_color).
					"&flash_form_textcolor=".rawurlencode($ysmall_text_color).
					"&flash_form_text_bttn=".rawurlencode($y_warp_filter_text_bttn).
					"&st_titl=".rawurlencode($y_warp_events_src_hint).
					"&flash_form_opt_o=".rawurlencode($y_warp_events_src_hint_o.' :').
					"&flash_form_opt_n=".rawurlencode($y_warp_events_src_hint_n.' :').
					"&flash_form_opt_f=".rawurlencode($y_warp_events_src_hint_f.' :').
					"&st_emp=".rawurlencode('['.$y_warp_events_date.']').
					"&xnt_today_y=".rawurlencode($yxl_evw_today_arr[0]).
					"&xnt_today_m=".rawurlencode($yxl_evw_today_arr[1]).
					"&xnt_today_d=".rawurlencode($yxl_evw_today_arr[2]).
					"&xnt_start_y=".rawurlencode($warp_calendar_start).
					"&xnt_end_y=".rawurlencode($warp_calendar_end).
					"&month_01=".rawurlencode($warp_month_01).
					"&month_02=".rawurlencode($warp_month_02).
					"&month_03=".rawurlencode($warp_month_03).
					"&month_04=".rawurlencode($warp_month_04).
					"&month_05=".rawurlencode($warp_month_05).
					"&month_06=".rawurlencode($warp_month_06).
					"&month_07=".rawurlencode($warp_month_07).
					"&month_08=".rawurlencode($warp_month_08).
					"&month_09=".rawurlencode($warp_month_09).
					"&month_10=".rawurlencode($warp_month_10).
					"&month_11=".rawurlencode($warp_month_11).
					"&month_12=".rawurlencode($warp_month_12).
					"&day_fw=".rawurlencode($warp_fday_of_week).
					"&day_01=".rawurlencode($warp_day_01).
					"&day_02=".rawurlencode($warp_day_02).
					"&day_03=".rawurlencode($warp_day_03).
					"&day_04=".rawurlencode($warp_day_04).
					"&day_05=".rawurlencode($warp_day_05).
					"&day_06=".rawurlencode($warp_day_06).
					"&day_07=".rawurlencode($warp_day_07).
					"&qy=".rawurlencode($qy).
					"&qm=".rawurlencode($qm).
					"&qd=".rawurlencode($qd).
					"&qg=".rawurlencode($qg).
					"&xurl=".rawurlencode("$xurl"."&qval=$qval_url").
					"&"
				, '500', '200');


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

xnewline ();


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

xtable_start ("$ydisplay_width_corrected");
	xtable_row_start ();
		xtable_column_start ('1', '', "$ybar_menu_color");
			xtext_small ('|');
			xspace ();
			xtext_small ("<b>$y_warp_events_text</b> [<b>$offsetlistedmin</b> - <b>$offsetlistedmax</b> (<b>$var_result_size</b> $y_warp_total_text)]"."$w_src_filteredby");
			xspace ();
			xtext_small ('|');
		xtable_column_end ();

		xtable_column_start ('1', '', "$ybar_menu_color");
			xcenter_right_start ();
				xtext_small ('|');
					xspace ();
					//Show PREV
					if ($newoffsetprev >= 0) {
						xtext_link ("$y_warp_prev_text", "$ywebsite_addr"."xw_main.php"."?wpqid=$wpqid&wpsid=$wpsid&offset=$newoffsetprev&qy=$qy&qm=$qm&qd=$qd&qg=$qg&qval=$qval_url", '_self');
						xspace ();
						xtext_small ('|');
						xspace ();
					} //end if

					//Show NEXT
					if ($newoffsetnext < $var_result_size) {
						xtext_link ("$y_warp_next_text", "$ywebsite_addr"."xw_main.php"."?wpqid=$wpqid&wpsid=$wpsid&offset=$newoffsetnext&qy=$qy&qm=$qm&qd=$qd&qg=$qg&qval=$qval_url", '_self');
						xspace ();
						xtext_small ('|');
						xspace ();
					} //end if
			xcenter_end ();
		xtable_column_end ();
	xtable_row_end ();
xtable_end ();

xnewline ();

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


$arr_count = count($arr_var_result);
for ($i=0; $i < $arr_count; $i++) {
	$i_title = $i;
	$i_sdate = $i + 1;
	$i_edate = $i + 2;
	$i_id = $i + 3;
	$i = $i + 3;

	$hlocal_lynkx = "$ywebsite_addr"."xw_main.php"."?wpqid=$wpqid&wpsid=$wpsid&offset=$offset&qy=$qy&qm=$qm&qd=$qd&qg=$qg&qval=$qval_url&evop=evdet&evidx=$arr_var_result[$i_id]";

	xshow_rep_events_data ($arr_var_result[$i_title], $arr_var_result[$i_sdate], $arr_var_result[$i_edate], '', $arr_var_result[$i_id], 'basic', $hlocal_lynkx);

	xnewline ();
} //end for


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

xtable_start ("$ydisplay_width_corrected");
	xtable_row_start ();
		xtable_column_start ('1', '', "$ybar_menu_color");
			xtext_small ('|');
			xspace ();
			xtext_small ("<b>$y_warp_events_text</b> [<b>$offsetlistedmin</b> - <b>$offsetlistedmax</b> (<b>$var_result_size</b> $y_warp_total_text)]"."$w_src_filteredby");
			xspace ();
			xtext_small ('|');
		xtable_column_end ();

		xtable_column_start ('1', '', "$ybar_menu_color");
			xcenter_right_start ();
				xtext_small ('|');
					xspace ();
					//Show PREV
					if ($newoffsetprev >= 0) {
						xtext_link ("$y_warp_prev_text", "$ywebsite_addr"."xw_main.php"."?wpqid=$wpqid&wpsid=$wpsid&offset=$newoffsetprev&qy=$qy&qm=$qm&qd=$qd&qg=$qg&qval=$qval_url", '_self');
						xspace ();
						xtext_small ('|');
						xspace ();
					} //end if

					//Show NEXT
					if ($newoffsetnext < $var_result_size) {
						xtext_link ("$y_warp_next_text", "$ywebsite_addr"."xw_main.php"."?wpqid=$wpqid&wpsid=$wpsid&offset=$newoffsetnext&qy=$qy&qm=$qm&qd=$qd&qg=$qg&qval=$qval_url", '_self');
						xspace ();
						xtext_small ('|');
						xspace ();
					} //end if
			xcenter_end ();
		xtable_column_end ();
	xtable_row_end ();
xtable_end ();

xnewline ();

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


} //end if

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




//##################################################### Events Details

if ($evop == 'evdet') {

//vars
$qval = rawurldecode($qval);
$qval_url = rawurlencode(stripslashes($qval));


xmysql_read_data ("SELECT title, s_date, e_date, event, id FROM events WHERE (id='$evidx') ");


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

xtable_start ("$ydisplay_width_corrected");
	xtable_row_start ();
		xtable_column_start ('1', '', "$ybar_menu_color");
			xtext_small ('|');
			xspace ();
			xtext_link ("$y_warp_events_text", "$ywebsite_addr"."xw_main.php"."?wpqid=$wpqid&wpsid=$wpsid&offset=$offset&qy=$qy&qm=$qm&qd=$qd&qg=$qg&qval=$qval_url", '_self');
			xspace ();
			xtext_small ('|');
			xspace ();
			xtext_small ('<b>'."$y_warp_events_view_details".'</b>');
			xspace ();
			xtext_small ('|');
		xtable_column_end ();
	xtable_row_end ();
xtable_end ();

xnewline ();

xshow_rep_events_data ($arr_var_result[0], $arr_var_result[1], $arr_var_result[2], $arr_var_result[3], $arr_var_result[4], 'full', '');


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


} //end if

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




}//-------------------end function



//------------------------------

//init
//events_secure ();

//events_module ();

//------------------------------

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