From ab77fae6dffa27599f26856c4ff006b99da9aa12 Mon Sep 17 00:00:00 2001 From: fly-man- Date: Thu, 11 Dec 2008 23:27:45 +0000 Subject: [PATCH] Updating the webroot with addition to the OpenSimWiredux interface that some grids are using In order for this to work, you need to have Search enabled and working, else it won't budge. WARNING: This code is experimental, don't use it when you're not able to edit php files. git-svn-id: http://forge.opensimulator.org/svn/ossearch/trunk@101 109abde3-1f22-4c10-b5d7-b6b0135cd00c --- webroot/wiredux/README | 19 ++ webroot/wiredux/images/events/blue_star.gif | Bin 0 -> 227 bytes webroot/wiredux/images/events/pink_star.gif | Bin 0 -> 227 bytes webroot/wiredux/sites.php | 149 ++++++++++ webroot/wiredux/sites/classifieds.php | 19 ++ webroot/wiredux/sites/events.php | 65 ++++ webroot/wiredux/sites/make-events.php | 312 ++++++++++++++++++++ webroot/wiredux/sites/save-events.php | 82 +++++ 8 files changed, 646 insertions(+) create mode 100644 webroot/wiredux/README create mode 100644 webroot/wiredux/images/events/blue_star.gif create mode 100644 webroot/wiredux/images/events/pink_star.gif create mode 100644 webroot/wiredux/sites.php create mode 100644 webroot/wiredux/sites/classifieds.php create mode 100644 webroot/wiredux/sites/events.php create mode 100644 webroot/wiredux/sites/make-events.php create mode 100644 webroot/wiredux/sites/save-events.php diff --git a/webroot/wiredux/README b/webroot/wiredux/README new file mode 100644 index 0000000..c5dadcf --- /dev/null +++ b/webroot/wiredux/README @@ -0,0 +1,19 @@ +These are updates for the OpenSimWiredux to make Events and Classifieds work. + +In order for this to work + +1. Make a good backup of your database and website + +2. Copy all the folders and files to your website + +3. Open up the OpenSimWiredux in Admin mode (http://OpenSimWiredux/admin) and add 3 new items: + +- Search + - Events + - Classifieds + +4. Login as a normal user to check if the new items show up + +5. Have fun using it + +Fly Man- \ No newline at end of file diff --git a/webroot/wiredux/images/events/blue_star.gif b/webroot/wiredux/images/events/blue_star.gif new file mode 100644 index 0000000000000000000000000000000000000000..eb67a04b006779d910d4329c0f2dbda6640c8954 GIT binary patch literal 227 zcmZ?wbhEHb6k!lzIKsfNfB$}$e&3o+M+)Y=@h#kuJo$4(=c|yMWx=&q!`t65U;~OjSr|d$ zIv@gMCj)DOffQDEDZ?oe85f6`khocpH zOlLN`Y95#?B7L?|;;3%?k&LiN!2^78F|19uTTY+OJ?LGiZ~aAEtcXLogj2gYI#;_T JMOBf(8UWn7RpS5v literal 0 HcmV?d00001 diff --git a/webroot/wiredux/images/events/pink_star.gif b/webroot/wiredux/images/events/pink_star.gif new file mode 100644 index 0000000000000000000000000000000000000000..0f87fff39a029ed294a7913ec6413e2536b116f9 GIT binary patch literal 227 zcmZ?wbhEHb6k!lzIKsfNfB*h@E|Wh;+`SaE?|J@}_YpU~MLgNz%oUM7+bD5VH~vUQSft \ No newline at end of file diff --git a/webroot/wiredux/sites/classifieds.php b/webroot/wiredux/sites/classifieds.php new file mode 100644 index 0000000..31d2ef9 --- /dev/null +++ b/webroot/wiredux/sites/classifieds.php @@ -0,0 +1,19 @@ + + + + +"; + +}else{ + + +} +?> diff --git a/webroot/wiredux/sites/events.php b/webroot/wiredux/sites/events.php new file mode 100644 index 0000000..cad6024 --- /dev/null +++ b/webroot/wiredux/sites/events.php @@ -0,0 +1,65 @@ + + + + +"; + +}else{ +?> +
+
These are the upcoming events at this moment.To add a new event, click here
+ + + + + + + +query("select creatoruuid,dateUTC,eventid,name,eventflags from ossearch.events where dateUTC > $now ORDER BY dateUTC LIMIT 0,10"); + +while(list($creator,$time,$eventid,$eventname,$event_type) = $DbLink->next_record()) +{ + $event_time = date("m/d/Y, h:i a",$time); + + $event_host = Convert($creator); + + if ($event_type == 0) $event_type = ""; + if ($event_type == 1) $event_type = ""; + +?> + + + + + + + + + + + + +
TimeTypeEventHost
+
\ No newline at end of file diff --git a/webroot/wiredux/sites/make-events.php b/webroot/wiredux/sites/make-events.php new file mode 100644 index 0000000..f67ecbb --- /dev/null +++ b/webroot/wiredux/sites/make-events.php @@ -0,0 +1,312 @@ + + + + +"; + +}else{ +?> + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Event Name:

Description: +
+
+
+ max. 1024 + + Characters typed: +
+
+

Date: + + + + + + +
+ + + + + +
+

Starts at: + + + + + +
+ + + +
+

Duration: + + + + +
+ +
+

Category: + +

Cover Charge? + + + + + + +
+ + Amount (L$):
+

Location: + + +

Mature Event?: + + + + + +
Yes, this will be a mature event.
+

 
+
+ + + + + \ No newline at end of file diff --git a/webroot/wiredux/sites/save-events.php b/webroot/wiredux/sites/save-events.php new file mode 100644 index 0000000..5db1436 --- /dev/null +++ b/webroot/wiredux/sites/save-events.php @@ -0,0 +1,82 @@ +query("SELECT regionName, locX, locY FROM ".C_REGIONS_TBL." WHERE uuid = '".$region."'"); + +while(list($regionname,$locX,$locY) = $DbLink->next_record()) +{ + $RegionX = ($locX * 256); + $RegionY = ($locY * 256); + $GlobalX = $RegionX + $ParcelX; + $GlobalY = $RegionY + $ParcelY; + $GlobalZ = $ParcelZ; + $sim_name = $regionname; +} + +$GlobalPos = "<".$GlobalX.",".$GlobalY.",".$GlobalZ.">"; + +# Checking if it's a event with Maturity +$access = $_POST['access']; +if ($access == 21) +{ + $access = "true"; + $eventflags = 1; +} +else +{ + $access = "false"; + $eventflags = 0; +} + +# Check if we have all the info and that there's no fault stuff here + +if ($event_name != "" && $event_desc != "" && $sim_name != "" && $GlobalPos != "") +{ + $query = 'INSERT INTO ossearch.events (owneruuid,name,creatoruuid,category,description,dateUTC,duration,covercharge,coveramount,simname,globalPos,eventflags,mature) VALUES("'.$_SESSION[USERID].'","'.$event_name.'","'.$_SESSION[USERID].'",'.$category.',"'.$event_desc.'",'.$event_date.','.$duration.','.$cover_charge.','.$cover_amount.',"'.$sim_name.'","'.$GlobalPos.'",'.$eventflags.',"'.$access.'")'; + + $DbLink->query($query); + + # Do some nice output for people to know that their event has been handled + + echo "
Your event has been submitted to the database

Click on the left menu to find your event

"; +} +else +{ +echo "
Your event could not be saved, please check your event submission again

Click here to go back to the page

"; +} +?> \ No newline at end of file