Đang chuẩn bị liên kết để tải về tài liệu:
Tạo mạng xã hội với PHP - part 35

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

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.php'); $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 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.php 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 header.tpl.php groups create.tpl.php footer.tpl.php 322 Download from www.eBookTM.com Chapter 10 View The template for creating a group views default templates groups create. tpl.php 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 www.eBookTM.com 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 database table A model

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.