Tạo mạng xã hội với PHP - part 32

Events and Birthdays Our "Create event" template simply needs fields for the name, date, start time, end time, description, and checkboxes for all of the user's friends. We can give the date field a class of selectdate, to make use of the jQuery datepicker plug-in we used for profiles. We may also wish to use the time picker plug-in too, to make time selection easier. The friends loop is highlighted in the following code: Create an event Name Type of event Public event Private event Date Start. | Events and Birthdays Template for a new event Our Create event template simply needs fields for the name date start time end time description and checkboxes for all of the user s friends. We can give the date field a class of selectdate to make use of the jQuery datepicker plug-in we used for profiles. We may also wish to use the time picker plug-in too to make time selection easier. The friends loop is highlighted in the following code div id main div id rightside div div id content h1 Create an event h1 form action event create method post label for Name label br input type text name name br label for Type of event label br select name type option value public Public event option option value private Private event option select br label for Date label br input type text class selectdate name date br label for Start time label br input type text class selecttime name start_ time br label for End time label br input type text class selecttime name end_ time br label for Description label br textarea name description cols 45 rows 6 textarea br h2 Invite friends h2 p Select any friends you would like to invite to the event. p -- START all -- input type checkbox name invitees 1 value ID users_name -- END all -- br ----------------------------------- 292 ------------------------------- Download from Chapter 9 input type submit name value Create event form div div Now if we visit the create event page event create we see the form This makes use of the very helpful datepicker plugin 293 Download from Events and Birthdays Calendar of events We looked earlier at integrating the calendar library with birthdays so why not try and integrate the events with the calendar too The code is in the download bundle for this book if you need help. Viewing an event To view an event we simply call the toTags method on the model and build the template. We should also list users who have been invited are attending are not attending and who are maybe .

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.