当前位置: 首页>>代码示例>>PHP>>正文


PHP connect::display方法代码示例

本文整理汇总了PHP中connect::display方法的典型用法代码示例。如果您正苦于以下问题:PHP connect::display方法的具体用法?PHP connect::display怎么用?PHP connect::display使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在connect的用法示例。


在下文中一共展示了connect::display方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: stdClass

                $datauser = new stdClass();
                if ($querydata = $DB->get_records_sql($sqlfilteruser, array($USER->id))) {
                    foreach ($querydata as $data) {
                        $datauser->facebookid = $data->facebookid;
                        $datauser->link = "https://www.facebook.com/app_scoped_user_id/" . $data->facebookid . "/";
                        $datauser->firstname = $data->firstname;
                        $datauser->middlename = "";
                        $datauser->lastname = $data->lastname;
                    }
                }
            } else {
                $datauser = $DB->get_record("facebook_user", array("moodleid" => $USER->id));
            }
            //Tesis Roberto Jaunez
            if ($USER->id == 10644 || $USER->id == 2 || $USER->id == 40214 || $USER->id == 381 || $USER->id == 60246 || $USER->id == 32806 || $USER->id == 28988) {
                $toprow = array();
                $toprow[] = new tabobject("Tu cuenta", new moodle_url('/local/facebook/connect.php'), "Tu cuenta");
                $toprow[] = new tabobject("Facebook Analysis", new moodle_url('/local/facebook/facebookalgorithm.php'), "Facebook Analysis");
                echo $OUTPUT->tabtree($toprow, "Tu cuenta");
            }
            $table = facebook_connect_table_generator($datauser->facebookid, $datauser->link, $datauser->firstname, $datauser->middlename, $datauser->lastname);
            // Look if the account was already linked
            $duplicate = $DB->get_record("facebook_user", array("facebookid" => $facebook_id, "status" => FACEBOOK_STATUS_LINKED));
            // if it isn't linked it will return false, if the status is 0 someone already linked it but it is not active.
            $button = new connect(null, array("duplicate" => $duplicate));
            $button->display();
        }
    }
}
// if the user has the account linkd it will show his information and some other actions the user can perform.
echo $OUTPUT->footer();
开发者ID:hansnok,项目名称:local_facebook,代码行数:31,代码来源:connect.php


注:本文中的connect::display方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。