tailieunhanh - Thiết kế mạng xã hội với PHP - 35
Tham khảo tài liệu 'thiết kế mạng xã hội với php - 35', công nghệ thông tin, đồ họa - thiết kế - flash phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Groups this- listPublicGroups 0 else if isset urlBits 1 this- listPublicGroups intval urlBits 1 else this- listPublicGroups 0 Create a new group return void private function createGroup if isset _POST is_array _POST count _POST 0 require_once FRAMEWORK_PATH . models group new Group this- registry 0 group- setCreator this- registry- getObject authenticate - getUser - getUserID group- setName this- registry- getObject db - sanitizeData _POST name group- setDescription this- registry- getObject db - sanitizeData _POST description group- setType _POST type group- save this- registry- errorPage Group created Thank you your new group has been created else this- registry- getObject template - buildFromTemplates groups 322 Download from Wow eBook Chapter 10 View The template for creating a group views default templates groups create. is simply a form with a text box for name and description and a drop-down list of types. div id main div id rightside div div id content h1 Create a new group h1 form action groups create method post label for name Name label br input type text id name name name value br label for description Description label br textarea id description name description textarea br label for type Type label br select id type name type option value public Public Group option option value private Private Group option option value private-member-invite Private Invite Only Group option option value private-self-invite Private Self-Invite Group option select br input type submit id create name create value Create group form div div 323 Download from Wow eBook Groups Creating a group in action If we navigate to groups create we see the create group form and are able to successfully create a new group. Viewing a group For us to view a group and also participate in a group we will need A controller for the group A way of maintaining membership lists for groups including A
đang nạp các trang xem trước