Example #1
0
 function init_categories_data()
 {
     $all_cats = GDSRDatabase::get_all_categories();
     $categories = GDSRHelper::get_categories_hierarchy($all_cats);
     $ids_array = $items = array();
     foreach ($categories as $cat) {
         $items[$cat->term_id] = $cat->parent;
         $ids_array[] = $cat->term_id;
     }
     GDSRDatabase::add_category_defaults("(" . join(", ", $ids_array) . ")", $ids_array, $items);
 }
<?php

$data = gdsrDB::filter_latest_votes($o);
GDSRHelper::render_dash_widget_vote($data);
?>
<div id="gdsr-latest-cmds">
    <a class="button" href="admin.php?page=gd-star-rating-stats"><?php 
_e("Articles Log", "gd-star-rating");
?>
</a>
    <a class="button" href="admin.php?page=gd-star-rating-users"><?php 
_e("Users Log", "gd-star-rating");
?>
</a>
</div>
</tr>
<tr><th scope="row"><?php 
_e("Trends Preview", "gd-star-rating");
?>
</th>
    <td>
        <table cellpadding="0" cellspacing="0">
            <tr>
                <td width="150" style="padding: 0; border: 0; height: 28px; vertical-align: top;"><?php 
_e("Trends", "gd-star-rating");
?>
:</td>
                <td width="200" align="left" style="padding: 0; border: 0; vertical-align: top; text-align: right;">
                    <select style="width: 180px;" name="gdsr_style_preview_trends" id="gdsr_style_preview_trends" onchange="gdsrStyleSelection('trends')">
                        <?php 
GDSRHelper::render_styles_select($gdsr_gfx->trend);
?>
                    </select>
                </td>
                <td width="20" style="padding: 0; border: 0; vertical-align: top;" rowspan="2"></td>
                <td style="padding: 0; border: 0; vertical-align: top;">
                    <table cellpadding="0" width="400" cellspacing="0" class="previewtable">
                        <tr>
                            <td class="gdsr-preview-trends" style="background-color: black;"><img src="#" id="gdsr_preview_trends_black" /></td>
                            <td class="gdsr-preview-space"></td>
                            <td class="gdsr-preview-trends" style="background-color: red;"><img src="#" id="gdsr_preview_trends_red" /></td>
                            <td class="gdsr-preview-space"></td>
                            <td class="gdsr-preview-trends" style="background-color: green;"><img src="#" id="gdsr_preview_trends_green" /></td>
                            <td class="gdsr-preview-space"></td>
                            <td class="gdsr-preview-trends" style="background-color: white;"><img src="#" id="gdsr_preview_trends_white" /></td>
                            <td class="gdsr-preview-space"></td>
?>
</legend>
    <table border="0" cellpadding="2" cellspacing="0" width="100%">
      <tr>
        <td class="gdsrleft"><?php 
_e("Set", "gd-star-rating");
?>
:</td>
        <td class="gdsrright">
            <select id="srRTGStarsStyle" name="srRTGStarsStyle">
                <?php 
GDSRHelper::render_styles_select($gdsr_styles, 'oxygen');
?>
            </select>
        </td>
      </tr>
      <tr>
        <td class="gdsrleft"><?php 
_e("Size", "gd-star-rating");
?>
:</td>
        <td class="gdsrright">
            <label><?php 
GDSRHelper::render_star_sizes_tinymce("srRTGStarsSize");
?>
</label>
        </td>
      </tr>
    </table>
</fieldset>
?>
-tv-img" style="display: <?php 
echo $instance['trends_voting'] == 'img' ? 'block' : 'none';
?>
">
    <table border="0" cellpadding="2" cellspacing="0" width="100%">
      <tr>
        <td width="100"></td>
        <td><?php 
_e("Image set", "gd-star-rating");
?>
:</td>
        <td align="right">
            <select style="width: 180px;" name="<?php 
echo $this->get_field_name('trends_voting_set');
?>
" id="<?php 
echo $this->get_field_id('trends_voting_set');
?>
">
                <?php 
GDSRHelper::render_styles_select($wptr, $instance["trends_voting_set"]);
?>
            </select>
        </td>
      </tr>
    </table>
</div>
</div>
<div class="gdsr-table-split"></div>
Example #6
0
    echo $timer_date_value;
    ?>
" id="gdsr_timer_date_value" name="gdsr_timer_date_value" style="width: 100px; padding: 2px;" />
        </td>
        </tr></table>
    </div>
    <div id="gdsr_timer_countdown" style="display: <?php 
    echo $timer_restrictions == "T" ? "block" : "none";
    ?>
">
        <table width="<?php 
    echo $box_width;
    ?>
"><tr>
        <td style="height: 25px;"><label style="font-size: 12px;" for="gdsr_review"><?php 
    _e("Countdown", "gd-star-rating");
    ?>
:</label></td>
        <td align="right" style="height: 25px;" valign="baseline">
            <input type="text" value="<?php 
    echo $countdown_value;
    ?>
" id="gdsr_timer_countdown_value" name="gdsr_timer_countdown_value" style="width: 35px; text-align: right; padding: 2px;" />
            <?php 
    GDSRHelper::render_countdown_combo("gdsr_timer_countdown_type", $countdown_type, 60);
    ?>
        </td>
        </tr></table>
    </div>
    <?php 
}
Example #7
0
?>
</strong></p>
<div class="tablenav">
    <div class="alignleft">
        <select style="width: 100px;" name="gdsr_vote" id="gdsr_vote">
        <option value="0"<?php 
if ($filter_vote == 0) {
    echo ' selected="selected"';
}
?>
><?php 
_e("All Votes", "gd-star-rating");
?>
</option>
        <?php 
GDSRHelper::render_stars_select_full($filter_vote, $max_stars, 1, __("Vote", "gd-star-rating"));
?>
        </select>
        <input class="button-secondary delete" type="submit" name="gdsr_filter" value="<?php 
_e("Filter", "gd-star-rating");
?>
" />
    </div>
    <div class="tablenav-pages">
        <?php 
echo $pager;
?>
    </div>
</div>
<br class="clear"/>
<table class="widefat">
    ?>
:</td>
                <td width="80" align="left">
                <select style="width: 70px;" name="gdsr_review_stars" id="gdsr_review_stars">
                <?php 
    GDSRHelper::render_stars_select($gdsr_options["review_stars"]);
    ?>
                </select>
                </td>
            </tr>
            <tr>
                <td width="150">MSIE 6:</td>
                <td width="200" align="left" colspan="6">
                <select style="width: 180px;" name="gdsr_review_style_ie6" id="gdsr_review_style_ie6">
                <?php 
    GDSRHelper::render_styles_select($gdsr_gfx->stars, $gdsr_options["review_style_ie6"]);
    ?>
                </select>
                </td>
            </tr>
        </table>
        <div class="gdsr-table-split"></div>
        <table cellpadding="0" cellspacing="0" class="previewtable">
            <tr>
                <td width="150"><?php 
    _e("Rating header", "gd-star-rating");
    ?>
:</td>
                <td width="200">
                    <input type="text" name="gdsr_review_header_text" id="gdsr_review_header_text" value="<?php 
    echo wp_specialchars($gdsr_options["review_header_text"]);
Example #9
0
?>
 };
    var gdsrTrendsExt = { <?php 
GDSRHelper::render_ext_gfx_js($gdsr_gfx->trend);
?>
 };
    var gdsrThumbsExt = { <?php 
GDSRHelper::render_ext_gfx_js($gdsr_gfx->thumbs);
?>
 };
    var gdsrAuthors = { <?php 
GDSRHelper::render_authors_gfx_js($gdsr_gfx->stars);
?>
 };
    var gdsrAuthorsThumbs = { <?php 
GDSRHelper::render_authors_gfx_js($gdsr_gfx->thumbs);
?>
 };

    var gdsrBase = "#gdsr_preview";
    var gdsrStyle = "";
    var gdsrSize = "";
    var gdsrImage = "";

    if (preview == "trends") {
        gdsrBase = gdsrBase + "_trends";
        gdsrStyle = jQuery("#gdsr_style_preview_trends").val();
        gdsrImage = gdsrTrends[gdsrStyle] + "trend." + gdsrTrendsExt[gdsrStyle];
    } else if (preview == "thumbs") {
        gdsrBase = gdsrBase + "_thumbs";
        gdsrSize = jQuery("#gdsr_size_preview_thumbs").val();
            <tr>
                <td width="150"><?php 
_e("Thumbs", "gd-star-rating");
?>
:</td>
                <td width="200" align="left">
                <select style="width: 180px;" name="gdsr_thumb_rss_style" id="gdsr_thumb_rss_style">
                <?php 
GDSRHelper::render_styles_select($gdsr_gfx->thumbs, $gdsr_options["thumb_rss_style"]);
?>
                </select>
                </td>
                <td width="10"></td>
                <td width="150" align="left">
                <?php 
GDSRHelper::render_thumbs_sizes("gdsr_thumb_rss_size", $gdsr_options["thumb_rss_size"]);
?>
                </td>
            </tr>
        </table>
        <div class="gdsr-table-split"></div>
        <table cellpadding="0" cellspacing="0" class="previewtable">
            <tr>
                <td width="150"><?php 
_e("Rating Header", "gd-star-rating");
?>
:</td>
                <td><input type="text" name="gdsr_rss_header_text" id="gdsr_rss_header_text" value="<?php 
echo esc_attr($gdsr_options["rss_header_text"]);
?>
" style="width: 350px" /></td>
')"><?php 
_e("Stars", "gd-star-rating");
?>
</a></strong></td>
    <td width="100" nowrap="nowrap"><?php 
_e("Set", "gd-star-rating");
?>
:</td>
    <td align="right"><select style="width: 200px" name="<?php 
echo $wpfn;
?>
[rating_stars]"><?php 
GDSRHelper::render_styles_select($wpst, $wpno['rating_stars']);
?>
</select></td>
  </tr>
  <tr>
    <td width="100" valign="top"></td>
    <td width="100" nowrap="nowrap"><?php 
_e("Size", "gd-star-rating");
?>
:</td>
    <td align="right"><?php 
GDSRHelper::render_star_sizes($wpfn . "[rating_size]", $wpno['rating_size'], 200);
?>
</td>
  </tr>
</table>
</div>
<div class="gdsr-table-split"></div>
Example #12
0
 function render_multi_rating($post, $user, $settings)
 {
     if ($this->is_bot) {
         return "";
     }
     if (is_feed()) {
         return "";
     }
     $set = gd_get_multi_set($settings["id"]);
     if ($set == null) {
         return "";
     }
     $dbg_allow = "F";
     $allow_vote = true;
     if ($this->is_ban && $this->o["ip_filtering"] == 1) {
         if ($this->o["ip_filtering_restrictive"] == 1) {
             return "";
         } else {
             $allow_vote = false;
         }
         $dbg_allow = "B";
     }
     if ($settings["read_only"] == 1) {
         $dbg_allow = "RO";
         $allow_vote = false;
     }
     if (is_single() || is_page() && $this->o["display_comment_page"] == 1) {
         $this->init_post();
     }
     $rd_post_id = intval($post->ID);
     $rd_user_id = intval($user->ID);
     $rd_is_page = $post->post_type == "page" ? "1" : "0";
     $remaining = 0;
     $deadline = "";
     if ($this->p) {
         $post_data = $this->p;
     } else {
         $post_data = GDSRDatabase::get_post_data($rd_post_id);
         if (count($post_data) == 0) {
             GDSRDatabase::add_default_vote($rd_post_id, $rd_is_page);
             $post_data = GDSRDatabase::get_post_data($rd_post_id);
         }
     }
     if ($post_data->rules_articles == "H") {
         return "";
     }
     if ($allow_vote) {
         if ($this->o["author_vote"] == 1 && $rd_user_id == $post->post_author) {
             $allow_vote = false;
             $dbg_allow = "A";
         }
     }
     if ($allow_vote) {
         if ($post_data->rules_articles == "" || $post_data->rules_articles == "A" || $post_data->rules_articles == "U" && $rd_user_id > 0 || $post_data->rules_articles == "V" && $rd_user_id == 0) {
             $allow_vote = true;
         } else {
             $allow_vote = false;
             $dbg_allow = "R_" . $post_data->rules_articles;
         }
     }
     if ($allow_vote && ($post_data->expiry_type == 'D' || $post_data->expiry_type == 'T')) {
         switch ($post_data->expiry_type) {
             case "D":
                 $remaining = GDSRHelper::expiration_date($post_data->expiry_value);
                 $deadline = $post_data->expiry_value;
                 break;
             case "T":
                 $remaining = GDSRHelper::expiration_countdown($post->post_date, $post_data->expiry_value);
                 $deadline = GDSRHelper::calculate_deadline($remaining);
                 break;
         }
         if ($remaining < 1) {
             GDSRDatabase::lock_post($rd_post_id);
             $allow_vote = false;
             $dbg_allow = "T";
         }
     }
     if ($allow_vote) {
         $allow_vote = GDSRDBMulti::check_vote($rd_post_id, $rd_user_id, $set->multi_id, 'multis', $_SERVER["REMOTE_ADDR"], $this->o["logged"] != 1, $this->o["mur_allow_mixed_ip_votes"] == 1);
         if (!$allow_vote) {
             $dbg_allow = "D";
         }
     }
     if ($allow_vote) {
         $allow_vote = $this->check_cookie($rd_post_id . "#" . $set->multi_id, "multis");
         if (!$allow_vote) {
             $dbg_allow = "C";
         }
     }
     $multi_record_id = GDSRDBMulti::get_vote($rd_post_id, $set->multi_id, count($set->object));
     $multi_data = GDSRDBMulti::get_values($multi_record_id);
     $votes = array();
     foreach ($multi_data as $md) {
         $single_vote = array();
         $single_vote["votes"] = 0;
         $single_vote["score"] = 0;
         if ($post_data->rules_articles == "A" || $post_data->rules_articles == "N") {
             $single_vote["votes"] = $md->user_voters + $md->visitor_voters;
             $single_vote["score"] = $md->user_votes + $md->visitor_votes;
         } else {
             if ($post_data->rules_articles == "V") {
                 $single_vote["votes"] = $md->visitor_voters;
                 $single_vote["score"] = $md->visitor_votes;
             } else {
                 $single_vote["votes"] = $md->user_voters;
                 $single_vote["score"] = $md->user_votes;
             }
         }
         if ($single_vote["votes"] > 0) {
             $rating = $single_vote["score"] / $single_vote["votes"];
         } else {
             $rating = 0;
         }
         if ($rating > $set->stars) {
             $rating = $set->stars;
         }
         $single_vote["rating"] = @number_format($rating, 1);
         $votes[] = $single_vote;
     }
     $debug = $rd_user_id == 0 ? "V" : "U";
     $debug .= $rd_user_id == $post->post_author ? "A" : "N";
     $debug .= ":" . $dbg_allow . " [" . STARRATING_VERSION . "]";
     $tags_css = array();
     $tags_css["MUR_CSS_BLOCK"] = $this->o["mur_class_block"];
     $tags_css["MUR_CSS_HEADER"] = $this->o["mur_class_header"];
     $tags_css["MUR_CSS_TEXT"] = $this->o["mur_class_text"];
     $tags_css["MUR_CSS_BUTTON"] = $this->o["mur_class_button"];
     if ($settings["tpl"] > 0) {
         $template_id = $settings["tpl"];
     } else {
         $template_id = $this->o["default_mrb_template"];
     }
     return GDSRRenderT2::render_mrb($this->o["mur_style"], $template_id, $allow_vote, $votes, $rd_post_id, $set, $this->o["mur_size"], $this->o["mur_header_text"], $tags_css, $settings["average_stars"], $settings["average_size"], $post_data->expiry_type, $remaining, $deadline, $this->o["mur_button_active"] == 1, $this->o["mur_button_text"], $debug, $this->loader_multis);
 }
    </td>
  </tr>
</table>
<div id="<?php 
echo $this->get_field_id('source');
?>
-multis" style="display: <?php 
echo $instance['source'] == 'multis' ? 'block' : 'none';
?>
">
<table border="0" cellpadding="2" cellspacing="0" width="100%">
  <tr>
    <td width="140" nowrap="nowrap"><?php 
_e("Multi Set", "gd-star-rating");
?>
:</td>
    <td align="right"><select name="<?php 
echo $this->get_field_name('source_set');
?>
" id="<?php 
echo $this->get_field_id('source_set');
?>
" style="width: 200px"><?php 
GDSRHelper::render_styles_select($wpml, $instance['source_set']);
?>
</select></td>
  </tr>
</table>
</div>
<div class="gdsr-table-split"></div>
 function get_categories_hierarchy($cats, $depth = 0, $level = 0)
 {
     $h = array();
     foreach ($cats as $cat) {
         if ($cat->parent == $level) {
             $cat->depth = $depth;
             $h[] = $cat;
             $recats = GDSRHelper::get_categories_hierarchy($cats, $depth + 1, $cat->term_id);
             $h = array_merge($h, $recats);
         }
     }
     return $h;
 }
</label>
    </td>
</tr>
<tr><th scope="row"><?php 
_e("Vote Waiting Message", "gd-star-rating");
?>
</th>
    <td>
        <table cellpadding="0" cellspacing="0" class="previewtable">
            <tr>
                <td width="150"><?php 
_e("Animation indicator", "gd-star-rating");
?>
:</td>
                <td width="200"><?php 
GDSRHelper::render_loaders("gdsr_wait_loader_multis", $gdsr_options["wait_loader_multis"], 'jqloadermultis');
?>
</td>
                <td width="10"></td>
                <td rowspan="3" width="150" valign="top"><?php 
_e("Preview", "gd-star-rating");
?>
:</td>
                <td rowspan="3" valign="top">
                    <div class="wait-preview-article">
                        <div id="gdsrwaitpreviewmultis" class="<?php 
echo $default_preview_class;
?>
">
                            <?php 
if ($gdsr_options["wait_show_multis"] == 0) {
Example #16
0
 function ban_ip($ip, $mode = 'S')
 {
     global $wpdb, $table_prefix;
     if ($mode == 'S') {
         $ip = GDSRHelper::clean_ip($ip);
     }
     if (!GDSRDatabase::ban_ip_check($ip, $mode)) {
         $wpdb->query(sprintf("INSERT INTO %sgdsr_ips (`status`, `mode`, `ip`) VALUES ('B', '%s', '%s')", $table_prefix, $mode, $ip));
     }
 }
Example #17
0
echo $this->get_field_id('title');
?>
" value="<?php 
echo $instance["title"];
?>
" /></td>
  </tr>
</table>
<table border="0" cellpadding="2" cellspacing="0" width="100%">
  <tr>
    <td width="140" nowrap="nowrap"><?php 
_e("Template", "gd-star-rating");
?>
:</td>
    <td align="right"><?php 
GDSRHelper::render_templates_section("WCR", $this->get_field_name('template_id'), $instance["template_id"], 260);
?>
    </td>
  </tr>
  <tr>
    <td width="140" nowrap="nowrap"><?php 
_e("Show Widget To", "gd-star-rating");
?>
:</td>
    <td align="right">
        <label><select name="<?php 
echo $this->get_field_name('display');
?>
" id="<?php 
echo $this->get_field_id('display');
?>
Example #18
0
 function cache_cleanup()
 {
     if ($this->o["cache_cleanup_auto"] == 1) {
         $clean = false;
         $pdate = strtotime($this->o["cache_cleanup_last"]);
         $next_clean = mktime(date("H", $pdate), date("i", $pdate), date("s", $pdate), date("m", $pdate) + $this->o["cache_cleanup_days"], date("j", $pdate), date("Y", $pdate));
         if (intval($next_clean) < intval(mktime())) {
             $clean = true;
         }
         if ($clean) {
             GDSRHelper::clean_cache(substr(STARRATING_CACHE_PATH, 0, strlen(STARRATING_CACHE_PATH) - 1));
             $this->o["cache_cleanup_last"] = date("r");
             update_option('gd-star-rating', $this->o);
         }
     }
 }
_e("Average Stars", "gd-star-rating");
?>
</legend>
    <table border="0" cellpadding="2" cellspacing="0" width="100%">
      <tr>
        <td class="gdsrleft"><?php 
_e("Set", "gd-star-rating");
?>
:</td>
        <td class="gdsrright">
            <select id="srStarsStyleMURAv" name="srStarsStyleMURAv">
                <?php 
GDSRHelper::render_styles_select($gdsr_styles, 'oxygen');
?>
            </select>
        </td>
      </tr>
      <tr>
        <td class="gdsrleft"><?php 
_e("Size", "gd-star-rating");
?>
:</td>
        <td class="gdsrright">
            <?php 
GDSRHelper::render_star_sizes_tinymce("srStarsSizeMURAv");
?>
        </td>
      </tr>
    </table>
</fieldset>
Example #20
0
<div id="gdsr-img-custom[<?php 
echo $wpnm;
?>
]" style="display: <?php 
echo $wpno['image_from'] == 'custom' ? 'block' : 'none';
?>
">
<table border="0" cellpadding="2" cellspacing="0" width="100%">
  <tr>
    <td width="100" valign="top"></td>
    <td width="100" nowrap="nowrap"><?php 
_e("Custom Field", "gd-star-rating");
?>
:</td>
    <td align="right"><?php 
GDSRHelper::render_custom_fields($wpfn . "[image_custom]", $wpno['image_custom'], 200);
?>
</td>
  </tr>
</table>
</div>
<div id="gdsr-img-content[<?php 
echo $wpnm;
?>
]" style="display: <?php 
echo $wpno['image_from'] == 'content' ? 'block' : 'none';
?>
">
<table border="0" cellpadding="2" cellspacing="0" width="100%">
  <tr>
    <td width="100" valign="top"></td>
Example #21
0
echo $wpfn;
?>
[title]" id="gdstarr-title" value="<?php 
echo $wpno["title"];
?>
" /></td>
  </tr>
</table>
<table border="0" cellpadding="2" cellspacing="0" width="100%">
  <tr>
    <td width="140" nowrap="nowrap"><?php 
_e("Template", "gd-star-rating");
?>
:</td>
    <td align="right"><?php 
GDSRHelper::render_templates_section("WBR", $wpfn . "[template_id]", $wpno["template_id"], 260);
?>
    </td>
  </tr>
  <tr>
    <td width="140" nowrap="nowrap"><?php 
_e("Show Widget To", "gd-star-rating");
?>
:</td>
    <td align="right">
        <label><select name="<?php 
echo $wpfn;
?>
[display]" id="gdstarr-display" style="width: 110px">
            <option value="all"<?php 
echo $wpno['display'] == 'all' ? ' selected="selected"' : '';
</div>
<div id="gdsr-tv-img[<?php 
echo $wpnm;
?>
]" style="display: <?php 
echo $wpno['trends_voting'] == 'img' ? 'block' : 'none';
?>
">
    <table border="0" cellpadding="2" cellspacing="0" width="100%">
      <tr>
        <td width="100"></td>
        <td><?php 
_e("Image set", "gd-star-rating");
?>
:</td>
        <td align="right">
            <select style="width: 180px;" name="<?php 
echo $wpfn;
?>
[trends_voting_set]" id="gdstarr-trendsvotingset">
                <?php 
GDSRHelper::render_styles_select($wptr, $wpno["trends_voting_set"]);
?>
            </select>
        </td>
      </tr>
    </table>
</div>
</div>
<div class="gdsr-table-split"></div>
<tr><th scope="row"><?php 
_e("Defaults", "gd-star-rating");
?>
</th>
    <td>
        <table cellpadding="0" cellspacing="0" class="previewtable">
            <tr>
                <td width="150"><?php 
_e("Rating Template", "gd-star-rating");
?>
:</td>
                <td align="left"><?php 
gdTemplateHelper::render_templates_section("TCB", "gdsr_default_tcb_template", $gdsr_options["default_tcb_template"], 350);
?>
</td>
            </tr>
            <tr>
                <td width="150"><?php 
_e("Animation indicator", "gd-star-rating");
?>
:</td>
                <td align="left"><?php 
GDSRHelper::render_loaders("gdsr_wait_loader_cmmthumb", $gdsr_options["wait_loader_cmmthumb"], 'jqloadercmmthumb', 180, '', true);
?>
</td>
            </tr>
        </table>
     </td>
</tr>
</tbody></table>
Example #24
0
        }
        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 != '') {
Example #25
0
                <?php 
        GDSRHelper::render_moderation_combo("gdsr_comments_moderation", "/", 120, "", true, true, true);
        ?>
                </td><td style="width: 10px"></td>
                <?php 
    }
    ?>
                <td style="width: 80px; height: 29px;">
                    <span class="paneltext"><?php 
    _e("Vote Rules", "gd-star-rating");
    ?>
:</span>
                </td>
                <td style="width: 140px; height: 29px;" align="right">
                <?php 
    GDSRHelper::render_rules_combo("gdsr_comments_voterules", "/", 120, "", true, true, true);
    ?>
                </td>
            </tr>
            </table>
            <?php 
}
?>
        </td>
        <td style="width: 10px;"></td>
        <td class="gdsr-vertical-line"><input class="inputbutton" type="submit" name="gdsr_update" value="<?php 
_e("Update", "gd-star-rating");
?>
" /></td>
        </tr>
        </table>
Example #26
0
</legend>
    <table border="0" cellpadding="2" cellspacing="0" width="100%">
      <tr>
        <td class="gdsrleft"><?php 
_e("Set", "gd-star-rating");
?>
:</td>
        <td class="gdsrright">
            <select id="srThumbsStyle" name="srThumbsStyle">
                <?php 
GDSRHelper::render_styles_select($gdsr_thumbs, 'starrating');
?>

            </select>
        </td>
      </tr>
      <tr>
        <td class="gdsrleft"><?php 
_e("Size", "gd-star-rating");
?>
:</td>
        <td class="gdsrright">
            <?php 
GDSRHelper::render_thumbs_sizes_tinymce("srThumbsSize");
?>

        </td>
      </tr>
    </table>
</fieldset>
Example #27
0
 function render_star_sizes_tinymce($name, $selected = "20", $width = 130)
 {
     GDSRHelper::render_star_sizes($name, $selected, $width);
 }
')"><?php 
_e("Stars", "gd-star-rating");
?>
</a></strong></td>
    <td width="100" nowrap="nowrap"><?php 
_e("Set", "gd-star-rating");
?>
:</td>
    <td align="right"><select style="width: 200px" name="<?php 
echo $this->get_field_name('rating_stars');
?>
"><?php 
GDSRHelper::render_styles_select($wpst, $instance['rating_stars']);
?>
</select></td>
  </tr>
  <tr>
    <td width="100" valign="top"></td>
    <td width="100" nowrap="nowrap"><?php 
_e("Size", "gd-star-rating");
?>
:</td>
    <td align="right"><?php 
GDSRHelper::render_star_sizes($this->get_field_name('rating_size'), $instance['rating_size'], 200);
?>
</td>
  </tr>
</table>
</div>
<div class="gdsr-table-split"></div>
                            <td style="width: 80px; height: 29px;">
                                <span class="paneltext"><?php 
_e("Multi Set", "gd-star-rating");
?>
:</span>
                            </td>
                            <td style="width: 230px; height: 29px;" align="right">
                                <select id="gdsr_integration_mur" name="gdsr_integration_mur" style="width: 210px">
                                    <option value="">/</option>
                                    <option value="0"><?php 
_e("Inherit from Category", "gd-star-rating");
?>
</option>
                                    <option value="">------------------------</option>
                                    <?php 
GDSRHelper::render_styles_select(GDSRDBMulti::get_multis_tinymce(), 0);
?>
                                </select>
                            </td>
                        </tr>
                        </table>
                    </div>
                </td>
            </tr>
        </table>
    </td>
    <td style="width: 10px;"></td>
    <td class="gdsr-vertical-line">
        <input class="inputbutton" type="submit" name="gdsr_update" value="<?php 
_e("Update", "gd-star-rating");
?>
Example #30
0
$number_posts_all = $number_posts_post + $number_posts_page;
if ($select == "post") {
    $number_posts = $number_posts_post;
} else {
    if ($select == "page") {
        $number_posts = $number_posts_page;
    } else {
        $number_posts = $number_posts_all;
    }
}
$max_page = floor($number_posts / $posts_per_page);
if ($max_page * $posts_per_page != $number_posts) {
    $max_page++;
}
if ($max_page > 1) {
    $pager = GDSRHelper::draw_pager($max_page, $page_id, $url, "pg");
}
$set = gd_get_multi_set($set_id);
?>

<script>
function checkAll(form) {
    for (i = 0, n = form.elements.length; i < n; i++) {
        if(form.elements[i].type == "checkbox" && !(form.elements[i].getAttribute('onclick', 2))) {
            if(form.elements[i].checked == true)
                form.elements[i].checked = false;
            else
                form.elements[i].checked = true;
        }
    }
}