コード例 #1
0
echo $options["admin_width"];
?>
px">
<form id="gdsr-articles" method="post" action="">
<h2 class="gdptlogopage">GD Star Rating: <?php 
_e("Multi Set Results", "gd-star-rating");
?>
: <?php 
_e("Voters", "gd-star-rating");
?>
</h2>
<div class="tablenav">
    <div class="alignleft">
<?php 
gdsrAdmDB::get_combo_months($filter_date);
gdsrAdmDB::get_combo_categories($filter_cats);
?>
        <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"/>

</form>
コード例 #2
0
ファイル: moderation.php プロジェクト: TheReaCompany/pooplog
</th>
            <th scope="col"><?php 
    _e("IP", "gd-star-rating");
    ?>
</th>
            <th scope="col"><?php 
    _e("User Agent", "gd-star-rating");
    ?>
</th>
        </tr>
    </thead>
    <tbody>
<?php 
    $tr_class = "";
    foreach ($rows as $row) {
        $row = gdsrAdmDB::convert_moderation_row($row);
        echo '<tr id="post-' . $row->record_id . '" class="' . $tr_class . ' author-self status-publish" valign="top">';
        echo '<th scope="row" class="check-column"><input name="gdsr_item[]" value="' . $row->record_id . '" type="checkbox"></th>';
        echo '<td><strong>' . $row->voted . '</strong></td>';
        echo '<td>' . $row->username . '</td>';
        echo '<td><strong>' . $row->vote . '</strong></td>';
        echo '<td>' . $row->ip . '</td>';
        echo '<td>' . $row->user_agent . '</td>';
        echo '</tr>';
        if ($tr_class == "") {
            $tr_class = "alternate ";
        } else {
            $tr_class = "";
        }
    }
    ?>
コード例 #3
0
ファイル: class.php プロジェクト: TheReaCompany/pooplog
 function init_operations()
 {
     $msg = "";
     if (isset($_POST["gdsr_multi_review_form"]) && $_POST["gdsr_multi_review_form"] == "review") {
         $mur_all = $_POST['gdsrmulti'];
         foreach ($mur_all as $post_id => $data) {
             if ($post_id > 0) {
                 foreach ($data as $set_id => $mur) {
                     $set = gd_get_multi_set($set_id);
                     $values = explode("X", $mur);
                     $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->custom_actions('init_save_review');
         wp_redirect_self();
         exit;
     }
     if (isset($_POST["gdsr_editcss_rating"])) {
         $rating_css = STARRATING_XTRA_PATH . "css/rating.css";
         if (is_writeable($rating_css)) {
             $newcontent = stripslashes($_POST['gdsr_editcss_contents']);
             $f = fopen($rating_css, 'w+');
             fwrite($f, $newcontent);
             fclose($f);
         }
         wp_redirect_self();
         exit;
     }
     if (isset($_POST['gdsr_debug_clean'])) {
         wp_gdsr_debug_clean();
         wp_redirect_self();
         exit;
     }
     if (isset($_POST['gdsr_cache_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);
         wp_redirect_self();
         exit;
     }
     if (isset($_POST['gdsr_preview_scan'])) {
         $this->g = gdsrAdmFunc::gfx_scan();
         update_option('gd-star-rating-gfx', $this->g);
         wp_redirect_self();
         exit;
     }
     if (isset($_POST['gdsr_t2_import'])) {
         gdsrAdmDB::insert_extras_templates(STARRATING_XTRA_PATH, false);
         wp_redirect_self();
         exit;
     }
     if (isset($_POST['gdsr_upgrade_tool'])) {
         require_once STARRATING_PATH . "/gdragon/gd_db_install.php";
         gdDBInstallGDSR::delete_tables(STARRATING_PATH);
         gdDBInstallGDSR::create_tables(STARRATING_PATH);
         gdDBInstallGDSR::upgrade_tables(STARRATING_PATH);
         gdDBInstallGDSR::alter_tables(STARRATING_PATH);
         gdDBInstallGDSR::alter_tables(STARRATING_PATH, "idx.txt");
         $this->o["database_upgrade"] = date("r");
         update_option('gd-star-rating', $this->o);
         wp_redirect_self();
         exit;
     }
     if (isset($_POST['gdsr_updatemultilog_tool'])) {
         GDSRDBMulti::recalculate_multi_rating_log();
         wp_redirect_self();
         exit;
     }
     if (isset($_POST['gdsr_mulitrecalc_tool'])) {
         $set_id = $_POST['gdsr_mulitrecalc_set'];
         if ($set_id > 0) {
             GDSRDBMulti::recalculate_set($set_id);
         } else {
             GDSRDBMulti::recalculate_all_sets();
         }
         wp_redirect_self();
         exit;
     }
     if (isset($_POST['gdsr_cleanup_tool'])) {
         if (isset($_POST['gdsr_tools_clean_invalid_log'])) {
             $count = gdsrTlsDB::clean_invalid_log_articles();
             if ($count > 0) {
                 $msg .= $count . " " . __("articles records from log table removed.", "gd-star-rating") . " ";
             }
             $count = gdsrTlsDB::clean_invalid_log_comments();
             if ($count > 0) {
                 $msg .= $count . " " . __("comments records from log table removed.", "gd-star-rating") . " ";
             }
         }
         if (isset($_POST['gdsr_tools_clean_invalid_trend'])) {
             $count = gdsrTlsDB::clean_invalid_trend_articles();
             if ($count > 0) {
                 $msg .= $count . " " . __("articles records from trends log table removed.", "gd-star-rating") . " ";
             }
             $count = gdsrTlsDB::clean_invalid_trend_comments();
             if ($count > 0) {
                 $msg .= $count . " " . __("comments records from trends log table removed.", "gd-star-rating") . " ";
             }
         }
         if (isset($_POST['gdsr_tools_clean_old_posts'])) {
             $count = gdsrTlsDB::clean_dead_articles();
             if ($count > 0) {
                 $msg .= $count . " " . __("dead articles records from articles table.", "gd-star-rating") . " ";
             }
             $count = gdsrTlsDB::clean_revision_articles();
             if ($count > 0) {
                 $msg .= $count . " " . __("post revisions records from articles table.", "gd-star-rating") . " ";
             }
             $count = gdsrTlsDB::clean_dead_comments();
             if ($count > 0) {
                 $msg .= $count . " " . __("dead comments records from comments table.", "gd-star-rating") . " ";
             }
         }
         if (isset($_POST['gdsr_tools_clean_old_posts'])) {
             $count = GDSRDBMulti::clean_dead_articles();
             if ($count > 0) {
                 $msg .= $count . " " . __("dead articles records from multi ratings tables.", "gd-star-rating") . " ";
             }
             $count = GDSRDBMulti::clean_revision_articles();
             if ($count > 0) {
                 $msg .= $count . " " . __("post revisions records from multi ratings tables.", "gd-star-rating") . " ";
             }
         }
         $this->o["database_cleanup"] = date("r");
         $this->o["database_cleanup_msg"] = $msg;
         update_option('gd-star-rating', $this->o);
         wp_redirect_self();
         exit;
     }
     if (isset($_POST['gdsr_post_lock'])) {
         $lock_date = $_POST['gdsr_lock_date'];
         gdsrAdmDB::lock_post_massive($lock_date);
         $this->o["mass_lock"] = $lock_date;
         update_option('gd-star-rating', $this->o);
         wp_redirect_self();
         exit;
     }
     if (isset($_POST['gdsr_rules_set'])) {
         wp_gdsr_dump("POST", $_POST);
         gdsrAdmDB::update_settings_full($_POST["gdsr_article_moderation"], $_POST["gdsr_article_voterules"], $_POST["gdsr_comments_moderation"], $_POST["gdsr_comments_voterules"], $_POST["gdsr_artthumb_moderation"], $_POST["gdsr_artthumb_voterules"], $_POST["gdsr_cmmthumbs_moderation"], $_POST["gdsr_cmmthumbs_voterules"]);
         wp_redirect_self();
         exit;
     }
 }
コード例 #4
0
<div class="postbox gdrgrid frontright myboxes">
    <h3 class="hndle"><span><?php 
_e("Votes for my posts", "gd-star-rating");
?>
</span></h3>
    <div class="inside">
    <?php 
global $user_ID;
$data = gdsrAdmDB::filter_votes_by_type($user_ID);
GDSRHelper::render_dash_widget_vote($data, "my-panel", "-my-posts");
?>
    </div>
</div>
コード例 #5
0
ファイル: voters.php プロジェクト: sangpena/appflex.mobi
?>
        </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"/>
<?php 
$sql = gdsrAdmDB::get_visitors($post_id, $vote_type, $filter_date, $filter_vote, $select, ($page_id - 1) * $posts_per_page, $posts_per_page, $sort_column, $sort_order);
$rows = $wpdb->get_results($sql, OBJECT);
$col[0] = gdFunctionsGDSR::column_sort_vars("user_id", $sort_order, $sort_column);
$col[1] = gdFunctionsGDSR::column_sort_vars("user_nicename", $sort_order, $sort_column);
$col[2] = gdFunctionsGDSR::column_sort_vars("vote", $sort_order, $sort_column);
$col[3] = gdFunctionsGDSR::column_sort_vars("voted", $sort_order, $sort_column);
$col[4] = gdFunctionsGDSR::column_sort_vars("ip", $sort_order, $sort_column);
$col[5] = gdFunctionsGDSR::column_sort_vars("user_agent", $sort_order, $sort_column);
?>

<table class="widefat">
    <thead>
        <tr>
            <th class="check-column" scope="col"><input type="checkbox" onclick="checkAll(document.getElementById('gdsr-articles'));"/></th>
            <th scope="col" nowrap="nowrap"><a href="<?php 
echo $b_url . $col[0]["url"];
コード例 #6
0
ファイル: articles.php プロジェクト: hewu/blogwp
 if ($row->rating_total > $options["stars"] || $row->rating_visitors > $options["stars"] || $row->rating_users > $options["stars"]) {
     $tr_class .= " invalidarticle";
 }
 $chart_url = STARRATING_CHART_URL . "post_charts.php?_ajax_nonce=" . wp_create_nonce('gdsr_chart_l8') . "&postid=" . $row->pid . "&amp;action=article";
 echo '<tr id="post-' . $row->pid . '" class="' . $tr_class . ' author-self status-publish" valign="top">';
 echo '<th scope="row" class="check-column"><input name="gdsr_item[]" value="' . $row->pid . '" type="checkbox"/></th>';
 echo '<td nowrap="nowrap">' . $row->pid . '</td>';
 echo '<td class="gdrinner">';
 echo '<a title="' . __("Comments", "gd-star-rating") . '" href="./admin.php?page=gd-star-rating-stats&amp;gdsr=comments&amp;postid=' . $row->pid . '"><img alt="' . __("Comments", "gd-star-rating") . '" src="' . STARRATING_URL . 'gfx/comments.png" border="0" /></a>';
 echo '<a title="' . __("Chart", "gd-star-rating") . '" href="' . $chart_url . '" class="clrboxed"><img alt="' . __("Chart", "gd-star-rating") . '" src="' . STARRATING_URL . 'gfx/chart.png" border="0" /></a><br />';
 echo '<a title="' . __("Edit", "gd-star-rating") . '" href="' . get_edit_post_link($row->pid) . '" target="_blank"><img alt="' . __("Edit", "gd-star-rating") . '" src="' . STARRATING_URL . 'gfx/edit.png" border="0" /></a>';
 echo '<a title="' . __("View", "gd-star-rating") . '" href="' . get_permalink($row->pid) . '" target="_blank"><img alt="' . __("View", "gd-star-rating") . '" src="' . STARRATING_URL . 'gfx/view.png" border="0" /></a>';
 echo '</td>';
 echo '<td><div class="gdsr-td-title">' . $row->title . '</div><div class="gdsr-td-condensed">';
 if ($row->post_type == "post") {
     echo '<span style="color: #c00">' . __("Post", "gd-star-rating") . '</span>: ' . gdsrAdmDB::get_categories($row->pid);
 } else {
     echo '<span style="color: #c00">' . __("Page", "gd-star-rating") . '</span>';
 }
 echo ' | <span style="color: #c00">' . __("Views", "gd-star-rating") . '</span>: ' . $row->views . '</div>';
 echo '</td>';
 echo '<td nowrap="nowrap" class="gdsr-td-condensed">';
 echo '<div class="gdsr-art-stars">';
 echo $row->rules_articles . '<br />' . $row->rules_comments;
 echo '</div>';
 echo '<div class="gdsr-art-split"></div>';
 echo '<div class="gdsr-art-thumbs">';
 echo $row->recc_rules_articles . '<br />' . $row->recc_rules_comments;
 echo '</div>';
 echo '</td>';
 if ($options["timer_active"] == 1) {
コード例 #7
0
        <td class="gdsrright">
            <input class="widefat widnumb" style="text-align: right;" size="8" type="text" name="publishDays" id="publishDays" value="0" />
        </td>
      </tr>
    </table>
    </div>
    <div id="gdsr-pd-month[tinymce]" style="display: none">
    <table border="0" cellpadding="2" cellspacing="0" width="100%">
      <tr>
        <td class="gdsrleft"><?php 
_e("Month", "gd-star-rating");
?>
:</td>
        <td class="gdsrright">
            <?php 
gdsrAdmDB::get_combo_months("0", "publishMonth");
?>
        </td>
      </tr>
    </table>
    </div>
    <div id="gdsr-pd-range[tinymce]" style="display: none">
    <table border="0" cellpadding="2" cellspacing="0" width="100%">
      <tr>
        <td class="gdsrleft"><?php 
_e("Range", "gd-star-rating");
?>
:</td>
        <td align="right" width="85"><input class="widefat" style="text-align: right; width: 85px" type="text" name="publishRangeFrom" id="publishRangeFrom" value="YYYYMMDD" /></td>
        <td align="center" width="10">-</td>
        <td align="right" width="85"><input class="widefat" style="text-align: right; width: 85px" type="text" name="publishRangeTo" id="publishRangeTo" value="YYYYMMDD" /></td>
コード例 #8
0
ファイル: part_filter.php プロジェクト: TheReaCompany/pooplog
echo $wpnm;
?>
]" style="display: <?php 
echo $wpno['publish_date'] == 'month' ? 'block' : 'none';
?>
">
<table border="0" cellpadding="2" cellspacing="0" width="100%">
  <tr>
    <td width="100"></td>
    <td width="150" nowrap="nowrap"><?php 
_e("Month", "gd-star-rating");
?>
:</td>
    <td align="right">
        <?php 
gdsrAdmDB::get_combo_months($wpno['publish_month'], $wpfn . "[publish_month]");
?>
    </td>
  </tr>
</table>
</div>
<div id="gdsr-pd-range[<?php 
echo $wpnm;
?>
]" style="display: <?php 
echo $wpno['publish_date'] == 'range' ? 'block' : 'none';
?>
">
<table border="0" cellpadding="2" cellspacing="0" width="100%">
  <tr>
    <td width="100"></td>
コード例 #9
0
_e("Record Id", "gd-star-rating");
?>
</th>
            <th scope="col"><?php 
_e("Type", "gd-star-rating");
?>
</th>
            <th scope="col"><?php 
_e("IP", "gd-star-rating");
?>
</th>
        </tr>
    </thead>
    <tbody>
<?php 
$rows = gdsrAdmDB::get_all_banned_ips(($page_id - 1) * $posts_per_page, $posts_per_page);
$tr_class = "";
foreach ($rows as $row) {
    echo '<tr id="post-' . $row->id . '" class="' . $tr_class . ' author-self status-publish" valign="top">';
    echo '<th scope="row" class="check-column"><input name="gdsr_item[]" value="' . $row->id . '" type="checkbox"></th>';
    echo '<td>' . $row->id . '</td>';
    echo '<td><strong>';
    switch ($row->mode) {
        case "S":
            echo "Single";
            break;
        case "M":
            echo "Masked";
            break;
        case "R":
            echo "Range";
コード例 #10
0
ファイル: part_filter.php プロジェクト: TheReaCompany/pooplog
echo $this->get_field_name('publish_date');
?>
-month" style="display: <?php 
echo $instance['publish_date'] == 'month' ? 'block' : 'none';
?>
">
<table border="0" cellpadding="2" cellspacing="0" width="100%">
  <tr>
    <td width="100"></td>
    <td width="150" nowrap="nowrap"><?php 
_e("Month", "gd-star-rating");
?>
:</td>
    <td align="right">
        <?php 
gdsrAdmDB::get_combo_months($instance['publish_month'], $this->get_field_name('publish_month'));
?>
    </td>
  </tr>
</table>
</div>
<div id="<?php 
echo $this->get_field_name('publish_date');
?>
-range" style="display: <?php 
echo $instance['publish_date'] == 'range' ? 'block' : 'none';
?>
">
<table border="0" cellpadding="2" cellspacing="0" width="100%">
  <tr>
    <td width="100"></td>
コード例 #11
0
            gdsrAdmDB::ban_ip_range($ip_start, $ip_end);
        }
    }
    if ($_POST["action"] == "maskip") {
        $ip_part_1 = $_POST["gdsr_ip_mask_1"];
        $ip_part_2 = $_POST["gdsr_ip_mask_2"];
        $ip_part_3 = $_POST["gdsr_ip_mask_3"];
        $ip_part_4 = $_POST["gdsr_ip_mask_4"];
        $ip = $ip_part_1 . "." . $ip_part_2 . "." . $ip_part_3 . "." . $ip_part_4;
        gdsrAdmDB::ban_ip($ip, 'M');
    }
    if ($_POST["action"] == "deletebans") {
        $gdsr_items = $_POST["gdsr_item"];
        if (count($gdsr_items) > 0) {
            $ids = "(" . join(", ", $gdsr_items) . ")";
            gdsrAdmDB::unban_ips($ids);
        }
    }
}
?>
<div class="gdsr">
<div class="wrap">
    <h2 class="gdptlogopage">GD Star Rating: <?php 
_e("IP's", "gd-star-rating");
?>
</h2>

<div id="gdsr_tabs" class="gdsrtabs">
<ul>
    <li><a href="#fragment-1"><span><?php 
_e("Ban New", "gd-star-rating");
コード例 #12
0
<div class="postbox gdrgrid frontright myboxes">
    <h3 class="hndle"><span><?php 
_e("Votes for my comments", "gd-star-rating");
?>
</span></h3>
    <div class="inside">
    <?php 
global $user_ID;
$data = gdsrAdmDB::filter_votes_by_type($user_ID, "'cmmthumb', 'comment'", false);
GDSRHelper::render_dash_widget_vote($data, "my-panel", "-my-comments");
?>
    </div>
</div>
コード例 #13
0
ファイル: users.php プロジェクト: TheReaCompany/pooplog
    $url = substr($url, 0, $url_pos);
}
$log_url = $url . "&gdsr=userslog";
$url .= "&amp;gdsr=users";
$page_id = 1;
if (isset($_GET["pg"])) {
    $page_id = $_GET["pg"];
}
$number_posts = gdsrAdmDB::get_valid_users_count();
$max_page = floor($number_posts / $posts_per_page);
if ($max_page * $posts_per_page != $number_posts) {
    $max_page++;
}
$pager = $max_page > 1 ? gdFunctionsGDSR::draw_pager($max_page, $page_id, $url, "pg") : "";
$users = array();
$pre_users = gdsrAdmDB::get_valid_users();
$count = -1;
$usrid = -1;
foreach ($pre_users as $user) {
    if ($user->user_id != $usrid) {
        $count++;
    }
    $users[$count]["id"] = $user->user_id;
    $users[$count][$user->vote_type]["votes"] = $user->votes;
    $users[$count][$user->vote_type]["voters"] = $user->voters;
    $users[$count][$user->vote_type]["ips"] = $user->ips;
    $users[$count]["name"] = $user->user_id == 0 ? __("Visitor", "gd-star-rating") : $user->display_name;
    $users[$count]["email"] = $user->user_id == 0 ? "/" : $user->user_email;
    $usrid = $user->user_id;
}
$usr_from = ($page_id - 1) * $posts_per_page;
コード例 #14
0
</strong></p></div> <?php 
}
if (isset($_POST["gdsr_remove_settings"]) && $_POST["gdsr_remove_settings"] == __("Remove Settings", "gd-star-rating")) {
    delete_option('gd-star-rating');
    delete_option('gd-star-rating-gfx');
    delete_option('gd-star-rating-inc');
    ?>
 <div id="message" class="updated fade" style="background-color: rgb(255, 251, 204);"><p><strong><?php 
    _e("Settings are removed from WordPress installation.", "gd-star-rating");
    ?>
</strong></p></div> <?php 
}
if (isset($_POST["gdsr_remove_templates"]) && $_POST["gdsr_remove_templates"] == __("Reinstall Templates", "gd-star-rating")) {
    gdDBInstallGDSR::drop_table("gdsr_templates");
    gdDBInstallGDSR::create_tables(STARRATING_PATH);
    gdsrAdmDB::install_all_templates();
    delete_option('gd-star-rating-templates');
    ?>
 <div id="message" class="updated fade" style="background-color: rgb(255, 251, 204);"><p><strong><?php 
    _e("Plugins default templates are reinstalled.", "gd-star-rating");
    ?>
</strong></p></div> <?php 
}
if (isset($_POST["gdsr_reset_imports"]) && $_POST["gdsr_reset_imports"] == __("Reset Imports", "gd-star-rating")) {
    delete_option('gd-star-rating-import');
    ?>
 <div id="message" class="updated fade" style="background-color: rgb(255, 251, 204);"><p><strong><?php 
    _e("Import Information is reseted.", "gd-star-rating");
    ?>
</strong></p></div> <?php 
}
コード例 #15
0
ファイル: articles.php プロジェクト: sangpena/appflex.mobi
 if ($row->rating_total > $options["stars"] || $row->rating_visitors > $options["stars"] || $row->rating_users > $options["stars"]) {
     $tr_class .= " invalidarticle";
 }
 $chart_url = STARRATING_CHART_URL . "post_charts.php?_ajax_nonce=" . wp_create_nonce('gdsr_chart_l8') . "&postid=" . $row->pid . "&amp;action=article";
 echo '<tr id="post-' . $row->pid . '" class="' . $tr_class . ' author-self status-publish" valign="top">';
 echo '<th scope="row" class="check-column"><input name="gdsr_item[]" value="' . $row->pid . '" type="checkbox"/></th>';
 echo '<td nowrap="nowrap">' . $row->pid . '</td>';
 echo '<td class="gdrinner">';
 echo '<a title="' . __("Comments", "gd-star-rating") . '" href="./admin.php?page=gd-star-rating-stats&amp;gdsr=comments&amp;postid=' . $row->pid . '"><img alt="' . __("Comments", "gd-star-rating") . '" src="' . STARRATING_URL . 'gfx/comments.png" border="0" /></a>';
 echo '<a title="' . __("Chart", "gd-star-rating") . '" href="' . $chart_url . '" class="clrboxed"><img alt="' . __("Chart", "gd-star-rating") . '" src="' . STARRATING_URL . 'gfx/chart.png" border="0" /></a><br />';
 echo '<a title="' . __("Edit", "gd-star-rating") . '" href="' . get_edit_post_link($row->pid) . '" target="_blank"><img alt="' . __("Edit", "gd-star-rating") . '" src="' . STARRATING_URL . 'gfx/edit.png" border="0" /></a>';
 echo '<a title="' . __("View", "gd-star-rating") . '" href="' . get_permalink($row->pid) . '" target="_blank"><img alt="' . __("View", "gd-star-rating") . '" src="' . STARRATING_URL . 'gfx/view.png" border="0" /></a>';
 echo '</td>';
 echo '<td><div class="gdsr-td-title">' . $row->title . '</div><div class="gdsr-td-condensed">';
 echo '<span style="color: #c00">' . $post_types[$row->post_type] . '</span>';
 $catss = gdsrAdmDB::get_categories($row->pid);
 if ($catss != "/") {
     echo ": " . $catss;
 }
 echo ' | <span style="color: #c00">' . __("Views", "gd-star-rating") . '</span>: ' . $row->views . '</div>';
 echo '</td>';
 echo '<td nowrap="nowrap" class="gdsr-td-condensed">';
 echo '<div class="gdsr-art-stars">';
 echo $row->rules_articles . '<br />' . $row->rules_comments;
 echo '</div>';
 echo '<div class="gdsr-art-split"></div>';
 echo '<div class="gdsr-art-thumbs">';
 echo $row->recc_rules_articles . '<br />' . $row->recc_rules_comments;
 echo '</div>';
 echo '</td>';
 if ($options["timer_active"] == 1) {
コード例 #16
0
?>
        </tr>
    </thead>
    <tbody>
<?php 
$tr_class = "";
foreach ($rows as $row) {
    $total_votes = $row->total_votes_users + $row->total_votes_visitors;
    $total_rating = $total_votes == 0 ? 0 : number_format(($row->total_votes_users * $row->average_rating_users + $row->total_votes_visitors * $row->average_rating_visitors) / $total_votes, 1);
    echo '<tr id="post-' . $row->pid . '" class="' . $tr_class . ' author-self status-publish" valign="top">';
    echo '<th scope="row" class="check-column"><input name="gdsr_item[]" value="' . $row->pid . '" type="checkbox"></th>';
    echo '<td><strong>' . sprintf('<a href="./post.php?action=edit&amp;post=%s">%s</a>', $row->pid, $row->post_title) . '</strong></td>';
    echo '<td nowrap="nowrap" style="text-align: center;">';
    echo '<a href="' . get_permalink($row->pid) . '" target="_blank"><img src="' . STARRATING_URL . 'gfx/view.png" border="0" /></a>&nbsp;';
    echo '</td>';
    echo '<td>' . gdsrAdmDB::get_categories($row->pid) . '</td>';
    echo '<td>';
    if ($row->total_votes_visitors == 0) {
        echo sprintf("[ 0 ] %s: /<br />", __("visitors", "gd-star-rating"));
    } else {
        echo sprintf('[ <a href="./admin.php?page=gd-star-rating-multi-sets&amp;gdsr=murset&amp;sid=%s&amp;pid=%s&amp;filter=visitor"><strong style="color: red;">%s</strong></a> ] %s: <strong style="color: red;">%s</strong><br />', $set_id, $row->pid, $row->total_votes_visitors, __("visitors", "gd-star-rating"), $row->average_rating_visitors);
    }
    if ($row->total_votes_users == 0) {
        echo sprintf("[ 0 ] %s: /<br />", __("users", "gd-star-rating"));
    } else {
        echo sprintf('[ <a href="./admin.php?page=gd-star-rating-multi-sets&amp;gdsr=murset&amp;sid=%s&amp;pid=%s&amp;filter=user"><strong style="color: red;">%s</strong></a> ] %s: <strong style="color: red;">%s</strong>', $set_id, $row->pid, $row->total_votes_users, __("users", "gd-star-rating"), $row->average_rating_users);
    }
    echo '</td>';
    echo '<td>';
    if ($total_votes == 0) {
        echo sprintf("[ 0 ] %s: /", __("rating", "gd-star-rating"));
コード例 #17
0
ファイル: menus.php プロジェクト: TheReaCompany/pooplog
 function star_menu_settings()
 {
     if (isset($_POST['gdsr_preview_scan'])) {
         $this->g->g = gdsrAdmFunc::gfx_scan();
         update_option('gd-star-rating-gfx', $this->g->g);
     }
     $recalculate_articles = $recalculate_comment = $recalculate_reviews = $recalculate_cmm_reviews = false;
     $gdsr_options = $this->g->o;
     $gdsr_bots = $this->g->bots;
     $gdsr_root_url = $this->g->plugin_url;
     $gdsr_gfx = $this->g->g;
     $gdsr_wpr8 = $this->g->wpr8_available;
     $extra_folders = $this->g->extra_folders;
     $safe_mode = $this->g->safe_mode;
     $wpv = $this->g->wp_version;
     $ginc_sizes = $this->g->ginc[0];
     $ginc_stars = $this->g->ginc[1];
     $wpr8 = $this->g->wpr8;
     include STARRATING_PATH . 'options/settings.php';
     if ($recalculate_articles) {
         gdsrAdmDB::recalculate_articles($gdsr_oldstars, $gdsr_newstars);
     }
     if ($recalculate_comment) {
         gdsrAdmDB::recalculate_comments($gdsr_cmm_oldstars, $gdsr_cmm_newstars);
     }
     if ($recalculate_reviews) {
         gdsrAdmDB::recalculate_reviews($gdsr_review_oldstars, $gdsr_review_newstars);
     }
     if ($recalculate_cmm_reviews) {
         gdsrAdmDB::recalculate_comments_reviews($gdsr_cmm_review_oldstars, $gdsr_cmm_review_newstars);
     }
 }
コード例 #18
0
</th>
            <th scope="col" width="120"><?php 
    _e("Total", "gd-star-rating");
    ?>
</th>
            <th scope="col"><?php 
    _e("Review", "gd-star-rating");
    ?>
</th>
        </tr>
    </thead>
    <tbody>
<?php 
    $tr_class = "";
    foreach ($rows as $row) {
        $row = gdsrAdmDB::convert_comment_row($row);
        if ($row->rating_total > $options["cmm_stars"] || $row->rating_visitors > $options["cmm_stars"] || $row->rating_users > $options["cmm_stars"]) {
            $tr_class .= " invalidarticle";
        }
        echo '<tr id="post-' . $row->comment_id . '" class="' . $tr_class . ' author-self status-publish" valign="top">';
        echo '<th scope="row" class="check-column"><input name="gdsr_item[]" value="' . $row->comment_id . '" type="checkbox"/></th>';
        echo '<td>' . $row->comment_content . '</td>';
        echo '<td><strong>' . $row->comment_author . '</strong></td>';
        echo '<td>' . $row->comment_date . '</td>';
        echo '<td>' . $row->thumbs . '</td>';
        echo '<td>' . $row->votes . '</td>';
        echo '<td>' . $row->total . '</td>';
        echo '<td>' . $row->review . '</td>';
        echo '</tr>';
        if ($tr_class == "") {
            $tr_class = "alternate ";
コード例 #19
0
ファイル: users_log.php プロジェクト: TheReaCompany/pooplog
    _e("Comment Author", "gd-star-rating");
    ?>
</th>
            <th scope="col"><?php 
    _e("Comment Excerpt", "gd-star-rating");
    ?>
</th>
            <?php 
}
?>
        </tr>
    </thead>
    <tbody>

<?php 
$log = gdsrAdmDB::get_user_log($user_id, $vote_type, $filter_vote, ($page_id - 1) * $posts_per_page, $posts_per_page);
$ips = array();
$idx = array();
foreach ($log as $l) {
    if (!in_array($l->ip, $ips)) {
        $ips[] = $l->ip;
        $idx[] = 1;
    } else {
        $idx[count($idx) - 1]++;
    }
}
$counter = 0;
$tr_class = "";
for ($i = 0; $i < count($idx); $i++) {
    for ($j = 0; $j < $idx[$i]; $j++) {
        echo '<tr id="post-' . $log[$counter]->record_id . '" class="' . $tr_class . ' author-self status-publish" valign="top">';
コード例 #20
0
ファイル: db.php プロジェクト: TheReaCompany/pooplog
 function moderation_approve($ids, $ids_array)
 {
     global $wpdb, $table_prefix;
     $sql = sprintf("select * from %s where record_id in %s", $table_prefix . "gdsr_moderate", $ids);
     $rows = $wpdb->get_results($sql);
     foreach ($rows as $row) {
         if ($row->vote_type == "article") {
             gdsrBlgDB::add_vote($row->id, $row->user_id, $row->ip, $row->user_agent, $row->vote);
         }
         if ($row->vote_type == "comment") {
             gdsrBlgDB::add_vote_comment($row->id, $row->user_id, $row->ip, $row->user_agent, $row->vote);
         }
     }
     gdsrAdmDB::moderation_delete($ids);
 }
コード例 #21
0
ファイル: categories.php プロジェクト: TheReaCompany/pooplog
_e("Comment Integration", "gd-star-rating");
?>
</th>
            <th scope="col" style="text-align: right"><?php 
_e("Posts", "gd-star-rating");
?>
</th>
        </tr>
    </thead>
    <tbody>

<?php 
$tr_class = "";
for ($i = $cat_from; $i < $cat_to; $i++) {
    $row = $categories[$i];
    $row = gdsrAdmDB::convert_category_row($row);
    if ($options["timer_active"] == 1) {
        if ($row->expiry_type == "D") {
            $timer_info = '<strong><span style="color: red">' . __("date limit", "gd-star-rating") . '</span></strong><br />';
            $timer_info .= $row->expiry_value;
        } else {
            if ($row->expiry_type == "T") {
                $timer_info = '<strong><span style="color: red">' . __("countdown", "gd-star-rating") . '</span></strong><br />';
                $timer_info .= substr($row->expiry_value, 1) . " ";
                switch (substr($row->expiry_value, 0, 1)) {
                    case "H":
                        $timer_info .= __("Hours", "gd-star-rating");
                        break;
                    case "D":
                        $timer_info .= __("Days", "gd-star-rating");
                        break;
コード例 #22
0
<?php

global $user_ID;
$overview = gdsrAdmDB::get_user_votes_overview($user_ID);
$over_posts = $over_comms = array();
if (isset($overview["article"])) {
    $over_posts[] = "Standard: <strong>" . $overview["article"] . "</strong>";
}
if (isset($overview["artthumb"])) {
    $over_posts[] = "Thumbs: <strong>" . $overview["artthumb"] . "</strong>";
}
if (isset($overview["multis"])) {
    $over_posts[] = "Multis: <strong>" . $overview["multis"] . "</strong>";
}
if (isset($overview["comment"])) {
    $over_comms[] = "Standard: <strong>" . $overview["comment"] . "</strong>";
}
if (isset($overview["cmmthumb"])) {
    $over_comms[] = "Thumbs: <strong>" . $overview["cmmthumb"] . "</strong>";
}
$over_posts = count($over_posts) > 0 ? join(", ", $over_posts) : "/";
$over_comms = count($over_comms) > 0 ? join(", ", $over_comms) : "/";
?>
<div class="postbox gdrgrid frontright">
    <h3 class="hndle"><span><?php 
_e("General Statistics", "gd-star-rating");
?>
</span></h3>
    <div class="inside">
        <div class="my-general">
            <p class="sub"><?php