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


PHP GDSRHelper::timer_value方法代码示例

本文整理汇总了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'] : ""));
         }
     }
 }
开发者ID:TheReaCompany,项目名称:pooplog,代码行数:46,代码来源:class.php

示例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 .= "&amp;cat=" . $filter_cats;
}
if ($filter_date != '' || $filter_date != '0') {
    $url .= "&amp;date=" . $filter_date;
}
if ($search != '') {
    $url .= "&amp;s=" . $search;
}
if ($select != '') {
开发者ID:hewu,项目名称:blogwp,代码行数:31,代码来源:articles.php

示例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;
}
开发者ID:alvaropereyra,项目名称:shrekcms,代码行数:31,代码来源:articles.php


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