本文整理汇总了PHP中GDSRHelper::timer_value方法的典型用法代码示例。如果您正苦于以下问题:PHP GDSRHelper::timer_value方法的具体用法?PHP GDSRHelper::timer_value怎么用?PHP GDSRHelper::timer_value使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GDSRHelper
的用法示例。
在下文中一共展示了GDSRHelper::timer_value方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: saveedit_post
/**
* Triggers saving GD Star Rating data for post.
*
* @param int $post_id ID of the post saving
*/
function saveedit_post($post_id)
{
if (isset($_POST["post_ID"]) && $_POST["post_ID"] > 0) {
$post_id = $_POST["post_ID"];
}
if (isset($_POST['gdsr_post_edit']) && $_POST['gdsr_post_edit'] == "edit" || isset($_POST['gdsr_post_edit_mur']) && $_POST['gdsr_post_edit_mur'] == "edit") {
if ($this->o["integrate_post_edit"] == 1 && isset($_POST["gdsrmultiactive"])) {
$set_id = intval($_POST["gdsrmultiactive"]);
if ($set_id > 0) {
$mur = $_POST['gdsrmulti'];
$mur = isset($mur[$post_id]) ? $mur[$post_id][$set_id] : $mur[0][$set_id];
$values = explode("X", $mur);
$set = gd_get_multi_set($set_id);
$record_id = GDSRDBMulti::get_vote($post_id, $set_id, count($set->object));
GDSRDBMulti::save_review($record_id, $values);
GDSRDBMulti::recalculate_multi_review($record_id, $values, $set);
$this->o["mur_review_set"] = $_POST["gdsrmultiset"];
update_option('gd-star-rating', $this->o);
}
}
$old = gdsrAdmDB::check_post_review($post_id);
$review = $_POST['gdsr_review'];
if ($_POST['gdsr_review_decimal'] != "-1") {
$review .= "." . $_POST['gdsr_review_decimal'];
}
GDSRDatabase::save_review($post_id, $review, $old);
$old = true;
GDSRDatabase::save_article_rules($post_id, isset($_POST['gdsr_vote_articles']) ? $_POST['gdsr_vote_articles'] : "A", isset($_POST['gdsr_mod_articles']) ? $_POST['gdsr_mod_articles'] : "N", isset($_POST['gdsr_recc_vote_articles']) ? $_POST['gdsr_recc_vote_articles'] : "A", isset($_POST['gdsr_recc_mod_articles']) ? $_POST['gdsr_recc_mod_articles'] : "N");
if ($this->o["comments_active"] == 1) {
GDSRDatabase::save_comment_rules($post_id, isset($_POST['gdsr_cmm_vote_articles']) ? $_POST['gdsr_cmm_vote_articles'] : "A", isset($_POST['gdsr_cmm_mod_articles']) ? $_POST['gdsr_cmm_mod_articles'] : "N", isset($_POST['gdsr_recc_cmm_vote_articles']) ? $_POST['gdsr_recc_cmm_vote_articles'] : "A", isset($_POST['gdsr_recc_cmm_mod_articles']) ? $_POST['gdsr_recc_cmm_mod_articles'] : "N");
}
if (isset($_POST['gdsr_timer_type'])) {
$timer = $_POST['gdsr_timer_type'];
GDSRDatabase::save_timer_rules($post_id, $timer, GDSRHelper::timer_value($timer, isset($_POST['gdsr_timer_date_value']) ? $_POST['gdsr_timer_date_value'] : "", isset($_POST['gdsr_timer_countdown_value']) ? $_POST['gdsr_timer_countdown_value'] : "", isset($_POST['gdsr_timer_countdown_type']) ? $_POST['gdsr_timer_countdown_type'] : ""));
}
if (isset($_POST['gdsr_timer_type_recc'])) {
$timer = $_POST['gdsr_timer_type_recc'];
GDSRDatabase::save_timer_rules_thumbs($post_id, $timer, GDSRHelper::timer_value($timer, isset($_POST['gdsr_recc_timer_date_value']) ? $_POST['gdsr_recc_timer_date_value'] : "", isset($_POST['gdsr_recc_timer_countdown_value']) ? $_POST['gdsr_recc_timer_countdown_value'] : "", isset($_POST['gdsr_recc_timer_countdown_type']) ? $_POST['gdsr_recc_timer_countdown_type'] : ""));
}
}
}
示例2:
}
if ($_POST["gdsr_delete_comments_recc"] != "") {
GDSRDatabase::delete_votes($ids, $_POST["gdsr_delete_comments_recc"], $gdsr_items, true);
}
if ($_POST["gdsr_review_rating"] != "") {
$review = $_POST["gdsr_review_rating"];
if ($_POST["gdsr_review_rating_decimal"] != "" && $_POST["gdsr_review_rating"] < $options["review_stars"]) {
$review .= "." . $_POST["gdsr_review_rating_decimal"];
}
gdsrAdmDB::update_reviews($ids, $review, $gdsr_items);
}
if ($_POST["gdsr_timer_type"] != "") {
gdsrAdmDB::update_restrictions($ids, $_POST["gdsr_timer_type"], GDSRHelper::timer_value($_POST["gdsr_timer_type"], $_POST["gdsr_timer_date_value"], $_POST["gdsr_timer_countdown_value"], $_POST["gdsr_timer_countdown_type"]));
}
if ($_POST["gdsr_timer_type_recc"] != "") {
gdsrAdmDB::update_restrictions_thumbs($ids, $_POST["gdsr_timer_type_recc"], GDSRHelper::timer_value($_POST["gdsr_timer_type_recc"], $_POST["gdsr_timer_date_value_recc"], $_POST["gdsr_timer_countdown_value_recc"], $_POST["gdsr_timer_countdown_type_recc"]));
}
gdsrAdmDB::update_settings($ids, $_POST["gdsr_article_moderation"], $_POST["gdsr_article_voterules"], $_POST["gdsr_comments_moderation"], $_POST["gdsr_comments_voterules"], $_POST["gdsr_article_moderation_recc"], $_POST["gdsr_article_voterules_recc"], $_POST["gdsr_comments_moderation_recc"], $_POST["gdsr_comments_voterules_recc"], $gdsr_items);
gdsrAdmDB::upgrade_integration($ids, $_POST["gdsr_integration_active_std"], $_POST["gdsr_integration_active_mur"], $_POST["gdsr_integration_mur"]);
}
}
if ($filter_cats != '' || $filter_cats != '0') {
$url .= "&cat=" . $filter_cats;
}
if ($filter_date != '' || $filter_date != '0') {
$url .= "&date=" . $filter_date;
}
if ($search != '') {
$url .= "&s=" . $search;
}
if ($select != '') {
示例3:
if ($_POST["gdsr_delete_articles"] != '') {
GDSRDatabase::delete_votes($ids, $_POST["gdsr_delete_articles"], $gdsr_items);
}
if ($_POST["gdsr_delete_comments"] != '') {
GDSRDatabase::delete_votes($ids, $_POST["gdsr_delete_comments"], $gdsr_items);
}
if ($_POST["gdsr_review_rating"] != "") {
$review = $_POST["gdsr_review_rating"];
if ($_POST["gdsr_review_rating_decimal"] != "" && $_POST["gdsr_review_rating"] < $options["review_stars"]) {
$review .= "." . $_POST["gdsr_review_rating_decimal"];
}
GDSRDatabase::update_reviews($ids, $review, $gdsr_items);
}
GDSRDatabase::update_settings($ids, $_POST["gdsr_article_moderation"], $_POST["gdsr_article_voterules"], $_POST["gdsr_comments_moderation"], $_POST["gdsr_comments_voterules"], $gdsr_items);
if ($_POST["gdsr_timer_type"] != "") {
GDSRDatabase::update_restrictions($ids, $_POST["gdsr_timer_type"], GDSRHelper::timer_value($_POST["gdsr_timer_type"], $_POST['gdsr_timer_date_value'], $_POST['gdsr_timer_countdown_value'], $_POST['gdsr_timer_countdown_type']));
}
}
}
if ($filter_cats != '' || $filter_cats != '0') {
$url .= "&cat=" . $filter_cats;
}
if ($filter_date != '' || $filter_date != '0') {
$url .= "&date=" . $filter_date;
}
if ($search != '') {
$url .= "&s=" . $search;
}
if ($select != '') {
$url .= "&select=" . $select;
}