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


PHP BoincTeam::lookup方法代码示例

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


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

示例1: strtolower

$team_name = BoincDb::escape_string(strip_tags(post_str("name")));
$team_name_lc = strtolower($team_name);
$tnh = post_str("name_html", true);
$team_name_html = sanitize_html($tnh);
$team_name_html = BoincDb::escape_string($team_name_html);
$team_description = BoincDb::escape_string(post_str("description", true));
$type = BoincDb::escape_string(post_str("type", true));
$country = BoincDb::escape_string(post_str("country", true));
if ($country == "") {
    $country = "International";
}
if (!is_valid_country($country)) {
    error_page("bad country");
}
$joinable = post_str('joinable', true) ? 1 : 0;
$t = BoincTeam::lookup("name='{$team_name}'");
if ($t && $t->id != $teamid) {
    error_page("The name '{$team_name}' is being used by another team.");
}
if (strlen($team_name) == 0) {
    error_page("Must specify team name");
}
// Should be caught up with the post_str("name"),
// but you can never be too safe.
$clause = sprintf("name = '%s',\r\n\tname_lc = '%s',\r\n\tname_html = '%s',\r\n\turl = '%s',\r\n\tdescription = '%s',\r\n\ttype = %d,\r\n\tcountry='%s',\r\n\tjoinable=%d", $team_name, $team_name_lc, $team_name_html, $team_url, $team_description, $type, $country, $joinable);
$ret = $team->update($clause);
if ($ret) {
    Header("Location: team_display.php?teamid={$team->id}");
} else {
    error_page("Could not update team - please try later.");
}
开发者ID:Turante,项目名称:boincweb,代码行数:31,代码来源:team_edit_action.php

示例2: lookup_team_seti_id

function lookup_team_seti_id($seti_id)
{
    return BoincTeam::lookup("seti_id={$seti_id}");
}
开发者ID:ChristianBeer,项目名称:boinc,代码行数:4,代码来源:team_import.php


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