#70 Addition of tracking room seats

open
nobody
None
5
2012-07-20
2005-06-02
Tim Nelson
No

From a user's request, I created a way to track seats (
for a given room/event ). Attached is the file
'edit_seats.php'. Below are lines of code to add to
the various files:

config.inc.php ( around line 170):
[ added config setting if admin wants to track room
seats or not: ]

Define if you are going to use/track seats for each room.

0 - off / 1 - on.

$track_seats = 1;

view_entry.php ( around line 280):
[ Added code to show 'view seats' link ( if turned on ): ]

". get_vocab("viewseats") .""; } ?>

lang.en:
[ added to view_entry section: ]
$vocab["viewseats"] = "View Class/Room seats";

[ created edit_seats section: ]
# Used in edit_seats.php
$vocab["addseat"] = "Add a seat";
$vocab["editseat"] = "Edit a seat";
$vocab["delseat"] = "Delete a seat";
$vocab["fullseat"] = "Class/Room is already
full";
$vocab["empty"] = "Class/Room is empty";
$vocab["seatlist"] = "Class/Room seat list";

Someone will need to take on creating these entries for
the other
language files.


The database code is not included in the php file.
Here are the
specifications for this database table (I'm using
MySQL, other databases may be different) :

Name : mrbs_seats
id
type: int(11)
allow nulls: no
primary key
default: (null)
auto_increment

entry_id
type: int(11)
allow nulls: yes
default: (null)

From this point, you can add as many fields as you need.
The code will make the necessary adjustments as you add
fields. Feel free to contact if you have any questions.

Discussion

  • Tim Nelson

    Tim Nelson - 2005-06-02

    edit_seats.php

     
  • Tim Nelson

    Tim Nelson - 2005-06-03

    Logged In: YES
    user_id=1288490

    Forgot to add: this was done on version 1.2.1

     
  • Tim Nelson

    Tim Nelson - 2005-06-14

    Logged In: YES
    user_id=1288490

    I forgot one other line of code. Add this to the config.inc.php
    (about line 425) :

    $tbl_seats = $dbl_tbl_prefix . "seats";

     


Anonymous

Cancel  Add attachments





Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks