本文整理汇总了PHP中post_int函数的典型用法代码示例。如果您正苦于以下问题:PHP post_int函数的具体用法?PHP post_int怎么用?PHP post_int使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了post_int函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: do_updates
function do_updates()
{
$id = post_int("id");
$app = BoincApp::lookup_id($id);
if (!$app) {
admin_error_page("no such app");
}
$n = post_str("deprecated", true) ? 1 : 0;
$app->update("deprecated={$n}");
$n = post_num("weight");
$app->update("weight={$n}");
$n = post_int("homogeneous_redundancy");
$app->update("homogeneous_redundancy={$n}");
$n = post_int("target_nresults");
$app->update("target_nresults={$n}");
$n = post_str("homogeneous_app_version", true) ? 1 : 0;
$app->update("homogeneous_app_version={$n}");
$n = post_str("non_cpu_intensive", true) ? 1 : 0;
$app->update("non_cpu_intensive={$n}");
$n = post_str("beta", true) ? 1 : 0;
$app->update("beta={$n}");
$n = post_str("fraction_done_exact", true) ? 1 : 0;
$app->update("fraction_done_exact={$n}");
echo "Application {$id} updated.\n <p>\n You must restart the project for this to take effect.\n ";
}
开发者ID:gchilders,项目名称:boinc,代码行数:25,代码来源:manage_apps.php
示例2: hide_explanation
function hide_explanation()
{
switch (post_int("category", true)) {
case 1:
$c = "Obscene";
break;
case 2:
$c = "Flame/Hate mail";
break;
case 3:
$c = "Commercial spam";
break;
case 4:
$c = "Double post";
break;
case 5:
$c = "User Request";
break;
default:
$c = "Other";
break;
}
$x = "\nYour post was categorized as " . $c;
$x .= mod_comment();
return $x;
}
开发者ID:CalvinZhu,项目名称:boinc,代码行数:26,代码来源:forum_moderate_post_action.php
示例3: handle_add_confirm
function handle_add_confirm($user)
{
$destid = post_int('userid');
$destuser = BoincUser::lookup_id($destid);
if (!$destuser) {
error_page("No such user");
}
check_pending($user, $destuser);
check_ignoring($user, $destuser);
$msg = post_str('message', true);
if ($msg) {
$msg = sanitize_tags(BoincDb::escape_string($msg));
}
$now = time();
$ret = BoincFriend::replace("user_src={$user->id}, user_dest={$destid}, message='{$msg}', create_time={$now}, reciprocated=0");
if (!$ret) {
error_page(tra("Database error"));
}
$now = time();
$type = NOTIFY_FRIEND_REQ;
BoincNotify::replace("userid={$destid}, create_time={$now}, type={$type}, opaque={$user->id}");
BoincForumPrefs::lookup($destuser);
if ($destuser->prefs->pm_notification == 1) {
send_friend_request_email($user, $destuser, $msg);
}
page_head(tra("Friend request sent"));
echo tra("We have notified %1 of your request.", "<b>" . $destuser->name . "</b>");
page_tail();
}
开发者ID:maexlich,项目名称:boinc-igemathome,代码行数:29,代码来源:friend.php
示例4: user_permissions_action
function user_permissions_action()
{
$bitset = '';
for ($i = 0; $i < S_NFLAGS; $i++) {
if (post_int("role" . $i, TRUE) == 1) {
$bitset .= '1';
echo "<br> setting {$i}";
} else {
$bitset .= '0';
}
}
$userid = post_int("userid");
$query = "UPDATE forum_preferences SET special_user='{$bitset}' WHERE userid={$userid}";
_mysql_query($query);
Header("Location: user_permissions.php");
}
开发者ID:CalvinZhu,项目名称:boinc,代码行数:16,代码来源:user_permissions.php
示例5: update
function update()
{
$id = post_int("id");
$av = BoincAppVersion::lookup_id($id);
if (!$av) {
error_page("no such app version");
}
$n = post_str("beta", true) ? 1 : 0;
$av->update("beta={$n}");
$n = post_str("deprecated", true) ? 1 : 0;
$av->update("deprecated={$n}");
$n = post_int("min_core_version");
$av->update("min_core_version={$n}");
$n = post_int("max_core_version");
$av->update("max_core_version={$n}");
echo "<b>Updated app version {$id}. This change will take effect when you restart the project.</b><p>";
}
开发者ID:entibasse,项目名称:superhost,代码行数:17,代码来源:manage_app_versions.php
示例6: handle_suspend
function handle_suspend($user)
{
global $g_logged_in_user;
$dt = post_int('suspend_for', true);
$reason = $_POST['suspend_reason'];
if ($dt > 0 && empty($reason)) {
admin_error_page("You must supply a reason for a suspension.\n <p><a href=manage_user.php?userid={$user->id}>Try again</a>");
} else {
if (is_numeric($dt)) {
$t = $dt > 0 ? time() + $dt : 0;
$q = "UPDATE forum_preferences SET banished_until={$t} WHERE userid={$user->id}";
_mysql_query($q);
// put a timestamp in wiki to trigger re-validation of credentials
if (function_exists('touch_wiki_user')) {
touch_wiki_user($user);
}
// Send suspension e-mail to user and administrators
if ($dt > 0) {
$subject = PROJECT . " posting privileges suspended for " . $user->name;
$body = "\nForum posting privileges for the " . PROJECT . " user \"" . $user->name . "\"\nhave been suspended for " . time_diff($dt) . " by " . $g_logged_in_user->name . ". \nThe reason given was:\n\n{$reason}\n\nThe suspension will end at " . time_str($t) . "\n";
} else {
$subject = PROJECT . " user " . $user->name . " unsuspended";
$body = "\nForum posting privileges for the " . PROJECT . " user \"" . $user->name . "\"\nhave been restored by " . $g_logged_in_user->name . "\n";
if ($reason) {
$body .= "The reason given was:\n\n {$reason}\n";
}
}
send_email($user, $subject, $body);
$emails = explode(",", POST_REPORT_EMAILS);
foreach ($emails as $email) {
$admin->email_addr = $email;
send_email($admin, $subject, $body);
}
}
}
}
开发者ID:CalvinZhu,项目名称:boinc,代码行数:36,代码来源:manage_user.php
示例7: post_str
}
$images_as_links = $_POST["forum_images_as_links"] != "" ? 1 : 0;
$link_popup = $_POST["forum_link_popup"] != "" ? 1 : 0;
$hide_avatars = $_POST["forum_hide_avatars"] != "" ? 1 : 0;
$hide_signatures = $_POST["forum_hide_signatures"] != "" ? 1 : 0;
$highlight_special = $_POST["forum_highlight_special"] != "" ? 1 : 0;
$jump_to_unread = $_POST["forum_jump_to_unread"] != "" ? 1 : 0;
$ignore_sticky_posts = $_POST["forum_ignore_sticky_posts"] != "" ? 1 : 0;
$no_signature_by_default = $_POST["signature_by_default"] != "" ? 0 : 1;
$signature = post_str("signature", true);
if (strlen($signature) > 250) {
error_page(tra("Your signature was too long, please keep it less than 250 characters."));
}
$forum_sort = post_int("forum_sort");
$thread_sort = post_int("thread_sort");
$display_wrap_postcount = post_int("forum_display_wrap_postcount");
if ($display_wrap_postcount < 1) {
$display_wrap_postcount = 1;
}
$signature = BoincDb::escape_string($signature);
$user->prefs->update("images_as_links={$images_as_links}, link_popup={$link_popup}, hide_avatars={$hide_avatars}, hide_signatures={$hide_signatures}, highlight_special={$highlight_special}, jump_to_unread={$jump_to_unread}, ignore_sticky_posts={$ignore_sticky_posts}, no_signature_by_default={$no_signature_by_default}, avatar='{$avatar_url}', signature='{$signature}', forum_sorting={$forum_sort}, thread_sorting={$thread_sort}, display_wrap_postcount={$display_wrap_postcount}");
}
// DISABLE_FORUMS
$add_user_to_filter = $_POST["add_user_to_filter"] != "";
if ($add_user_to_filter) {
$user_to_add = trim($_POST["forum_filter_user"]);
if ($user_to_add != "" and $user_to_add == strval(intval($user_to_add))) {
$other_user = BoincUser::lookup_id($user_to_add);
if (!$other_user) {
echo tra("No such user:") . " " . $user_to_add;
} else {
开发者ID:CalvinZhu,项目名称:boinc,代码行数:31,代码来源:edit_forum_preferences_action.php
示例8: post_int
// BOINC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
require_once "../inc/util_ops.inc";
$cancel = post_int('cancel', true);
$hide_canceled = post_str('hide_canceled', true);
$hide_dlerr = post_str('hide_dlerr', true);
$appid = post_int('appid', true);
$WU = post_arr('WU', true);
$back = post_str('back', true);
$clause = post_str('clause', true);
$limit = post_int('limit', true);
if (!$limit || $limit == 0) {
$limit = 20;
}
admin_page_head("Cancel Workunits");
// check for WUs to cancel
//
$WUs = "";
if ($cancel && $cancel == 1) {
if ($WU) {
foreach ($WU as $key => $value) {
if ($WUs != "") {
$WUs = $WUs . ",";
}
$WUs = $WUs . $value;
}
开发者ID:aggroskater,项目名称:boinc,代码行数:31,代码来源:cancel_workunits_action.php
示例9: error_page
$result = $thread->update("sticky=0");
$action_name = "made non-sticky";
break;
case "lock":
$result = $thread->update("locked=1");
$action_name = "locked";
break;
case "unlock":
$result = $thread->update("locked=0");
$action_name = "unlocked";
break;
case "move":
if ($forum->parent_type != 0) {
error_page("No");
}
$fid = post_int('forumid');
$new_forum = BoincForum::lookup_id($fid);
$result = move_thread($thread, $forum, $new_forum);
$action_name = "moved from {$forum->title} to {$new_forum->title}";
break;
case "title":
$new_title = post_str('newtitle');
$title = BoincDb::escape_string($new_title);
$result = $thread->update("title='{$title}'");
$action_name = "renamed from '{$thread->title}' to '{$new_title}'";
break;
default:
error_page("Unknown action");
}
if (!$result) {
error_page("Moderation failed");
开发者ID:nicolas17,项目名称:boincgit-test,代码行数:31,代码来源:forum_moderate_thread_action.php
示例10: db_init
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
require_once "../inc/db_ops.inc";
require_once "../inc/util_ops.inc";
db_init();
admin_page_head("Manage special users action");
$bitset = '';
for ($i = 0; $i < S_NFLAGS; $i++) {
if (post_int("role" . $i, TRUE) == '1') {
$bitset = str_pad($bitset, $i + 1, '1');
} else {
$bitset = str_pad($bitset, $i + 1, '0');
}
}
if ($bitset == "0000000") {
$bitset = '';
}
$userid = post_int("userid");
$query = "UPDATE forum_preferences SET special_user='{$bitset}' WHERE userid='{$userid}'";
_mysql_query($query);
if (_mysql_affected_rows() == 1) {
echo "<center><h2>Success</h2>";
} else {
echo "<center><h2>Failure</h2>";
}
echo "Query was: {$query}</center>";
//echo "<br><a href=\"manage_special_users.php\">Manage users</a>";
admin_page_tail();
$cvs_version_tracker[] = "\$Id\$";
//Generated automatically - do not edit
开发者ID:ChristianBeer,项目名称:boinc,代码行数:31,代码来源:manage_special_users_action.php
示例11: exit_error
// such as a week, before purging them. So active users will always
// have at least one result in the database.
require_once "../inc/util_ops.inc";
require_once "../inc/email.inc";
function exit_error($message)
{
echo "Error: {$message} <br>";
exit;
}
// These are set to large values because otherwise the script has
// a tendency to just stop after some time.
//
ini_set("memory_limit", "20M");
set_time_limit(3600);
$receiver = 0;
$receiver = post_int('receiver', true);
$subject = post_str('subject', true);
$body = post_str('body', true);
$body = stripslashes($body);
admin_page_head("Send mass email");
if ($receiver > 0) {
db_init();
switch ($receiver) {
case 1:
// all users
$query = "select * from user where send_email > 0";
break;
case 2:
// unsuccessful users
$week_ago = time(0) - 7 * 86400;
$query = "select user.id,user.name,user.email_addr from user left join result on user.id=result.userid where send_email>0 and total_credit=0 and user.create_time<{$week_ago} and isnull(result.id)";
开发者ID:happyj,项目名称:qcn,代码行数:31,代码来源:mass_email.php
示例12: error_page
if (!post_str('action', true)) {
if (!get_str('action', true)) {
error_page(tra("You must specify an action..."));
} else {
$action = get_str('action');
}
} else {
$action = post_str('action');
}
$userid = post_int('userid');
$user = BoincUser::lookup_id($userid);
if ($action != "start") {
error_page("Unknown action");
}
// TODO: create a function for this in forum_banishment_vote.inc to make it more flexible
switch (post_int("category", true)) {
case 1:
$mod_category = tra("Obscene");
case 2:
$mod_category = tra("Flame/Hate mail");
case 3:
$mod_category = tra("User Request");
default:
$mod_category = tra("Other");
}
if (post_str('reason', true)) {
start_vote($config, $logged_in_user, $user, $mod_category, post_str("reason"));
} else {
start_vote($config, $logged_in_user, $user, $mod_category, "None given");
}
$cvs_version_tracker[] = "\$Id: forum_moderate_post_action.php 13718 2007-09-30 11:17:11Z Rytis \$";
开发者ID:nicolas17,项目名称:boincgit-test,代码行数:31,代码来源:forum_banishment_vote_action.php
示例13: get_logged_in_user
$query .= " limit {$limit}";
return BoincPost::enum_general($query);
}
$logged_in_user = get_logged_in_user(false);
BoincForumPrefs::lookup($logged_in_user);
if ($logged_in_user && $logged_in_user->prefs->privilege(S_MODERATOR)) {
$show_hidden_posts = true;
} else {
$show_hidden_posts = false;
}
page_head(tra("Forum search results"));
$search_keywords = post_str("search_keywords", true);
$search_author = post_int("search_author", true);
$search_max_time = post_int("search_max_time");
$search_forum = post_int("search_forum");
$search_sort = post_int("search_sort");
$search_list = explode(" ", $search_keywords);
if ($search_max_time) {
$min_timestamp = time() - $search_max_time * 3600 * 24;
} else {
$min_timestamp = 0;
}
$limit = 100;
if ($search_forum == -1) {
$forum = null;
} else {
if ($search_forum) {
$forum = BoincForum::lookup_id($search_forum);
}
}
$user = null;
开发者ID:CalvinZhu,项目名称:boinc,代码行数:31,代码来源:forum_search_action.php
示例14: do_confirmedblock
function do_confirmedblock($logged_in_user)
{
check_tokens($logged_in_user->authenticator);
$id = post_int("id");
$blocked_user = BoincUser::lookup_id($id);
if (!$blocked_user) {
error_page(tra("no such user"));
}
add_ignored_user($logged_in_user, $blocked_user);
page_head(tra("User %1 blocked", $blocked_user->name));
echo "<div>" . tra("User %1 has been blocked from sending you private messages.", $blocked_user->name) . "\n";
echo tra("To unblock, visit %1message board preferences%2", "<a href=\"edit_forum_preferences_form.php\">", "</a>") . "</div>\n";
}
开发者ID:CalvinZhu,项目名称:boinc,代码行数:13,代码来源:pm.php
示例15: db_init
require_once "../inc/db_ops.inc";
require_once "../project/common.inc";
db_init();
set_time_limit(600);
$user = get_logged_in_user(true);
// authenticate admin-level user
qcn_admin_user_auth($user, true);
$query = "SELECT id, fname, lname, email_addr, addr1, addr2, city, region, postcode, country, latitude, longitude, phone, fax, bshare_coord, bshare_map, bshare_ups, cpu_type, cpu_os, cpu_age, cpu_floor, cpu_admin, cpu_permission, cpu_firewall, cpu_proxy, cpu_internet, cpu_unint_power, sensor_distribute, comments,\n loc_home,\n loc_business,\n loc_affix_perm,\n loc_self_install,\n loc_day_install_sunday,\n loc_time_install_sunday,\n loc_day_install_monday,\n loc_time_install_monday,\n loc_day_install_tuesday,\n loc_time_install_tuesday,\n loc_day_install_wednesday,\n loc_time_install_wednesday,\n loc_day_install_thursday,\n loc_time_install_thursday,\n loc_day_install_friday,\n loc_time_install_friday,\n loc_day_install_saturday,\n loc_time_install_saturday,\n loc_years_host, \n ramp_type, \n quake_damage, \n liquefaction,\n from_unixtime(time_added) time_add, \n from_unixtime(time_edit) time_ed,\n completed,\n from_unixtime(time_completed) time_comp\nfrom qcn_ramp_participant WHERE active=1 ";
$order = "order by country, lname, fname";
$show_aggregate = false;
// start $_POST
$nresults = post_int("nresults", true);
$last_pos = post_int("last_pos", true);
$bUseCSV = post_int("cbUseCSV", true);
$bUseRegional = post_int("cbUseRegional", true);
$bUseComp = post_int("cbUseComp", true);
/*$bUseArchive = post_int("cbUseArchive", true);
$bUseFile = post_int("cbUseFile", true);
$bUseQuake = post_int("cbUseQuake", true);
$bUseQCNQuake = post_int("cbUseQCNQuake", true);
$bUseLat = post_int("cbUseLat", true);
$bUseSensor = post_int("cbUseSensor", true);
$bUseTime = post_int("cbUseTime", true);
$bUseHost = post_int("cbUseHost", true);
$strHostID = post_int("HostID", true);
*/
$selectSort = post_str("selectSort", true);
$strCountry = post_str("db_country", true);
if (!$selectSort) {
$selectSort = "Last Name";
}
开发者ID:happyj,项目名称:qcn,代码行数:31,代码来源:ramp.php
示例16: delete_badge
function delete_badge()
{
$id = post_int("id");
$badge = BoincBadge::lookup_id($id);
if (!$badge) {
admin_error_page("no such badge");
}
BoincBadgeUser::delete("badge_id={$id}");
BoincBadgeTeam::delete("badge_id={$id}");
$badge->delete();
}
开发者ID:ChristianBeer,项目名称:boinc,代码行数:11,代码来源:badge_admin.php
示例17: doRAMPSubmit
function doRAMPSubmit($userid, $rampid, $ramp_type)
{
/* print_r($_POST);Array ( [db_id] => 0 [lnm0] => [db_fname] => car [db_lname] => Christensen [db_addr1] => 14525 SW Millikan #76902 [db_addr2] => [db_city] => Beaverton [db_region] => OR [db_postcode_] => [db_country] => United States [db_phone] => +1 215 989 4276 [db_fax] => [email protected] [db_email_addr] => [email protected] [lat0] => [lng0] => [addrlookup] => 14525 SW Millikan #76902, , Beaverton, OR, United States [db_bshare_map] => on [db_bshare_coord] => on [db_bshare_ups] => on [db_sensor_distribute] => on [db_cpu_os] => Mac OS X (Intel) [db_cpu_age] => 5 [db_cpu_floor] => 6 [db_cpu_admi
n] => on [db_cpu_permission] => on [db_cpu_firewall] => on [db_cpu_internet] => on [db_cpu_proxy] => on [db_cpu_unint_power] => on [db_comments] =>
hkhk [submit] => Submit )
*/
// copy over post variables to reuse in the fields below, and for the sql insert/update!
$row["id"] = $rampid;
$row["ramp_type"] = $ramp_type;
$row["userid"] = $userid;
$row["fname"] = mysql_real_escape_string(post_str("db_fname"));
$row["lname"] = mysql_real_escape_string(post_str("db_lname"));
$row["email_addr"] = mysql_real_escape_string(post_str("db_email_addr"));
$row["addr1"] = mysql_real_escape_string(post_str("db_addr1"));
$row["addr2"] = mysql_real_escape_string(post_str("db_addr2", true));
// note it's optional
$row["city"] = mysql_real_escape_string(post_str("db_city"));
$row["region"] = mysql_real_escape_string(post_str("db_region", true));
// note it's optional
$row["country"] = mysql_real_escape_string(post_str("db_country"));
$row["postcode"] = mysql_real_escape_string(post_str("db_postcode", true));
// note it's optional
$row["latitude"] = post_double("lat0", true);
$row["longitude"] = post_double("lng0", true);
$row["gmap_placename"] = mysql_real_escape_string(post_str("addrlookup", true));
// note it's optional
$row["gmap_view_level"] = 18;
$row["gmap_view_type"] = 0;
$row["phone"] = mysql_real_escape_string(post_str("db_phone", true));
// note it's optional
$row["fax"] = mysql_real_escape_string(post_str("db_fax", true));
// note it's optional
$row["bshare_coord"] = $_POST["db_bshare_coord"] == "on" ? 1 : 0;
$row["bshare_map"] = $_POST["db_bshare_map"] == "on" ? 1 : 0;
$row["bshare_ups"] = $_POST["db_bshare_ups"] == "on" ? 1 : 0;
$row["cpu_type"] = post_str("db_cpu_os", true);
$row["cpu_os"] = post_str("db_cpu_os", true);
$row["cpu_age"] = post_int("db_cpu_age", true);
$row["cpu_floor"] = post_int("db_cpu_floor", true);
$row["cpu_admin"] = post_int("db_cpu_admin", true);
$row["cpu_permission"] = post_int("db_cpu_permission", true);
$row["cpu_firewall"] = post_int("db_cpu_firewall", true);
$row["cpu_proxy"] = post_int("db_cpu_proxy", true);
$row["cpu_internet"] = post_int("db_cpu_internet", true);
$row["cpu_unint_power"] = post_int("db_cpu_unint_power", true);
$row["sensor_distribute"] = $_POST["db_sensor_distribute"] == "on" ? 1 : 0;
$row["comments"] = mysql_real_escape_string(post_str("db_comments", true));
$row["loc_home"] = $_POST["db_loc_home"] == "on" ? 1 : 0;
$row["loc_business"] = $_POST["db_loc_business"] == "on" ? 1 : 0;
$row["loc_affix_perm"] = $_POST["db_loc_affix_perm"] == "on" ? 1 : 0;
$row["loc_self_install"] = $_POST["db_loc_self_install"] == "on" ? 1 : 0;
$row["loc_day_install_sunday"] = $_POST["db_loc_day_install_sunday"] == "on" ? 1 : 0;
$row["loc_day_install_monday"] = $_POST["db_loc_day_install_monday"] == "on" ? 1 : 0;
$row["loc_day_install_tuesday"] = $_POST["db_loc_day_install_tuesday"] == "on" ? 1 : 0;
$row["loc_day_install_wednesday"] = $_POST["db_loc_day_install_wednesday"] == "on" ? 1 : 0;
$row["loc_day_install_thursday"] = $_POST["db_loc_day_install_thursday"] == "on" ? 1 : 0;
$row["loc_day_install_friday"] = $_POST["db_loc_day_install_friday"] == "on" ? 1 : 0;
$row["loc_day_install_saturday"] = $_POST["db_loc_day_install_saturday"] == "on" ? 1 : 0;
if ($row["loc_day_install_sunday"]) {
$row["loc_time_install_sunday"] = post_str("db_loc_time_install_sunday", true);
} else {
$row["loc_time_install_sunday"] = "";
}
if ($row["loc_day_install_monday"]) {
$row["loc_time_install_monday"] = post_str("db_loc_time_install_monday", true);
} else {
$row["loc_time_install_monday"] = "";
}
if ($row["loc_day_install_tuesday"]) {
$row["loc_time_install_tuesday"] = post_str("db_loc_time_install_tuesday", true);
} else {
$row["loc_time_install_tuesday"] = "";
}
if ($row["loc_day_install_wednesday"]) {
$row["loc_time_install_wednesday"] = post_str("db_loc_time_install_wednesday", true);
} else {
$row["loc_time_install_wednesday"] = "";
}
if ($row["loc_day_install_thursday"]) {
$row["loc_time_install_thursday"] = post_str("db_loc_time_install_thursday", true);
} else {
$row["loc_time_install_thursday"] = "";
}
if ($row["loc_day_install_friday"]) {
$row["loc_time_install_friday"] = post_str("db_loc_time_install_friday", true);
} else {
$row["loc_time_install_friday"] = "";
}
if ($row["loc_day_install_saturday"]) {
$row["loc_time_install_saturday"] = post_str("db_loc_time_install_saturday", true);
} else {
$row["loc_time_install_saturday"] = "";
}
$row["loc_time_hour_install"] = post_int("db_loc_time_hour_install", true);
if ($row["loc_time_hour_install"] == "") {
$row["loc_time_hour_install"] = "null";
}
$row["loc_time_minute_install"] = post_int("db_loc_time_minute_install", true);
if ($row["loc_time_minute_install"] == "") {
$row["loc_time_minute_install"] = "null";
//.........这里部分代码省略.........
开发者ID:happyj,项目名称:qcn,代码行数:101,代码来源:ramp_signup.php
示例18: get_logged_in_user
//
// This file was modified by contributors of "BOINC Web Tweak" project.
require_once "../inc/boinc_db.inc";
require_once "../inc/util.inc";
require_once "../inc/team.inc";
$user = get_logged_in_user();
$teamid = post_int("id");
$team = BoincTeam::lookup_id($teamid);
if (!$team) {
error_page("No such team");
}
require_founder_login($user, $team);
page_head("Removing users from {$team->name}");
$ndel = 0;
for ($i = 0; $i < $_POST["ninactive_users"]; $i++) {
$userid = post_int("remove_{$i}", true);
if (!$userid) {
continue;
}
$user = BoincUser::lookup_id($userid);
if (!$user) {
continue;
}
if ($user->teamid != $team->id) {
echo "<br>{$user->name} is not a member of {$team->name}";
} else {
user_quit_team($user);
echo "<br>{$user->name} has been removed";
$ndel++;
}
}
开发者ID:Turante,项目名称:boincweb,代码行数:31,代码来源:team_remove_inactive_action.php
示例19: db_init
<?php
include_once "../inc/db.inc";
include_once "../inc/util.inc";
include_once "../inc/prefs.inc";
include_once "../inc/queue.inc";
db_init();
$timestr = time_str(time(0));
$jobapplication = post_int('application');
$jobname = escapeshellarg($_POST['name']);
$jobinput = post_str('input');
$jobfops = post_int('fops');
$jobdisk = post_int('disk');
$jobmem = post_int('mem');
if (get_magic_quotes_gpc()) {
$jobinput = stripslashes($jobinput);
}
$config = get_config();
$name = parse_config($config, "<long_name>");
$user = get_logged_in_user();
$jobapplicationname = mysql_fetch_object(mysql_query("SELECT * FROM app WHERE id=" . $jobapplication));
$app = $jobapplicationname;
$jobapplicationfriendlyname = $jobapplicationname->user_friendly_name;
$jobapplicationname = $jobapplicationname->name;
$title = "New job for '" . $jobname . "' " . $user->name . " at " . $timestr;
page_head($title);
start_table();
row1("Job speciffics");
row2("Job application: ", $jobapplicationfriendlyname);
row2("Job name: ", $jobname);
row2("Job estimated time to complete: ", floor((double) $jobfops / 92254963740.0) . " min. ");
开发者ID:WilliamStilte,项目名称:boinc,代码行数:31,代码来源:queue_new_job_form_action.php
示例20: get_config
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
// This file allows people to rate posts in a thread
require_once '../inc/forum.inc';
require_once '../inc/util.inc';
$config = get_config();
if (parse_bool($config, "no_forum_rating")) {
page_head(tra("Rating offline"));
echo tra("This function is turned off by the project");
page_tail();
exit(0);
}
if (!empty($_GET['post'])) {
$postId = get_int('post');
$choice = post_str('submit', true);
$rating = post_int('rating', true);
if (!$choice) {
$choice = get_str('choice', true);
}
if ($choice == SOLUTION or $choice == "p") {
$rating = 1;
} else {
$rating = -1;
}
$user = get_logged_in_user();
if ($choice == null && ($rating == null || $rating > 2 || $rating < -2)) {
show_result_page(false, NULL, NULL, $choice);
}
$post = BoincPost::lookup_id($postId);
$thread = BoincThread::lookup_id($post->thread);
$forum = BoincForum::lookup_id($thread->forum);
开发者ID:nicolas17,项目名称:boincgit-test,代码行数:31,代码来源:forum_rate.php
注:本文中的post_int函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论