'); dp_menu(6); print(''); displayAddEvent("0","1"); /* if(($eid=trim($_REQUEST['eid']))!=""){ if(isset($_POST['addevent']) && $_POST['addevent']=="yes")insertEvent(); else displayAddEvent("0","1"); } else{ if($gbMemID==""){dpLogin();} elseif(isset($_REQUEST['av']) && $_REQUEST['av']=="8")addVenue(); elseif(isset($_POST['addevent']) && $_POST['addevent']=="yes")insertEvent(); elseif(isset($_REQUEST['vid']))displayAddEvent("0","1"); elseif(isset($_REQUEST['av']) && $_REQUEST['av']=="7")dpVenue(); else dp_policy(); } //*/ print(''); } //========================================================= function box_red_top($n){} function box_red_bot(){} function dpLogin(){ box_red_top("Please Login","585",""); print('

Please login to add a event.
if you do not have a account, you can register for a free account here.


'); box_red_bot(); } //========================================================= function dp_policy(){ GLOBAL $db,$gbMemID; $result=mysql_query("select mem_id from cz_members where mem_status=1 and mem_id=".$gbMemID,$db); if(! ($rs=mysql_fetch_array($result)) ){ print(""); exit; } $cdt=""; if(isset($_GET['cdt']))$cdt=$_GET['cdt']; box_red_top("Event Posting Policy","585",""); print('
ClubZen is here to provide a friendly environment for promoters to post their events, but we will not tolerate those who choose to abuse our system.

Please follow the rules about posting events on ClubZen.com or your account will be banned from posting events.
  1. DO NOT post multiple listings of the same event on the same day.
  2. DO NOT create multiple accounts to post multiple listings of the same event.
  3. DO NOT post listings that promotes a future event.
  4. DO NOT post a listing to promote anything other then an event.
  5. DO NOT post events without a venue.
To reduce abuse of our system, we have implemented the following:
  1. Multiple listing for the same event posted by different promoters will only be shown in the event details
  2. For events with multiple listings, only the first post created for that event will appear on the events listing page. The rest will be listed in the event detail page.
'); box_red_bot(); print('
 
'); } //========================================================= function dpVenue(){ GLOBAL $db,$gbMemID,$gbState; if($gbState=='ZZ' || $gbState=='')$gbState="NY"; $result=mysql_query("select count(m.loc_id) as cnt from cz_location l,cz_mem_loc m where l.loc_id=m.loc_id and m.mem_id=".$gbMemID,$db); if( ($rs=mysql_fetch_array($result)) ){ $vcnt=$rs['cnt'];} mysql_free_result($result); box_red_top("Step (1/2): Select or Create Venue","600",""); if($vcnt>0){ $rcnt=floor(($vcnt+2)/3); $result=mysql_query("select l.* from cz_location l,cz_mem_loc m where l.loc_id=m.loc_id and m.mem_id=".$gbMemID." order by addr_city,loc_name",$db); //$result=mysql_query("select l.* from cz_location l,cz_mem_loc m where l.loc_id=m.loc_id and m.mem_id=".$gbMemID." and loc_status=1 and addr_state='".$gbState."' order by addr_city,loc_name",$db); print('
'); $ct=0; $city=""; while( ($rs=mysql_fetch_array($result)) ){ if($city!=$rs['addr_city']){ if($ct!=0)print('
'); $city=$rs['addr_city']; print(''.$city.'
'); } elseif($ct==0)print(''.$city.' (con"t)
'); print('  '.cutstr($rs['loc_name'],25).'
'); print('  '.$rs['addr_1'].'

'); if(++$ct>$rcnt){ $ct=0; print('
'); } } mysql_free_result($result); print('
'); } else print("

no venues for this area found in our database

"); box_red_bot(); print("
 OR

"); box_red_top("Step (1/2): Create New Venue","585",""); print('
 Name:  
 Address1:  
 Address2:  
 City:    State:  '.selState("loc_state",$gbState).'  Zip: 
 Info: (between) 
 Website URL:   [test url]
'); box_red_bot(); print('
'); ?>
Please enter the Venue Name, Address, and City
'); box_red_bot(); } else{ $loc_state=trim($_POST['loc_state']); $loc_zip=trim($_POST['loc_zip']); $loc_info=trim($_POST['loc_info']); $loc_website=(cleanurl($_POST['loc_website'])); mysql_query("insert into cz_location(loc_name,addr_1,addr_2,addr_city,addr_state,addr_zip,addr_info,loc_website,create_dt,create_ip) values". "('".cleantag($loc_name)."'". ",'".cleantag($loc_addr1)."'". ",'".cleantag($loc_addr2)."'". ",'".cleantag($loc_city)."'". ",'".$loc_state."'". ",'".$loc_zip."'". ",'".cleantag($loc_info)."'". ",'".$loc_website."'". ",now(),'".$_SERVER['REMOTE_ADDR']."')",$db); $result=mysql_query("select max(loc_id) as xid from cz_location",$db); if( ($rs=mysql_fetch_array($result)) ){ $loc_id=$rs['xid']; } mysql_free_result($result); mysql_query("insert into cz_mem_loc(mem_id,loc_id) values(".$gbMemID.",".$loc_id.")",$db); box_red_top("Step (1/2): Create New Venue","585",""); ?>
 Name:  
 Address:   ".$loc_addr2);?>
 City:  
 Info: (between) 
 Website URL:   '.$loc_website.'');?>
 

Your event has been added."; if($err!="")$msg="Thank You,

Your event has been added.

BUT THERE ARE ERRORS

".$err; box_red_top("Step Finalize: Create New Event","585",""); ?>



   
0){ $dx=$df%7; $df=floor($df/7); if($dx>0)$df++; } else $df=1; $start_dt=dateadd('d',$df*7,$rs['event_dt']); $starttime=substr($rs['event_time_start'],0,5); $endtime=substr($rs['event_time_end'],0,5); } mysql_free_result($result); }else{ if($age=="")$age="21"; $start_dt=date('Y-m-d'); $result=mysql_query("select * from cz_events where mem_id=".$gbMemID." order by create_dt desc LIMIT 0,1",$db); if( ($rs=mysql_fetch_array($result)) ){ $vid=$rs['venue_id']; $area_id=$rs['venue_area_id']; $grp_name=$rs["grp_name"]; $grp_email=$rs["grp_email"]; $grp_website1=$rs["grp_website1"]; $grp_website2=$rs["grp_website2"]; $grp_website3=$rs["grp_website3"]; $age=$rs['age_range']; $target_id=$rs['event_target_id']; $event_music=$rs['event_music']; } mysql_free_result($result); $result=mysql_query("select * from cz_location where loc_id=".$vid,$db); if( ($rs=mysql_fetch_array($result)) ){ $loc_name=str_replace('"','',$rs['loc_name']); $loc_addr1=$rs['addr_1']; $loc_addr2=$rs['addr_2']; $loc_city=$rs['addr_city']; $loc_state=$rs['addr_state']; $loc_zip=$rs['addr_zip']; $loc_info=str_replace('"','',$rs['addr_info']); $loc_website=$rs['loc_website']; } mysql_free_result($result); } } else{ $grp_name=$_POST["grp_name"]; $grp_website1=$_POST["grp_website1"]; $grp_website2=$_POST["grp_website2"]; $grp_website3=$_POST["grp_website3"]; $grp_email=$_POST["grp_email"]; $age=$_POST['age_range']; $target_id=$_POST['target_id']; $event_music=$_POST['event_music']; $loc_name=str_replace('\"','"',str_replace("\'","'",$_POST['loc_name'])); $loc_addr1=$_POST['loc_addr1']; $loc_city=$_POST['loc_city']; $loc_zip=$_POST['loc_zip']; $loc_state=$_POST['loc_state']; $loc_website=$_POST['loc_website']; $loc_type=$_POST['loc_type']; $loc_info=$_POST['loc_info']; if($loc_state=="")$loc_state="NY"; $event_name=$_POST['event_name']; $event_des=$_POST['event_des']; $flyerurl1=$_POST['flyerurl1']; $flyerurl2=$_POST['flyerurl2']; $start_dt=$_POST['start_dt']; $starttime=$_POST['stime']; $endtime=$_POST['etime']; } // SET DATA ///////////////////////////////////////////// $is_repeat=$_REQUEST['t']; if( $starttime=="")$starttime="22:00"; if( $endtime=="")$endtime="04:00"; ///// SET LOCATION DATA ///////////////////////////////////////////// if( ($loc_id=$_POST['loc_id'])=="")$loc_id=$vid; $selLoc=''; ///// SET LOCATION DATA ///////////////////////////////////////////// $grp_name=str_replace("\\","",$grp_name); $grp_name=str_replace("\"",""",$grp_name); $event_name=str_replace("\\","",$event_name); $event_name=str_replace("\"",""",$event_name); $flyerpreview1="/img/preview.gif"; $flyerpreview2="/img/preview.gif"; if($flyerurl1=="")$flyerurl1="http://";else $flyerpreview1=$flyerurl1; if($flyerurl2=="")$flyerurl2="http://";else $flyerpreview2=$flyerurl2; box_red_top("Step (2/2): Create New Event","585",""); ?>
 Organization Information   (Group throwing/promoting the event)
 Name:  
 Info Email:  
 Website URL:   [test url]
 Website URL 1:   [test url]
 Website URL 2:   [test url]
 Venue Information
 Location  
 Name:  
 Address:  
 City:    State:    Zip: 
 Info: (between) 
 Website URL:   [test url]
 Event Information
 Type of Event:  
 Target Crowd:  
 Music:  
 Event Date:  
 Event Time:      to  
 Age Restriction:     and over
 Event Name:  
 Description:  

  -- Admission (Fee)
  -- Dress Code
  -- Guestlist Info

  -- HTML enabled

[ preview description ]
 Flyers (optional) (100k max for each flyer)
 Front Side:  
Select an image file from your hard-drive:

or

Enter the url of an image already on your website
[test url]
 Back Side:  
Select an image file from your hard-drive:

or

Enter the url of an image already on your website
[test url]

'); else print(''); $yr=date("Y")+2; if($n=="s") print(''); for($i=$yr;$i>=2000;$i--)print("'; } mysql_free_result($result); return ''; } //======================================================= function chkYesNo($name,$v){ if($v==0)return(' No   Yes'); else return(' No   Yes'); } //========================================================= function clean($s){ return str_replace("'","'",trim($s)); } function cleantag($s){ return str_replace("'","'",strip_tags(trim($s))); } function cleanurl($s){ $s=strtolower(trim($s)); if($s=="")return ""; if($s=="http://")return ""; if(substr($s,0,7)!="http://") return "http://".strip_tags(trim($s)); else return strip_tags(trim($s)); } //============================================================== function upload_image($fieldname,$pixname,$imgdir,&$err){ global $rootdir,$gbMemID; $maxwidth=600; $err=""; if($_FILES[$fieldname]['name']!=''){ if(!isImageType($_FILES[$fieldname]['type'])){ $err.="Profile image not uploaded
Images must be in .jpg format"; } elseif (!is_uploaded_file($_FILES[$fieldname]['tmp_name'])){ $err.="".$_FILES[$fieldname]['name']." couldn't be copied !!"; } else{ $pic_ext=getImageType($_FILES[$fieldname]['type']); $pic_flyer0=$pixname.'.'.$pic_ext; $pic_flyer1=$pixname.'.jpg'; move_uploaded_file($_FILES[$fieldname]['tmp_name'],$rootdir.$imgdir.$pic_flyer0) or $err.="Profile image not uploaded
Error moving file."; if($pic_ext=='gif'){ covertimagetype($rootdir.$imgdir.$pic_flyer0, $rootdir.$imgdir.$pic_flyer1); @unlink($rootdir.$imgdir.$pic_flyer0); delGif2Jpg($rootdir.$imgdir.$pic_flyer1); } $size=getimagesize($rootdir.$imgdir.$pic_flyer1); if($size[0]>$maxwidth || $size[1]>$maxwidth ){ resampleimage($maxwidth,$maxwidth, $rootdir.$imgdir.$pic_flyer1, $rootdir.$imgdir.$pic_flyer1); } else{ $fsize=filesize($rootdir.$imgdir.$pic_flyer1); resampleimage($size[0],$size[1], $rootdir.$imgdir.$pic_flyer1, $rootdir.$imgdir."x".$pic_flyer1); if($fsize>filesize($rootdir.$imgdir."x".$pic_flyer1)){ resampleimage($size[0],$size[1], $rootdir.$imgdir.$pic_flyer1, $rootdir.$imgdir.$pic_flyer1); } @unlink($rootdir.$imgdir."x".$pic_flyer1); } @chmod($rootdir.$imgdir.$pic_flyer1,0666); if(substr($pixname,7,2)!='_2'){ resizeimage(90,60, $rootdir.$imgdir.$pic_flyer1, $rootdir.$imgdir."thumbs/".$pic_flyer1); delGif2Jpg($rootdir.$imgdir."thumbs/".$pic_flyer1); @chmod($rootdir.$imgdir."thumbs/".$pic_flyer1,0666); } if (file_exists($rootdir.$imgdir.$pic_flyer1)) return $pic_flyer1; } } /* elseif($_POST['rimg_'.$fieldname]=="yes"){ if (file_exists($rootdir.$imgdir.$pixname.'.jpg')) { @unlink($rootdir.$imgdir.$pixname.'.jpg'); @unlink($rootdir.$imgdir."t_".$pixname.'.jpg');} elseif (file_exists($rootdir.$imgdir.$pixname.'.gif')){ @unlink($rootdir.$imgdir.$pixname.'.gif'); @unlink($rootdir.$imgdir."t_".$pixname.'.gif');} elseif (file_exists($rootdir.$imgdir.$pixname.'.png')){ @unlink($rootdir.$imgdir.$pixname.'.png'); @unlink($rootdir.$imgdir."t_".$pixname.'.png');} return "none.gif"; }//*/ return ""; } //========================================================= ?>