Version Description
- Added option to Rating settings to allow ratings on the front page.
- Added more phrases to the pot file.
- Added stylesheet for blos that have a right to left language.
- Bug Fix: Fixed javascript bug, clash with prototype in P2 theme, use of $ function.
Download this release
Release Info
Developer | eoigal |
Plugin | Crowdsignal Dashboard – Polls, Surveys & more |
Version | 1.8.0 |
Comparing to | |
See all releases |
Code changes from version 1.7.9 to 1.8.0
- common.js +1 -1
- polldaddy-org.php +32 -10
- polldaddy-rtl.css +16 -0
- polldaddy-xml.php +743 -743
- polldaddy.js +1 -1
- polldaddy.php +3997 -4053
- polldaddy.pot +302 -255
- rating.php +23 -6
- readme.txt +8 -2
common.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function $(id){return document.getElementById(id)} function pd_style(){this.name = '';this.n_id = 0;this.n_desc = '';this.m_id = 0;this.m_desc = '';this.w_id = 0;this.w_desc = '';this.tag = ''} function preload_pd_style(){if ($('preload_value').value != '0'){url = window.location.href;fnd = '';qs = window.location.search.substring(1);qv = qs.split("&");for (i = 0;i < qv.length;i++){ft = qv[i].split("=");if (ft[0] == 'preload'){fnd = '&preload=' + ft[1];url = url.replace(fnd,'')}}window.location = url + "&preload=" + $('preload_value').value}} function pd_bind(obj){if (obj.id == 'font_bold'){if (obj.checked){PDRTJS_1.font_bold = 'bold';}else{PDRTJS_1.font_bold = 'normal';}}else if (obj.id == 'font_italic'){if (obj.checked){PDRTJS_1.font_italic = 'italic';}else{PDRTJS_1.font_italic = 'normal';}}else if (obj.id == 'nero_style'){PDRTJS_1.star_color = obj.value;}else{eval('PDRTJS_1.' + obj.id + ' = "' + obj.value.replace('"','"') + '";');}PDRTJS_1.build();}function pd_change_type(type){var dd_label = $('editor_star_color_text');var size_label = $('editor_star_size_text');var obj_star = $('star_color');var obj_nero = $('nero_style');if (type == 1){PDRTJS_1.type = 'nero';PDRTJS_1.build();dd_label.innerHTML = adminRatingsL10n.nero_type;size_label.innerHTML = adminRatingsL10n.nero_size;obj_star.style.display = 'none';obj_nero.style.display = 'block';pd_bind(obj_nero);}else{PDRTJS_1.type = 'stars';PDRTJS_1.build();dd_label.innerHTML = adminRatingsL10n.star_colors;size_label.innerHTML = adminRatingsL10n.star_size;obj_star.style.display = 'block';obj_nero.style.display = 'none';pd_bind(obj_star);}} function show_options(id){if ($('pd_show_' + id).checked == true){$('span_' + id).style.display = 'inline-block';}else{$('span_' + id).style.display = 'none';}} function show_settings(){var div = $('poststuff');if (div.style.display == 'block'){div.style.display = 'none';}else{div.style.display = 'block';}}
|
1 |
+
function _$(id){return document.getElementById(id)} function pd_style(){this.name = '';this.n_id = 0;this.n_desc = '';this.m_id = 0;this.m_desc = '';this.w_id = 0;this.w_desc = '';this.tag = ''} function preload_pd_style(){if (_$('preload_value').value != '0'){url = window.location.href;fnd = '';qs = window.location.search.substring(1);qv = qs.split("&");for (i = 0;i < qv.length;i++){ft = qv[i].split("=");if (ft[0] == 'preload'){fnd = '&preload=' + ft[1];url = url.replace(fnd,'')}}window.location = url + "&preload=" + _$('preload_value').value}} function pd_bind(obj){if (obj.id == 'font_bold'){if (obj.checked){PDRTJS_1.font_bold = 'bold';}else{PDRTJS_1.font_bold = 'normal';}}else if (obj.id == 'font_italic'){if (obj.checked){PDRTJS_1.font_italic = 'italic';}else{PDRTJS_1.font_italic = 'normal';}}else if (obj.id == 'nero_style'){PDRTJS_1.star_color = obj.value;}else{eval('PDRTJS_1.' + obj.id + ' = "' + obj.value.replace('"','"') + '";');}PDRTJS_1.build();}function pd_change_type(type){var dd_label = _$('editor_star_color_text');var size_label = _$('editor_star_size_text');var obj_star = _$('star_color');var obj_nero = _$('nero_style');if (type == 1){PDRTJS_1.type = 'nero';PDRTJS_1.build();dd_label.innerHTML = adminRatingsL10n.nero_type;size_label.innerHTML = adminRatingsL10n.nero_size;obj_star.style.display = 'none';obj_nero.style.display = 'block';pd_bind(obj_nero);}else{PDRTJS_1.type = 'stars';PDRTJS_1.build();dd_label.innerHTML = adminRatingsL10n.star_colors;size_label.innerHTML = adminRatingsL10n.star_size;obj_star.style.display = 'block';obj_nero.style.display = 'none';pd_bind(obj_star);}} function show_options(id){if (_$('pd_show_' + id).checked == true){_$('span_' + id).style.display = 'inline-block';}else{_$('span_' + id).style.display = 'none';}} function show_settings(){var div = _$('poststuff');if (div.style.display == 'block'){div.style.display = 'none';}else{div.style.display = 'block';}}
|
polldaddy-org.php
CHANGED
@@ -10,29 +10,51 @@ class WPORG_PollDaddy extends WP_PollDaddy {
|
|
10 |
}
|
11 |
|
12 |
function __construct() {
|
13 |
-
parent::__construct();
|
|
|
14 |
$this->base_url = plugins_url() . '/' . dirname( plugin_basename( __FILE__ ) ) . '/';
|
15 |
$this->polldaddy_client_class = 'WPORG_PollDaddy_Client';
|
16 |
$this->use_ssl = (int) get_option( 'polldaddy_use_ssl' );
|
17 |
$this->multiple_accounts = (bool) get_option( 'polldaddy_multiple_accounts' );
|
18 |
$this->is_author = ( ( (bool) current_user_can('edit_others_posts')) or ( $this->multiple_accounts ) );
|
19 |
return;
|
20 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
|
22 |
function management_page_load() {
|
23 |
-
$polldaddy = $this->get_client( WP_POLLDADDY__PARTNERGUID );
|
24 |
-
$polldaddy->reset();
|
25 |
-
|
26 |
-
if ( empty( $this->user_code ) ){
|
27 |
-
$this->user_code = $polldaddy->get_usercode( $this->id );
|
28 |
-
}
|
29 |
-
|
30 |
require_once WP_POLLDADDY__POLLDADDY_CLIENT_PATH;
|
31 |
|
32 |
$is_POST = 'post' == strtolower( $_SERVER['REQUEST_METHOD'] );
|
33 |
wp_reset_vars( array( 'action', 'page' ) );
|
34 |
global $action, $page;
|
35 |
|
|
|
|
|
36 |
if( $page == 'polls' ) {
|
37 |
switch ( $action ) :
|
38 |
case 'update-options' :
|
@@ -233,7 +255,7 @@ class WPORG_PollDaddy extends WP_PollDaddy {
|
|
233 |
}
|
234 |
|
235 |
function plugin_options_add(){
|
236 |
-
if(
|
237 |
$checked = '';
|
238 |
if ( $this->multiple_accounts )
|
239 |
$checked = 'checked="checked"';
|
10 |
}
|
11 |
|
12 |
function __construct() {
|
13 |
+
parent::__construct();
|
14 |
+
$this->version = '1.8.1';
|
15 |
$this->base_url = plugins_url() . '/' . dirname( plugin_basename( __FILE__ ) ) . '/';
|
16 |
$this->polldaddy_client_class = 'WPORG_PollDaddy_Client';
|
17 |
$this->use_ssl = (int) get_option( 'polldaddy_use_ssl' );
|
18 |
$this->multiple_accounts = (bool) get_option( 'polldaddy_multiple_accounts' );
|
19 |
$this->is_author = ( ( (bool) current_user_can('edit_others_posts')) or ( $this->multiple_accounts ) );
|
20 |
return;
|
21 |
+
}
|
22 |
+
|
23 |
+
function set_api_user_code(){
|
24 |
+
if ( empty( $this->rating_user_code ) ){
|
25 |
+
$this->rating_user_code = get_option( 'pd-rating-usercode' );
|
26 |
+
|
27 |
+
if ( empty( $this->rating_user_code ) ){
|
28 |
+
$polldaddy = $this->get_client( WP_POLLDADDY__PARTNERGUID );
|
29 |
+
$polldaddy->reset();
|
30 |
+
|
31 |
+
if( $this->multiple_accounts ){
|
32 |
+
//need to retrieve initial admin user code to use as ratings user code
|
33 |
+
$polldaddy_multiple_accounts = 0;
|
34 |
+
$partner = array( 'role' => $polldaddy_multiple_accounts );
|
35 |
+
$polldaddy->update_partner_account( $partner );
|
36 |
+
update_option( 'polldaddy_multiple_accounts', $polldaddy_multiple_accounts );
|
37 |
+
}
|
38 |
+
|
39 |
+
$this->rating_user_code = $polldaddy->get_usercode( $this->id );
|
40 |
+
|
41 |
+
if ( !empty( $this->rating_user_code ) ){
|
42 |
+
update_option( 'pd-rating-usercode', $this->rating_user_code );
|
43 |
+
}
|
44 |
+
}
|
45 |
+
}
|
46 |
+
parent::set_api_user_code();
|
47 |
+
}
|
48 |
|
49 |
function management_page_load() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
require_once WP_POLLDADDY__POLLDADDY_CLIENT_PATH;
|
51 |
|
52 |
$is_POST = 'post' == strtolower( $_SERVER['REQUEST_METHOD'] );
|
53 |
wp_reset_vars( array( 'action', 'page' ) );
|
54 |
global $action, $page;
|
55 |
|
56 |
+
$this->set_api_user_code();
|
57 |
+
|
58 |
if( $page == 'polls' ) {
|
59 |
switch ( $action ) :
|
60 |
case 'update-options' :
|
255 |
}
|
256 |
|
257 |
function plugin_options_add(){
|
258 |
+
if( $this->is_admin ) {
|
259 |
$checked = '';
|
260 |
if ( $this->multiple_accounts )
|
261 |
$checked = 'checked="checked"';
|
polldaddy-rtl.css
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
body.poll-preview-iframe div#manage-polls.wrap{text-align:right;}
|
2 |
+
table.poll-results .column-vote{padding:3px 3px 3px 5px;}
|
3 |
+
table.poll-results span.result-total{right:.75em;left:auto;}
|
4 |
+
table.poll-results span.result-percent{right:auto;left:.75em;}
|
5 |
+
ul#answers li span.handle{right:0;left:auto;}
|
6 |
+
ul#answers li a.delete{left:0;right:auto;}
|
7 |
+
ul#answer-options{margin-right:20px;margin-left:0;}
|
8 |
+
ul#answer-options li{margin-left:1em;margin-right:0;}
|
9 |
+
p#add-answer-holder{text-align:left;}
|
10 |
+
.inner-sidebar-ratings{clear:left;float:left;}
|
11 |
+
#poststuff #post-body.has-sidebar,.has-sidebar{clear:right;float:right;margin-left:-240px;margin-right:0;}
|
12 |
+
.has-sidebar .has-sidebar-content{margin-left:245px;margin-right:0;}
|
13 |
+
tr.polldaddy-shortcode-row pre{float:right;}
|
14 |
+
.st_selector .dir_left{padding:0 0 0 10px;}
|
15 |
+
.polldaddy-show-design-options,.pollStyle .customSelect,body.poll-preview-iframe div#manage-polls.wrap,#design h3,.pollStyle TH{text-align:right;}
|
16 |
+
#design_standard,.st_selector .dir_right{padding:0 20px 0 0;}
|
polldaddy-xml.php
CHANGED
@@ -1,743 +1,743 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Ghetto_XML_Object {
|
4 |
-
function Ghetto_XML_Object( $args = null, $attributes = null ) {
|
5 |
-
if ( get_object_vars( $this ) )
|
6 |
-
$this->___restrict = true;
|
7 |
-
else
|
8 |
-
$this->___restrict = false;
|
9 |
-
|
10 |
-
if ( !is_null( $args ) )
|
11 |
-
$this->set_args( $args );
|
12 |
-
if ( !is_array( $attributes ) )
|
13 |
-
return false;
|
14 |
-
|
15 |
-
$atts = array();
|
16 |
-
foreach ( $attributes as $key => $value )
|
17 |
-
$atts["_$key"] = $value;
|
18 |
-
|
19 |
-
$this->set_args( $atts );
|
20 |
-
}
|
21 |
-
|
22 |
-
function xml( $prepend_ns = true, $pad = 0 ) {
|
23 |
-
$x = '';
|
24 |
-
$atts = get_object_vars( $this );
|
25 |
-
|
26 |
-
$ns = $atts['___ns'];
|
27 |
-
if ( $prepend_ns )
|
28 |
-
$name = "$ns:{$atts['___name']}";
|
29 |
-
else
|
30 |
-
$name = $atts['___name'];
|
31 |
-
|
32 |
-
$_prepend_ns = $prepend_ns;
|
33 |
-
|
34 |
-
$prepend_ns = 'all' === $prepend_ns;
|
35 |
-
|
36 |
-
// added this to remove the Warning ( PHP Notice: Undefined index ) in following condition
|
37 |
-
if ( !isset( $atts['___cdata'] ) )
|
38 |
-
$atts['___cdata'] = '';
|
39 |
-
|
40 |
-
if ( !$cdata = $atts['___cdata'] )
|
41 |
-
$cdata = array();
|
42 |
-
|
43 |
-
$x = "<$name";
|
44 |
-
|
45 |
-
if ( isset( $atts['___content'] ) ) {
|
46 |
-
$inner = in_array( '___content', $cdata ) ? '<![CDATA[' . $atts['___content'] . ']]>' : $atts['___content'];
|
47 |
-
$empty = false;
|
48 |
-
} else {
|
49 |
-
$inner = "\n";
|
50 |
-
$empty = true;
|
51 |
-
}
|
52 |
-
|
53 |
-
unset($atts['___ns'], $atts['___name'], $atts['___content'], $atts['___ns_full'], $atts['___restrict'], $atts['___cdata']);
|
54 |
-
|
55 |
-
$_pad = str_repeat( "\t", $pad + 1 );
|
56 |
-
|
57 |
-
foreach ( $atts as $key => $value ) {
|
58 |
-
if ( is_null( $value ) )
|
59 |
-
continue;
|
60 |
-
if ( '_' == $key[0] ) {
|
61 |
-
$key = substr( $key, 1 );
|
62 |
-
$x .= " $key='$value'";
|
63 |
-
continue;
|
64 |
-
}
|
65 |
-
|
66 |
-
$_key = $key;
|
67 |
-
if ( $prepend_ns )
|
68 |
-
$key = "$ns:$key";
|
69 |
-
|
70 |
-
$empty = false;
|
71 |
-
if ( false === $value ) {
|
72 |
-
$inner .= "$_pad<$key />\n";
|
73 |
-
}
|
74 |
-
elseif ( is_array( $value ) ) {
|
75 |
-
foreach ( $value as $array_value ) {
|
76 |
-
if ( is_a( $array_value, 'Ghetto_XML_Object' ) )
|
77 |
-
$inner .= $_pad . $array_value->xml( $_prepend_ns, $pad + 1 ) . "\n";
|
78 |
-
else
|
79 |
-
$inner .= in_array( $_key, $cdata ) ? "$_pad<$key>" . '<![CDATA[' . $array_value . ']]>' . "</$key>\n" : "$_pad<$key>$array_value</$key>\n";
|
80 |
-
}
|
81 |
-
}
|
82 |
-
else {
|
83 |
-
if ( is_a( $value, 'Ghetto_XML_Object' ) )
|
84 |
-
$inner .= $_pad . $value->xml( $_prepend_ns, $pad + 1 ) . "\n";
|
85 |
-
else{
|
86 |
-
$inner .= in_array( $_key, $cdata ) ? "$_pad<$key>" . '<![CDATA[' . $value . ']]>' . "</$key>\n" : "$_pad<$key>$value</$key>\n";
|
87 |
-
}
|
88 |
-
}
|
89 |
-
}
|
90 |
-
if ( $empty )
|
91 |
-
return $x . ' />';
|
92 |
-
if ( "\n" == substr( $inner, -1 ) )
|
93 |
-
$inner .= str_repeat( "\t", $pad );
|
94 |
-
|
95 |
-
return $x . ">$inner</$name>";
|
96 |
-
}
|
97 |
-
|
98 |
-
function set_args( $array ) {
|
99 |
-
if ( is_scalar( $array ) ) {
|
100 |
-
$this->___content = $array;
|
101 |
-
return;
|
102 |
-
}
|
103 |
-
|
104 |
-
$atts = get_object_vars( $this );
|
105 |
-
foreach ( $array as $key => $value ) {
|
106 |
-
if ( 0 === strpos( $key, $this->___ns_full ) )
|
107 |
-
$key = substr( $key, strlen( $this->___ns_full ) + 1 );
|
108 |
-
if ( is_null( $value ) || ( $this->___restrict && !array_key_exists( $key, $atts ) ) )
|
109 |
-
continue;
|
110 |
-
|
111 |
-
$this->$key = $value;
|
112 |
-
}
|
113 |
-
}
|
114 |
-
}
|
115 |
-
|
116 |
-
class PollDaddy_XML_Object extends Ghetto_XML_Object {
|
117 |
-
var $___ns = 'pd';
|
118 |
-
var $___ns_full = 'http://api.polldaddy.com/pdapi.xsd';
|
119 |
-
}
|
120 |
-
|
121 |
-
class PollDaddy_XML_Root extends PollDaddy_XML_Object {
|
122 |
-
function xml( $prepend_ns = true, $pad = 0 ) {
|
123 |
-
$xml = parent::xml( $prepend_ns, $pad );
|
124 |
-
if ( !$pad ) {
|
125 |
-
$pos = strpos( $xml, '>' );
|
126 |
-
$xml = substr_replace( $xml, " xmlns:$this->___ns='$this->___ns_full'", $pos, 0 );
|
127 |
-
}
|
128 |
-
return $xml;
|
129 |
-
}
|
130 |
-
}
|
131 |
-
|
132 |
-
class PollDaddy_Access extends PollDaddy_XML_Root {
|
133 |
-
var $___name = 'pdAccess';
|
134 |
-
|
135 |
-
var $_partnerGUID;
|
136 |
-
var $_partnerUserID;
|
137 |
-
|
138 |
-
var $demands;
|
139 |
-
}
|
140 |
-
|
141 |
-
class PollDaddy_Initiate extends PollDaddy_XML_Root {
|
142 |
-
var $___cdata = array( 'Email', 'Password' );
|
143 |
-
var $___name = 'pdInitiate';
|
144 |
-
|
145 |
-
var $_partnerGUID;
|
146 |
-
var $_partnerUserID;
|
147 |
-
|
148 |
-
var $Email;
|
149 |
-
var $Password;
|
150 |
-
}
|
151 |
-
|
152 |
-
class PollDaddy_Request extends PollDaddy_XML_Root {
|
153 |
-
var $___name = 'pdRequest';
|
154 |
-
|
155 |
-
var $_partnerGUID;
|
156 |
-
var $_version;
|
157 |
-
var $_admin;
|
158 |
-
|
159 |
-
var $userCode;
|
160 |
-
var $demands;
|
161 |
-
}
|
162 |
-
|
163 |
-
class PollDaddy_Response extends PollDaddy_XML_Root {
|
164 |
-
var $___name = 'pdResponse';
|
165 |
-
|
166 |
-
var $_partnerGUID;
|
167 |
-
var $_partnerUserID;
|
168 |
-
|
169 |
-
var $userCode;
|
170 |
-
var $demands;
|
171 |
-
var $errors;
|
172 |
-
var $queries;
|
173 |
-
}
|
174 |
-
|
175 |
-
class PollDaddy_Errors extends PollDaddy_XML_Object {
|
176 |
-
var $___name = 'errors';
|
177 |
-
|
178 |
-
var $error;
|
179 |
-
}
|
180 |
-
|
181 |
-
class PollDaddy_Error extends PollDaddy_XML_Object {
|
182 |
-
var $___cdata = array( '___content' );
|
183 |
-
var $___name = 'error';
|
184 |
-
|
185 |
-
var $___content;
|
186 |
-
|
187 |
-
var $_id;
|
188 |
-
}
|
189 |
-
|
190 |
-
class PollDaddy_Queries extends PollDaddy_XML_Object {
|
191 |
-
var $___name = 'queries';
|
192 |
-
|
193 |
-
var $query;
|
194 |
-
}
|
195 |
-
|
196 |
-
class PollDaddy_Query extends PollDaddy_XML_Object {
|
197 |
-
var $___cdata = array( 'text' );
|
198 |
-
var $___name = 'query';
|
199 |
-
|
200 |
-
var $_id;
|
201 |
-
|
202 |
-
var $time;
|
203 |
-
var $text;
|
204 |
-
var $caller;
|
205 |
-
}
|
206 |
-
|
207 |
-
class PollDaddy_Demands extends PollDaddy_XML_Object {
|
208 |
-
var $___name = 'demands';
|
209 |
-
|
210 |
-
var $demand;
|
211 |
-
}
|
212 |
-
|
213 |
-
class PollDaddy_Demand extends PollDaddy_XML_Object {
|
214 |
-
var $___name = 'demand';
|
215 |
-
|
216 |
-
var $_id;
|
217 |
-
|
218 |
-
var $account;
|
219 |
-
var $poll;
|
220 |
-
var $polls;
|
221 |
-
var $emailAddress;
|
222 |
-
var $message;
|
223 |
-
var $list;
|
224 |
-
var $search;
|
225 |
-
var $result;
|
226 |
-
var $comments; //need to add an request object for each new type
|
227 |
-
var $comment;
|
228 |
-
var $extensions;
|
229 |
-
var $folders;
|
230 |
-
var $styles;
|
231 |
-
var $style;
|
232 |
-
var $packs;
|
233 |
-
var $pack;
|
234 |
-
var $languages;
|
235 |
-
var $activity;
|
236 |
-
var $rating_result;
|
237 |
-
var $rating;
|
238 |
-
var $nonce;
|
239 |
-
var $partner;
|
240 |
-
}
|
241 |
-
|
242 |
-
class PollDaddy_Partner extends PollDaddy_XML_Object {
|
243 |
-
var $___cdata = array( 'name' );
|
244 |
-
var $___name = 'partner';
|
245 |
-
|
246 |
-
var $_role;
|
247 |
-
var $_users;
|
248 |
-
|
249 |
-
var $name;
|
250 |
-
}
|
251 |
-
|
252 |
-
class PollDaddy_Account extends PollDaddy_XML_Object {
|
253 |
-
var $___cdata = array( 'userName', 'email', 'password', 'firstName', 'lastName', 'websiteURL', 'avatarURL', 'bio' );
|
254 |
-
var $___name = 'account';
|
255 |
-
|
256 |
-
var $userName;
|
257 |
-
var $email;
|
258 |
-
var $password;
|
259 |
-
var $firstName;
|
260 |
-
var $lastName;
|
261 |
-
var $countryCode;
|
262 |
-
var $gender;
|
263 |
-
var $yearOfBirth;
|
264 |
-
var $websiteURL;
|
265 |
-
var $avatarURL;
|
266 |
-
var $bio;
|
267 |
-
}
|
268 |
-
|
269 |
-
class PollDaddy_List extends PollDaddy_XML_Object {
|
270 |
-
var $___name = 'list';
|
271 |
-
|
272 |
-
var $_start;
|
273 |
-
var $_end;
|
274 |
-
var $_id;
|
275 |
-
|
276 |
-
var $period;
|
277 |
-
}
|
278 |
-
|
279 |
-
class PollDaddy_Polls extends PollDaddy_XML_Object {
|
280 |
-
var $___name = 'polls';
|
281 |
-
|
282 |
-
var $_total;
|
283 |
-
|
284 |
-
var $poll;
|
285 |
-
}
|
286 |
-
|
287 |
-
class PollDaddy_Search extends PollDaddy_XML_Object {
|
288 |
-
var $___cdata = array( '___content' );
|
289 |
-
var $___name = 'search';
|
290 |
-
|
291 |
-
var $___content;
|
292 |
-
|
293 |
-
var $poll;
|
294 |
-
}
|
295 |
-
|
296 |
-
class PollDaddy_Poll extends PollDaddy_XML_Object {
|
297 |
-
var $___cdata = array( '___content', 'question', 'mediaCode', 'url' );
|
298 |
-
var $___name = 'poll';
|
299 |
-
|
300 |
-
var $___content;
|
301 |
-
|
302 |
-
var $_id;
|
303 |
-
var $_created;
|
304 |
-
var $_responses;
|
305 |
-
var $_folderID;
|
306 |
-
var $_owner;
|
307 |
-
var $_closed;
|
308 |
-
|
309 |
-
var $question;
|
310 |
-
var $multipleChoice;
|
311 |
-
var $randomiseAnswers;
|
312 |
-
var $otherAnswer;
|
313 |
-
var $resultsType;
|
314 |
-
var $blockRepeatVotersType;
|
315 |
-
var $blockExpiration;
|
316 |
-
var $comments;
|
317 |
-
var $makePublic;
|
318 |
-
var $closePoll;
|
319 |
-
var $closePollNow;
|
320 |
-
var $closeDate;
|
321 |
-
var $styleID;
|
322 |
-
var $packID;
|
323 |
-
var $folderID;
|
324 |
-
var $languageID;
|
325 |
-
var $parentID;
|
326 |
-
var $keyword;
|
327 |
-
var $sharing;
|
328 |
-
var $rank;
|
329 |
-
var $url;
|
330 |
-
var $choices;
|
331 |
-
var $mediaType; // new
|
332 |
-
var $mediaCode; // new
|
333 |
-
var $answers;
|
334 |
-
}
|
335 |
-
|
336 |
-
class PollDaddy_Poll_Result extends PollDaddy_XML_Object {
|
337 |
-
var $___name = 'result';
|
338 |
-
|
339 |
-
var $_id;
|
340 |
-
|
341 |
-
var $answers;
|
342 |
-
var $otherAnswers;
|
343 |
-
}
|
344 |
-
|
345 |
-
class PollDaddy_Poll_Answers extends PollDaddy_XML_Object {
|
346 |
-
var $___name = 'answers';
|
347 |
-
|
348 |
-
var $answer;
|
349 |
-
}
|
350 |
-
|
351 |
-
class PollDaddy_Poll_Answer extends PollDaddy_XML_Object {
|
352 |
-
var $___cdata = array( '___content', 'text', 'mediaCode' );
|
353 |
-
var $___name = 'answer';
|
354 |
-
|
355 |
-
var $_id;
|
356 |
-
var $_total;
|
357 |
-
var $_percent;
|
358 |
-
var $_mediaType; // old way
|
359 |
-
var $_mediaCode; // old way
|
360 |
-
|
361 |
-
var $___content;
|
362 |
-
|
363 |
-
var $text; //removed ___content and replaced it with text node
|
364 |
-
var $mediaType; // new
|
365 |
-
var $mediaCode; // new
|
366 |
-
}
|
367 |
-
|
368 |
-
class PollDaddy_Other_Answers extends PollDaddy_XML_Object {
|
369 |
-
var $___name = 'otherAnswers';
|
370 |
-
|
371 |
-
var $otherAnswer;
|
372 |
-
}
|
373 |
-
|
374 |
-
class PollDaddy_Other_Answer extends PollDaddy_XML_Object {
|
375 |
-
var $___cdata = array( '___content' );
|
376 |
-
var $___name = 'otherAnswer';
|
377 |
-
|
378 |
-
var $___content;
|
379 |
-
}
|
380 |
-
|
381 |
-
class PollDaddy_Comments extends PollDaddy_XML_Object {
|
382 |
-
var $___cdata = array( '___content' );
|
383 |
-
var $___name = 'comments';
|
384 |
-
|
385 |
-
var $___content;
|
386 |
-
|
387 |
-
var $_id;
|
388 |
-
|
389 |
-
var $comment;
|
390 |
-
}
|
391 |
-
|
392 |
-
class PollDaddy_Comment extends PollDaddy_XML_Object {
|
393 |
-
var $___cdata = array( 'name', 'email', 'text', 'url' );
|
394 |
-
var $___name = 'comment';
|
395 |
-
|
396 |
-
var $_id; //_ means variable corresponds to an attribute
|
397 |
-
var $_method;
|
398 |
-
var $_type;
|
399 |
-
|
400 |
-
var $poll; // without _ means variable corresponds to an element
|
401 |
-
var $name;
|
402 |
-
var $email;
|
403 |
-
var $text;
|
404 |
-
var $url;
|
405 |
-
var $date;
|
406 |
-
var $ip;
|
407 |
-
}
|
408 |
-
|
409 |
-
class PollDaddy_Extensions extends PollDaddy_XML_Object {
|
410 |
-
var $___name = 'extensions';
|
411 |
-
|
412 |
-
var $folders;
|
413 |
-
var $styles;
|
414 |
-
var $packs;
|
415 |
-
var $languages;
|
416 |
-
}
|
417 |
-
|
418 |
-
class PollDaddy_Folders extends PollDaddy_XML_Object {
|
419 |
-
var $___name = 'folders';
|
420 |
-
|
421 |
-
var $folder;
|
422 |
-
}
|
423 |
-
|
424 |
-
class PollDaddy_Folder extends PollDaddy_XML_Object {
|
425 |
-
var $___cdata = array( '___content' );
|
426 |
-
var $___name = 'folder';
|
427 |
-
|
428 |
-
var $___content;
|
429 |
-
|
430 |
-
var $_id;
|
431 |
-
}
|
432 |
-
|
433 |
-
class PollDaddy_Styles extends PollDaddy_XML_Object {
|
434 |
-
var $___name = 'styles';
|
435 |
-
|
436 |
-
var $style;
|
437 |
-
}
|
438 |
-
|
439 |
-
class PollDaddy_Style extends PollDaddy_XML_Object {
|
440 |
-
var $___cdata = array( 'title', 'css' );
|
441 |
-
var $___name = 'style';
|
442 |
-
|
443 |
-
var $_id;
|
444 |
-
var $_type;
|
445 |
-
var $_retro;
|
446 |
-
|
447 |
-
var $title;
|
448 |
-
var $date;
|
449 |
-
var $css;
|
450 |
-
}
|
451 |
-
|
452 |
-
class PollDaddy_Packs extends PollDaddy_XML_Object {
|
453 |
-
var $___name = 'packs';
|
454 |
-
|
455 |
-
var $pack;
|
456 |
-
}
|
457 |
-
|
458 |
-
class PollDaddy_Pack extends PollDaddy_XML_Object {
|
459 |
-
var $___name = 'pack';
|
460 |
-
|
461 |
-
var $_id;
|
462 |
-
var $_date;
|
463 |
-
var $_retro;
|
464 |
-
|
465 |
-
var $pack;
|
466 |
-
}
|
467 |
-
|
468 |
-
class Custom_Pack extends PollDaddy_XML_Object {
|
469 |
-
var $___name = 'pack';
|
470 |
-
|
471 |
-
var $_type = 'user'; //type attribute is constant (for now)
|
472 |
-
|
473 |
-
var $title;
|
474 |
-
var $phrase;
|
475 |
-
|
476 |
-
function xml( $prepend_ns = true, $pad = 0 ) {
|
477 |
-
$xml = parent::xml( false, $pad );
|
478 |
-
return $xml;
|
479 |
-
}
|
480 |
-
}
|
481 |
-
|
482 |
-
class Custom_Pack_Phrase extends PollDaddy_XML_Object {
|
483 |
-
var $___cdata = array( '___content' );
|
484 |
-
var $___name = 'phrase';
|
485 |
-
|
486 |
-
var $___content;
|
487 |
-
|
488 |
-
var $_phraseID;
|
489 |
-
|
490 |
-
function xml( $prepend_ns = true, $pad = 0 ) {
|
491 |
-
$xml = parent::xml( false, $pad );
|
492 |
-
return $xml;
|
493 |
-
}
|
494 |
-
}
|
495 |
-
|
496 |
-
class PollDaddy_Languages extends PollDaddy_XML_Object {
|
497 |
-
var $___name = 'languages';
|
498 |
-
|
499 |
-
var $language;
|
500 |
-
}
|
501 |
-
|
502 |
-
class PollDaddy_Language extends PollDaddy_XML_Object {
|
503 |
-
var $___cdata = array( '___content' );
|
504 |
-
var $___name = 'language';
|
505 |
-
|
506 |
-
var $___content;
|
507 |
-
|
508 |
-
var $_id;
|
509 |
-
}
|
510 |
-
|
511 |
-
class PollDaddy_Activity extends PollDaddy_XML_Object {
|
512 |
-
var $___cdata = array( '___content' );
|
513 |
-
var $___name = 'activity';
|
514 |
-
|
515 |
-
var $___content;
|
516 |
-
}
|
517 |
-
|
518 |
-
class PollDaddy_Nonce extends PollDaddy_XML_Object {
|
519 |
-
var $___cdata = array( 'text', 'action' );
|
520 |
-
var $___name = 'nonce';
|
521 |
-
|
522 |
-
var $text;
|
523 |
-
var $action;
|
524 |
-
var $userCode;
|
525 |
-
}
|
526 |
-
|
527 |
-
class PollDaddy_Rating_Result extends PollDaddy_XML_Object {
|
528 |
-
var $___name = 'rating_result';
|
529 |
-
|
530 |
-
var $_id;
|
531 |
-
|
532 |
-
var $ratings;
|
533 |
-
}
|
534 |
-
|
535 |
-
class PollDaddy_Ratings extends PollDaddy_XML_Object {
|
536 |
-
var $___name = 'ratings';
|
537 |
-
|
538 |
-
var $_total;
|
539 |
-
var $rating;
|
540 |
-
}
|
541 |
-
|
542 |
-
class PollDaddy_Rating extends PollDaddy_XML_Object {
|
543 |
-
var $___name = 'rating';
|
544 |
-
|
545 |
-
|
546 |
-
var $_id;
|
547 |
-
|
548 |
-
var $_type;
|
549 |
-
var $_votes;
|
550 |
-
var $uid;
|
551 |
-
var $total1;
|
552 |
-
var $total2;
|
553 |
-
var $total3;
|
554 |
-
var $total4;
|
555 |
-
var $total5;
|
556 |
-
var $average_rating;
|
557 |
-
var $date;
|
558 |
-
var $title;
|
559 |
-
var $permalink;
|
560 |
-
|
561 |
-
var $name;
|
562 |
-
var $folder_id;
|
563 |
-
var $settings;
|
564 |
-
}
|
565 |
-
|
566 |
-
class PollDaddy_Email extends PollDaddy_XML_Object {
|
567 |
-
var $___cdata = array( 'custom' );
|
568 |
-
var $___name = 'emailAddress';
|
569 |
-
|
570 |
-
var $_id;
|
571 |
-
var $_owner;
|
572 |
-
|
573 |
-
var $folderID;
|
574 |
-
var $address;
|
575 |
-
var $firstname;
|
576 |
-
var $lastname;
|
577 |
-
var $custom;
|
578 |
-
var $status;
|
579 |
-
}
|
580 |
-
|
581 |
-
class PollDaddy_Email_Message extends PollDaddy_XML_Object {
|
582 |
-
var $___cdata = array( 'text' );
|
583 |
-
var $___name = 'message';
|
584 |
-
|
585 |
-
var $_id;
|
586 |
-
var $_owner;
|
587 |
-
|
588 |
-
var $text;
|
589 |
-
var $groups;
|
590 |
-
}
|
591 |
-
|
592 |
-
class PollDaddy_XML_Parser {
|
593 |
-
var $parser;
|
594 |
-
var $polldaddy_objects = array(
|
595 |
-
'http://api.polldaddy.com/pdapi.xsd:pdAccess' => 'PollDaddy_Access',
|
596 |
-
'http://api.polldaddy.com/pdapi.xsd:pdInitiate' => 'PollDaddy_Initiate',
|
597 |
-
'http://api.polldaddy.com/pdapi.xsd:pdRequest' => 'PollDaddy_Request',
|
598 |
-
'http://api.polldaddy.com/pdapi.xsd:pdResponse' => 'PollDaddy_Response',
|
599 |
-
'http://api.polldaddy.com/pdapi.xsd:errors' => 'PollDaddy_Errors',
|
600 |
-
'http://api.polldaddy.com/pdapi.xsd:error' => 'PollDaddy_Error',
|
601 |
-
'http://api.polldaddy.com/pdapi.xsd:demands' => 'PollDaddy_Demands',
|
602 |
-
'http://api.polldaddy.com/pdapi.xsd:demand' => 'PollDaddy_Demand',
|
603 |
-
'http://api.polldaddy.com/pdapi.xsd:queries' => 'PollDaddy_Queries',
|
604 |
-
'http://api.polldaddy.com/pdapi.xsd:query' => 'PollDaddy_Query',
|
605 |
-
'http://api.polldaddy.com/pdapi.xsd:account' => 'PollDaddy_Account',
|
606 |
-
'http://api.polldaddy.com/pdapi.xsd:list' => 'PollDaddy_List',
|
607 |
-
'http://api.polldaddy.com/pdapi.xsd:polls' => 'PollDaddy_Polls',
|
608 |
-
'http://api.polldaddy.com/pdapi.xsd:search' => 'PollDaddy_Search',
|
609 |
-
'http://api.polldaddy.com/pdapi.xsd:poll' => 'PollDaddy_Poll',
|
610 |
-
'http://api.polldaddy.com/pdapi.xsd:emailAddress' => 'PollDaddy_Email',
|
611 |
-
'http://api.polldaddy.com/pdapi.xsd:message' => 'PollDaddy_Email_Message',
|
612 |
-
'http://api.polldaddy.com/pdapi.xsd:answers' => 'PollDaddy_Poll_Answers',
|
613 |
-
'http://api.polldaddy.com/pdapi.xsd:answer' => 'PollDaddy_Poll_Answer',
|
614 |
-
'http://api.polldaddy.com/pdapi.xsd:otherAnswers' => 'PollDaddy_Other_Answers',
|
615 |
-
'http://api.polldaddy.com/pdapi.xsd:result' => 'PollDaddy_Poll_Result',
|
616 |
-
'http://api.polldaddy.com/pdapi.xsd:comments' => 'PollDaddy_Comments',
|
617 |
-
'http://api.polldaddy.com/pdapi.xsd:comment' => 'PollDaddy_Comment',
|
618 |
-
'http://api.polldaddy.com/pdapi.xsd:extensions' => 'PollDaddy_Extensions',
|
619 |
-
'http://api.polldaddy.com/pdapi.xsd:folders' => 'PollDaddy_Folders',
|
620 |
-
'http://api.polldaddy.com/pdapi.xsd:folder' => 'PollDaddy_Folder',
|
621 |
-
'http://api.polldaddy.com/pdapi.xsd:styles' => 'PollDaddy_Styles',
|
622 |
-
'http://api.polldaddy.com/pdapi.xsd:style' => 'PollDaddy_Style',
|
623 |
-
'http://api.polldaddy.com/pdapi.xsd:packs' => 'PollDaddy_Packs',
|
624 |
-
'http://api.polldaddy.com/pdapi.xsd:pack' => 'PollDaddy_Pack',
|
625 |
-
'http://api.polldaddy.com/pdapi.xsd:languages' => 'PollDaddy_Languages',
|
626 |
-
'http://api.polldaddy.com/pdapi.xsd:language' => 'PollDaddy_Language',
|
627 |
-
'http://api.polldaddy.com/pdapi.xsd:activity' => 'PollDaddy_Activity',
|
628 |
-
'pack' => 'Custom_Pack',
|
629 |
-
'phrase' => 'Custom_Pack_Phrase',
|
630 |
-
'http://api.polldaddy.com/pdapi.xsd:rating_result' => 'PollDaddy_Rating_Result',
|
631 |
-
'http://api.polldaddy.com/pdapi.xsd:ratings' => 'PollDaddy_Ratings',
|
632 |
-
'http://api.polldaddy.com/pdapi.xsd:rating' => 'PollDaddy_Rating',
|
633 |
-
'http://api.polldaddy.com/pdapi.xsd:nonce' => 'PollDaddy_Nonce',
|
634 |
-
'http://api.polldaddy.com/pdapi.xsd:partner' => 'PollDaddy_Partner'
|
635 |
-
);// the parser matches the tag names to the class name and creates an object defined by that class
|
636 |
-
|
637 |
-
var $object_stack = array();
|
638 |
-
var $object_pos = null;
|
639 |
-
|
640 |
-
var $objects = array();
|
641 |
-
|
642 |
-
function PollDaddy_XML_Parser( $xml = null ) {
|
643 |
-
if ( is_null( $xml ) )
|
644 |
-
return;
|
645 |
-
|
646 |
-
return $this->parse( $xml );
|
647 |
-
}
|
648 |
-
|
649 |
-
function parse( $xml ) {
|
650 |
-
$this->parser = xml_parser_create_ns( 'UTF-8' );
|
651 |
-
xml_set_object( $this->parser, $this );
|
652 |
-
xml_set_element_handler( $this->parser, 'tag_open', 'tag_close' );
|
653 |
-
xml_set_character_data_handler( $this->parser, 'text' );
|
654 |
-
xml_parser_set_option( $this->parser, XML_OPTION_CASE_FOLDING, 0 );
|
655 |
-
xml_parser_set_option( $this->parser, XML_OPTION_SKIP_WHITE, 1 );
|
656 |
-
|
657 |
-
xml_parse( $this->parser, $xml );
|
658 |
-
xml_parser_free( $this->parser );
|
659 |
-
return $this->objects;
|
660 |
-
}
|
661 |
-
|
662 |
-
function tag_open( &$parser, $tag, $attributes ) {
|
663 |
-
$object_pos = $this->object_pos;
|
664 |
-
if ( $this->object_stack ) {
|
665 |
-
if ( isset( $this->object_stack[$object_pos]['args'][$tag] ) ) {
|
666 |
-
if ( is_array( $this->object_stack[$object_pos]['args'][$tag] ) ) {
|
667 |
-
$this->object_stack[$object_pos]['args'][$tag][] = false;
|
668 |
-
} else {
|
669 |
-
$this->object_stack[$object_pos]['args'][$tag] = array( $this->object_stack[$object_pos]['args'][$tag], false );
|
670 |
-
}
|
671 |
-
end( $this->object_stack[$object_pos]['args'][$tag] );
|
672 |
-
$this->object_stack[$object_pos]['args_tag_pos'] = key( $this->object_stack[$object_pos]['args'][$tag] );
|
673 |
-
} else {
|
674 |
-
$this->object_stack[$object_pos]['args'][$tag] = false;
|
675 |
-
}
|
676 |
-
$this->object_stack[$object_pos]['args_tag'] = $tag;
|
677 |
-
}
|
678 |
-
|
679 |
-
if ( isset( $this->polldaddy_objects[$tag] ) ) {
|
680 |
-
$this->object_stack[] = array(
|
681 |
-
'tag' => $tag,
|
682 |
-
'atts' => $attributes,
|
683 |
-
'args' => array(),
|
684 |
-
'parent' => $this->object_pos,
|
685 |
-
'args_tag' => null,
|
686 |
-
'args_tag_pos' => null
|
687 |
-
);
|
688 |
-
end( $this->object_stack );
|
689 |
-
$this->object_pos = key( $this->object_stack );
|
690 |
-
}
|
691 |
-
}
|
692 |
-
|
693 |
-
function text( &$parser, $text ) {
|
694 |
-
if ( !$this->object_stack )
|
695 |
-
return;
|
696 |
-
|
697 |
-
$text = trim( $text );
|
698 |
-
if ( !strlen( $text ) )
|
699 |
-
return;
|
700 |
-
|
701 |
-
if ( $this->object_stack[$this->object_pos]['args_tag_pos'] ) {
|
702 |
-
if ( isset($this->object_stack[$this->object_pos]['args'][$this->object_stack[$this->object_pos]['args_tag']][$this->object_stack[$this->object_pos]['args_tag_pos']]) )
|
703 |
-
$this->object_stack[$this->object_pos]['args'][$this->object_stack[$this->object_pos]['args_tag']][$this->object_stack[$this->object_pos]['args_tag_pos']] .= $text;
|
704 |
-
else
|
705 |
-
$this->object_stack[$this->object_pos]['args'][$this->object_stack[$this->object_pos]['args_tag']][$this->object_stack[$this->object_pos]['args_tag_pos']] = $text;
|
706 |
-
} elseif ( $this->object_stack[$this->object_pos]['args_tag'] ) {
|
707 |
-
if ( isset($this->object_stack[$this->object_pos]['args'][$this->object_stack[$this->object_pos]['args_tag']]) )
|
708 |
-
$this->object_stack[$this->object_pos]['args'][$this->object_stack[$this->object_pos]['args_tag']] .= $text;
|
709 |
-
else
|
710 |
-
$this->object_stack[$this->object_pos]['args'][$this->object_stack[$this->object_pos]['args_tag']] = $text;
|
711 |
-
} else {
|
712 |
-
if ( isset($this->object_stack[$this->object_pos]['args']['___content']) )
|
713 |
-
$this->object_stack[$this->object_pos]['args']['___content'] .= $text;
|
714 |
-
else
|
715 |
-
$this->object_stack[$this->object_pos]['args']['___content'] = $text;
|
716 |
-
}
|
717 |
-
}
|
718 |
-
|
719 |
-
function tag_close( &$parser, $tag ) {
|
720 |
-
if ( isset( $this->polldaddy_objects[$tag] ) ) {
|
721 |
-
if ( $tag !== $this->object_stack[$this->object_pos]['tag'] )
|
722 |
-
die( 'damn' );
|
723 |
-
|
724 |
-
$new = $this->polldaddy_objects[$tag];
|
725 |
-
$new_object =& new $new( $this->object_stack[$this->object_pos]['args'], $this->object_stack[$this->object_pos]['atts'] );
|
726 |
-
|
727 |
-
if ( is_numeric( $this->object_stack[$this->object_pos]['parent'] ) ) {
|
728 |
-
$this->object_pos = $this->object_stack[$this->object_pos]['parent'];
|
729 |
-
if ( $this->object_stack[$this->object_pos]['args_tag_pos'] ) {
|
730 |
-
$this->object_stack[$this->object_pos]['args'][$this->object_stack[$this->object_pos]['args_tag']][$this->object_stack[$this->object_pos]['args_tag_pos']] =& $new_object;
|
731 |
-
} elseif ( $this->object_stack[$this->object_pos]['args_tag'] ) {
|
732 |
-
$this->object_stack[$this->object_pos]['args'][$this->object_stack[$this->object_pos]['args_tag']] =& $new_object;
|
733 |
-
}
|
734 |
-
} else {
|
735 |
-
$this->object_pos = null;
|
736 |
-
$this->objects[] =& $new_object;
|
737 |
-
}
|
738 |
-
|
739 |
-
array_pop( $this->object_stack );
|
740 |
-
}
|
741 |
-
}
|
742 |
-
}
|
743 |
-
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Ghetto_XML_Object {
|
4 |
+
function Ghetto_XML_Object( $args = null, $attributes = null ) {
|
5 |
+
if ( get_object_vars( $this ) )
|
6 |
+
$this->___restrict = true;
|
7 |
+
else
|
8 |
+
$this->___restrict = false;
|
9 |
+
|
10 |
+
if ( !is_null( $args ) )
|
11 |
+
$this->set_args( $args );
|
12 |
+
if ( !is_array( $attributes ) )
|
13 |
+
return false;
|
14 |
+
|
15 |
+
$atts = array();
|
16 |
+
foreach ( $attributes as $key => $value )
|
17 |
+
$atts["_$key"] = $value;
|
18 |
+
|
19 |
+
$this->set_args( $atts );
|
20 |
+
}
|
21 |
+
|
22 |
+
function xml( $prepend_ns = true, $pad = 0 ) {
|
23 |
+
$x = '';
|
24 |
+
$atts = get_object_vars( $this );
|
25 |
+
|
26 |
+
$ns = $atts['___ns'];
|
27 |
+
if ( $prepend_ns )
|
28 |
+
$name = "$ns:{$atts['___name']}";
|
29 |
+
else
|
30 |
+
$name = $atts['___name'];
|
31 |
+
|
32 |
+
$_prepend_ns = $prepend_ns;
|
33 |
+
|
34 |
+
$prepend_ns = 'all' === $prepend_ns;
|
35 |
+
|
36 |
+
// added this to remove the Warning ( PHP Notice: Undefined index ) in following condition
|
37 |
+
if ( !isset( $atts['___cdata'] ) )
|
38 |
+
$atts['___cdata'] = '';
|
39 |
+
|
40 |
+
if ( !$cdata = $atts['___cdata'] )
|
41 |
+
$cdata = array();
|
42 |
+
|
43 |
+
$x = "<$name";
|
44 |
+
|
45 |
+
if ( isset( $atts['___content'] ) ) {
|
46 |
+
$inner = in_array( '___content', $cdata ) ? '<![CDATA[' . $atts['___content'] . ']]>' : $atts['___content'];
|
47 |
+
$empty = false;
|
48 |
+
} else {
|
49 |
+
$inner = "\n";
|
50 |
+
$empty = true;
|
51 |
+
}
|
52 |
+
|
53 |
+
unset($atts['___ns'], $atts['___name'], $atts['___content'], $atts['___ns_full'], $atts['___restrict'], $atts['___cdata']);
|
54 |
+
|
55 |
+
$_pad = str_repeat( "\t", $pad + 1 );
|
56 |
+
|
57 |
+
foreach ( $atts as $key => $value ) {
|
58 |
+
if ( is_null( $value ) )
|
59 |
+
continue;
|
60 |
+
if ( '_' == $key[0] ) {
|
61 |
+
$key = substr( $key, 1 );
|
62 |
+
$x .= " $key='$value'";
|
63 |
+
continue;
|
64 |
+
}
|
65 |
+
|
66 |
+
$_key = $key;
|
67 |
+
if ( $prepend_ns )
|
68 |
+
$key = "$ns:$key";
|
69 |
+
|
70 |
+
$empty = false;
|
71 |
+
if ( false === $value ) {
|
72 |
+
$inner .= "$_pad<$key />\n";
|
73 |
+
}
|
74 |
+
elseif ( is_array( $value ) ) {
|
75 |
+
foreach ( $value as $array_value ) {
|
76 |
+
if ( is_a( $array_value, 'Ghetto_XML_Object' ) )
|
77 |
+
$inner .= $_pad . $array_value->xml( $_prepend_ns, $pad + 1 ) . "\n";
|
78 |
+
else
|
79 |
+
$inner .= in_array( $_key, $cdata ) ? "$_pad<$key>" . '<![CDATA[' . $array_value . ']]>' . "</$key>\n" : "$_pad<$key>$array_value</$key>\n";
|
80 |
+
}
|
81 |
+
}
|
82 |
+
else {
|
83 |
+
if ( is_a( $value, 'Ghetto_XML_Object' ) )
|
84 |
+
$inner .= $_pad . $value->xml( $_prepend_ns, $pad + 1 ) . "\n";
|
85 |
+
else{
|
86 |
+
$inner .= in_array( $_key, $cdata ) ? "$_pad<$key>" . '<![CDATA[' . $value . ']]>' . "</$key>\n" : "$_pad<$key>$value</$key>\n";
|
87 |
+
}
|
88 |
+
}
|
89 |
+
}
|
90 |
+
if ( $empty )
|
91 |
+
return $x . ' />';
|
92 |
+
if ( "\n" == substr( $inner, -1 ) )
|
93 |
+
$inner .= str_repeat( "\t", $pad );
|
94 |
+
|
95 |
+
return $x . ">$inner</$name>";
|
96 |
+
}
|
97 |
+
|
98 |
+
function set_args( $array ) {
|
99 |
+
if ( is_scalar( $array ) ) {
|
100 |
+
$this->___content = $array;
|
101 |
+
return;
|
102 |
+
}
|
103 |
+
|
104 |
+
$atts = get_object_vars( $this );
|
105 |
+
foreach ( $array as $key => $value ) {
|
106 |
+
if ( 0 === strpos( $key, $this->___ns_full ) )
|
107 |
+
$key = substr( $key, strlen( $this->___ns_full ) + 1 );
|
108 |
+
if ( is_null( $value ) || ( $this->___restrict && !array_key_exists( $key, $atts ) ) )
|
109 |
+
continue;
|
110 |
+
|
111 |
+
$this->$key = $value;
|
112 |
+
}
|
113 |
+
}
|
114 |
+
}
|
115 |
+
|
116 |
+
class PollDaddy_XML_Object extends Ghetto_XML_Object {
|
117 |
+
var $___ns = 'pd';
|
118 |
+
var $___ns_full = 'http://api.polldaddy.com/pdapi.xsd';
|
119 |
+
}
|
120 |
+
|
121 |
+
class PollDaddy_XML_Root extends PollDaddy_XML_Object {
|
122 |
+
function xml( $prepend_ns = true, $pad = 0 ) {
|
123 |
+
$xml = parent::xml( $prepend_ns, $pad );
|
124 |
+
if ( !$pad ) {
|
125 |
+
$pos = strpos( $xml, '>' );
|
126 |
+
$xml = substr_replace( $xml, " xmlns:$this->___ns='$this->___ns_full'", $pos, 0 );
|
127 |
+
}
|
128 |
+
return $xml;
|
129 |
+
}
|
130 |
+
}
|
131 |
+
|
132 |
+
class PollDaddy_Access extends PollDaddy_XML_Root {
|
133 |
+
var $___name = 'pdAccess';
|
134 |
+
|
135 |
+
var $_partnerGUID;
|
136 |
+
var $_partnerUserID;
|
137 |
+
|
138 |
+
var $demands;
|
139 |
+
}
|
140 |
+
|
141 |
+
class PollDaddy_Initiate extends PollDaddy_XML_Root {
|
142 |
+
var $___cdata = array( 'Email', 'Password' );
|
143 |
+
var $___name = 'pdInitiate';
|
144 |
+
|
145 |
+
var $_partnerGUID;
|
146 |
+
var $_partnerUserID;
|
147 |
+
|
148 |
+
var $Email;
|
149 |
+
var $Password;
|
150 |
+
}
|
151 |
+
|
152 |
+
class PollDaddy_Request extends PollDaddy_XML_Root {
|
153 |
+
var $___name = 'pdRequest';
|
154 |
+
|
155 |
+
var $_partnerGUID;
|
156 |
+
var $_version;
|
157 |
+
var $_admin;
|
158 |
+
|
159 |
+
var $userCode;
|
160 |
+
var $demands;
|
161 |
+
}
|
162 |
+
|
163 |
+
class PollDaddy_Response extends PollDaddy_XML_Root {
|
164 |
+
var $___name = 'pdResponse';
|
165 |
+
|
166 |
+
var $_partnerGUID;
|
167 |
+
var $_partnerUserID;
|
168 |
+
|
169 |
+
var $userCode;
|
170 |
+
var $demands;
|
171 |
+
var $errors;
|
172 |
+
var $queries;
|
173 |
+
}
|
174 |
+
|
175 |
+
class PollDaddy_Errors extends PollDaddy_XML_Object {
|
176 |
+
var $___name = 'errors';
|
177 |
+
|
178 |
+
var $error;
|
179 |
+
}
|
180 |
+
|
181 |
+
class PollDaddy_Error extends PollDaddy_XML_Object {
|
182 |
+
var $___cdata = array( '___content' );
|
183 |
+
var $___name = 'error';
|
184 |
+
|
185 |
+
var $___content;
|
186 |
+
|
187 |
+
var $_id;
|
188 |
+
}
|
189 |
+
|
190 |
+
class PollDaddy_Queries extends PollDaddy_XML_Object {
|
191 |
+
var $___name = 'queries';
|
192 |
+
|
193 |
+
var $query;
|
194 |
+
}
|
195 |
+
|
196 |
+
class PollDaddy_Query extends PollDaddy_XML_Object {
|
197 |
+
var $___cdata = array( 'text' );
|
198 |
+
var $___name = 'query';
|
199 |
+
|
200 |
+
var $_id;
|
201 |
+
|
202 |
+
var $time;
|
203 |
+
var $text;
|
204 |
+
var $caller;
|
205 |
+
}
|
206 |
+
|
207 |
+
class PollDaddy_Demands extends PollDaddy_XML_Object {
|
208 |
+
var $___name = 'demands';
|
209 |
+
|
210 |
+
var $demand;
|
211 |
+
}
|
212 |
+
|
213 |
+
class PollDaddy_Demand extends PollDaddy_XML_Object {
|
214 |
+
var $___name = 'demand';
|
215 |
+
|
216 |
+
var $_id;
|
217 |
+
|
218 |
+
var $account;
|
219 |
+
var $poll;
|
220 |
+
var $polls;
|
221 |
+
var $emailAddress;
|
222 |
+
var $message;
|
223 |
+
var $list;
|
224 |
+
var $search;
|
225 |
+
var $result;
|
226 |
+
var $comments; //need to add an request object for each new type
|
227 |
+
var $comment;
|
228 |
+
var $extensions;
|
229 |
+
var $folders;
|
230 |
+
var $styles;
|
231 |
+
var $style;
|
232 |
+
var $packs;
|
233 |
+
var $pack;
|
234 |
+
var $languages;
|
235 |
+
var $activity;
|
236 |
+
var $rating_result;
|
237 |
+
var $rating;
|
238 |
+
var $nonce;
|
239 |
+
var $partner;
|
240 |
+
}
|
241 |
+
|
242 |
+
class PollDaddy_Partner extends PollDaddy_XML_Object {
|
243 |
+
var $___cdata = array( 'name' );
|
244 |
+
var $___name = 'partner';
|
245 |
+
|
246 |
+
var $_role;
|
247 |
+
var $_users;
|
248 |
+
|
249 |
+
var $name;
|
250 |
+
}
|
251 |
+
|
252 |
+
class PollDaddy_Account extends PollDaddy_XML_Object {
|
253 |
+
var $___cdata = array( 'userName', 'email', 'password', 'firstName', 'lastName', 'websiteURL', 'avatarURL', 'bio' );
|
254 |
+
var $___name = 'account';
|
255 |
+
|
256 |
+
var $userName;
|
257 |
+
var $email;
|
258 |
+
var $password;
|
259 |
+
var $firstName;
|
260 |
+
var $lastName;
|
261 |
+
var $countryCode;
|
262 |
+
var $gender;
|
263 |
+
var $yearOfBirth;
|
264 |
+
var $websiteURL;
|
265 |
+
var $avatarURL;
|
266 |
+
var $bio;
|
267 |
+
}
|
268 |
+
|
269 |
+
class PollDaddy_List extends PollDaddy_XML_Object {
|
270 |
+
var $___name = 'list';
|
271 |
+
|
272 |
+
var $_start;
|
273 |
+
var $_end;
|
274 |
+
var $_id;
|
275 |
+
|
276 |
+
var $period;
|
277 |
+
}
|
278 |
+
|
279 |
+
class PollDaddy_Polls extends PollDaddy_XML_Object {
|
280 |
+
var $___name = 'polls';
|
281 |
+
|
282 |
+
var $_total;
|
283 |
+
|
284 |
+
var $poll;
|
285 |
+
}
|
286 |
+
|
287 |
+
class PollDaddy_Search extends PollDaddy_XML_Object {
|
288 |
+
var $___cdata = array( '___content' );
|
289 |
+
var $___name = 'search';
|
290 |
+
|
291 |
+
var $___content;
|
292 |
+
|
293 |
+
var $poll;
|
294 |
+
}
|
295 |
+
|
296 |
+
class PollDaddy_Poll extends PollDaddy_XML_Object {
|
297 |
+
var $___cdata = array( '___content', 'question', 'mediaCode', 'url' );
|
298 |
+
var $___name = 'poll';
|
299 |
+
|
300 |
+
var $___content;
|
301 |
+
|
302 |
+
var $_id;
|
303 |
+
var $_created;
|
304 |
+
var $_responses;
|
305 |
+
var $_folderID;
|
306 |
+
var $_owner;
|
307 |
+
var $_closed;
|
308 |
+
|
309 |
+
var $question;
|
310 |
+
var $multipleChoice;
|
311 |
+
var $randomiseAnswers;
|
312 |
+
var $otherAnswer;
|
313 |
+
var $resultsType;
|
314 |
+
var $blockRepeatVotersType;
|
315 |
+
var $blockExpiration;
|
316 |
+
var $comments;
|
317 |
+
var $makePublic;
|
318 |
+
var $closePoll;
|
319 |
+
var $closePollNow;
|
320 |
+
var $closeDate;
|
321 |
+
var $styleID;
|
322 |
+
var $packID;
|
323 |
+
var $folderID;
|
324 |
+
var $languageID;
|
325 |
+
var $parentID;
|
326 |
+
var $keyword;
|
327 |
+
var $sharing;
|
328 |
+
var $rank;
|
329 |
+
var $url;
|
330 |
+
var $choices;
|
331 |
+
var $mediaType; // new
|
332 |
+
var $mediaCode; // new
|
333 |
+
var $answers;
|
334 |
+
}
|
335 |
+
|
336 |
+
class PollDaddy_Poll_Result extends PollDaddy_XML_Object {
|
337 |
+
var $___name = 'result';
|
338 |
+
|
339 |
+
var $_id;
|
340 |
+
|
341 |
+
var $answers;
|
342 |
+
var $otherAnswers;
|
343 |
+
}
|
344 |
+
|
345 |
+
class PollDaddy_Poll_Answers extends PollDaddy_XML_Object {
|
346 |
+
var $___name = 'answers';
|
347 |
+
|
348 |
+
var $answer;
|
349 |
+
}
|
350 |
+
|
351 |
+
class PollDaddy_Poll_Answer extends PollDaddy_XML_Object {
|
352 |
+
var $___cdata = array( '___content', 'text', 'mediaCode' );
|
353 |
+
var $___name = 'answer';
|
354 |
+
|
355 |
+
var $_id;
|
356 |
+
var $_total;
|
357 |
+
var $_percent;
|
358 |
+
var $_mediaType; // old way
|
359 |
+
var $_mediaCode; // old way
|
360 |
+
|
361 |
+
var $___content;
|
362 |
+
|
363 |
+
var $text; //removed ___content and replaced it with text node
|
364 |
+
var $mediaType; // new
|
365 |
+
var $mediaCode; // new
|
366 |
+
}
|
367 |
+
|
368 |
+
class PollDaddy_Other_Answers extends PollDaddy_XML_Object {
|
369 |
+
var $___name = 'otherAnswers';
|
370 |
+
|
371 |
+
var $otherAnswer;
|
372 |
+
}
|
373 |
+
|
374 |
+
class PollDaddy_Other_Answer extends PollDaddy_XML_Object {
|
375 |
+
var $___cdata = array( '___content' );
|
376 |
+
var $___name = 'otherAnswer';
|
377 |
+
|
378 |
+
var $___content;
|
379 |
+
}
|
380 |
+
|
381 |
+
class PollDaddy_Comments extends PollDaddy_XML_Object {
|
382 |
+
var $___cdata = array( '___content' );
|
383 |
+
var $___name = 'comments';
|
384 |
+
|
385 |
+
var $___content;
|
386 |
+
|
387 |
+
var $_id;
|
388 |
+
|
389 |
+
var $comment;
|
390 |
+
}
|
391 |
+
|
392 |
+
class PollDaddy_Comment extends PollDaddy_XML_Object {
|
393 |
+
var $___cdata = array( 'name', 'email', 'text', 'url' );
|
394 |
+
var $___name = 'comment';
|
395 |
+
|
396 |
+
var $_id; //_ means variable corresponds to an attribute
|
397 |
+
var $_method;
|
398 |
+
var $_type;
|
399 |
+
|
400 |
+
var $poll; // without _ means variable corresponds to an element
|
401 |
+
var $name;
|
402 |
+
var $email;
|
403 |
+
var $text;
|
404 |
+
var $url;
|
405 |
+
var $date;
|
406 |
+
var $ip;
|
407 |
+
}
|
408 |
+
|
409 |
+
class PollDaddy_Extensions extends PollDaddy_XML_Object {
|
410 |
+
var $___name = 'extensions';
|
411 |
+
|
412 |
+
var $folders;
|
413 |
+
var $styles;
|
414 |
+
var $packs;
|
415 |
+
var $languages;
|
416 |
+
}
|
417 |
+
|
418 |
+
class PollDaddy_Folders extends PollDaddy_XML_Object {
|
419 |
+
var $___name = 'folders';
|
420 |
+
|
421 |
+
var $folder;
|
422 |
+
}
|
423 |
+
|
424 |
+
class PollDaddy_Folder extends PollDaddy_XML_Object {
|
425 |
+
var $___cdata = array( '___content' );
|
426 |
+
var $___name = 'folder';
|
427 |
+
|
428 |
+
var $___content;
|
429 |
+
|
430 |
+
var $_id;
|
431 |
+
}
|
432 |
+
|
433 |
+
class PollDaddy_Styles extends PollDaddy_XML_Object {
|
434 |
+
var $___name = 'styles';
|
435 |
+
|
436 |
+
var $style;
|
437 |
+
}
|
438 |
+
|
439 |
+
class PollDaddy_Style extends PollDaddy_XML_Object {
|
440 |
+
var $___cdata = array( 'title', 'css' );
|
441 |
+
var $___name = 'style';
|
442 |
+
|
443 |
+
var $_id;
|
444 |
+
var $_type;
|
445 |
+
var $_retro;
|
446 |
+
|
447 |
+
var $title;
|
448 |
+
var $date;
|
449 |
+
var $css;
|
450 |
+
}
|
451 |
+
|
452 |
+
class PollDaddy_Packs extends PollDaddy_XML_Object {
|
453 |
+
var $___name = 'packs';
|
454 |
+
|
455 |
+
var $pack;
|
456 |
+
}
|
457 |
+
|
458 |
+
class PollDaddy_Pack extends PollDaddy_XML_Object {
|
459 |
+
var $___name = 'pack';
|
460 |
+
|
461 |
+
var $_id;
|
462 |
+
var $_date;
|
463 |
+
var $_retro;
|
464 |
+
|
465 |
+
var $pack;
|
466 |
+
}
|
467 |
+
|
468 |
+
class Custom_Pack extends PollDaddy_XML_Object {
|
469 |
+
var $___name = 'pack';
|
470 |
+
|
471 |
+
var $_type = 'user'; //type attribute is constant (for now)
|
472 |
+
|
473 |
+
var $title;
|
474 |
+
var $phrase;
|
475 |
+
|
476 |
+
function xml( $prepend_ns = true, $pad = 0 ) {
|
477 |
+
$xml = parent::xml( false, $pad );
|
478 |
+
return $xml;
|
479 |
+
}
|
480 |
+
}
|
481 |
+
|
482 |
+
class Custom_Pack_Phrase extends PollDaddy_XML_Object {
|
483 |
+
var $___cdata = array( '___content' );
|
484 |
+
var $___name = 'phrase';
|
485 |
+
|
486 |
+
var $___content;
|
487 |
+
|
488 |
+
var $_phraseID;
|
489 |
+
|
490 |
+
function xml( $prepend_ns = true, $pad = 0 ) {
|
491 |
+
$xml = parent::xml( false, $pad );
|
492 |
+
return $xml;
|
493 |
+
}
|
494 |
+
}
|
495 |
+
|
496 |
+
class PollDaddy_Languages extends PollDaddy_XML_Object {
|
497 |
+
var $___name = 'languages';
|
498 |
+
|
499 |
+
var $language;
|
500 |
+
}
|
501 |
+
|
502 |
+
class PollDaddy_Language extends PollDaddy_XML_Object {
|
503 |
+
var $___cdata = array( '___content' );
|
504 |
+
var $___name = 'language';
|
505 |
+
|
506 |
+
var $___content;
|
507 |
+
|
508 |
+
var $_id;
|
509 |
+
}
|
510 |
+
|
511 |
+
class PollDaddy_Activity extends PollDaddy_XML_Object {
|
512 |
+
var $___cdata = array( '___content' );
|
513 |
+
var $___name = 'activity';
|
514 |
+
|
515 |
+
var $___content;
|
516 |
+
}
|
517 |
+
|
518 |
+
class PollDaddy_Nonce extends PollDaddy_XML_Object {
|
519 |
+
var $___cdata = array( 'text', 'action' );
|
520 |
+
var $___name = 'nonce';
|
521 |
+
|
522 |
+
var $text;
|
523 |
+
var $action;
|
524 |
+
var $userCode;
|
525 |
+
}
|
526 |
+
|
527 |
+
class PollDaddy_Rating_Result extends PollDaddy_XML_Object {
|
528 |
+
var $___name = 'rating_result';
|
529 |
+
|
530 |
+
var $_id;
|
531 |
+
|
532 |
+
var $ratings;
|
533 |
+
}
|
534 |
+
|
535 |
+
class PollDaddy_Ratings extends PollDaddy_XML_Object {
|
536 |
+
var $___name = 'ratings';
|
537 |
+
|
538 |
+
var $_total;
|
539 |
+
var $rating;
|
540 |
+
}
|
541 |
+
|
542 |
+
class PollDaddy_Rating extends PollDaddy_XML_Object {
|
543 |
+
var $___name = 'rating';
|
544 |
+
var $___cdata = array( 'settings', 'name', 'title', 'permalink' );
|
545 |
+
|
546 |
+
var $_id;
|
547 |
+
|
548 |
+
var $_type;
|
549 |
+
var $_votes;
|
550 |
+
var $uid;
|
551 |
+
var $total1;
|
552 |
+
var $total2;
|
553 |
+
var $total3;
|
554 |
+
var $total4;
|
555 |
+
var $total5;
|
556 |
+
var $average_rating;
|
557 |
+
var $date;
|
558 |
+
var $title;
|
559 |
+
var $permalink;
|
560 |
+
|
561 |
+
var $name;
|
562 |
+
var $folder_id;
|
563 |
+
var $settings;
|
564 |
+
}
|
565 |
+
|
566 |
+
class PollDaddy_Email extends PollDaddy_XML_Object {
|
567 |
+
var $___cdata = array( 'custom' );
|
568 |
+
var $___name = 'emailAddress';
|
569 |
+
|
570 |
+
var $_id;
|
571 |
+
var $_owner;
|
572 |
+
|
573 |
+
var $folderID;
|
574 |
+
var $address;
|
575 |
+
var $firstname;
|
576 |
+
var $lastname;
|
577 |
+
var $custom;
|
578 |
+
var $status;
|
579 |
+
}
|
580 |
+
|
581 |
+
class PollDaddy_Email_Message extends PollDaddy_XML_Object {
|
582 |
+
var $___cdata = array( 'text' );
|
583 |
+
var $___name = 'message';
|
584 |
+
|
585 |
+
var $_id;
|
586 |
+
var $_owner;
|
587 |
+
|
588 |
+
var $text;
|
589 |
+
var $groups;
|
590 |
+
}
|
591 |
+
|
592 |
+
class PollDaddy_XML_Parser {
|
593 |
+
var $parser;
|
594 |
+
var $polldaddy_objects = array(
|
595 |
+
'http://api.polldaddy.com/pdapi.xsd:pdAccess' => 'PollDaddy_Access',
|
596 |
+
'http://api.polldaddy.com/pdapi.xsd:pdInitiate' => 'PollDaddy_Initiate',
|
597 |
+
'http://api.polldaddy.com/pdapi.xsd:pdRequest' => 'PollDaddy_Request',
|
598 |
+
'http://api.polldaddy.com/pdapi.xsd:pdResponse' => 'PollDaddy_Response',
|
599 |
+
'http://api.polldaddy.com/pdapi.xsd:errors' => 'PollDaddy_Errors',
|
600 |
+
'http://api.polldaddy.com/pdapi.xsd:error' => 'PollDaddy_Error',
|
601 |
+
'http://api.polldaddy.com/pdapi.xsd:demands' => 'PollDaddy_Demands',
|
602 |
+
'http://api.polldaddy.com/pdapi.xsd:demand' => 'PollDaddy_Demand',
|
603 |
+
'http://api.polldaddy.com/pdapi.xsd:queries' => 'PollDaddy_Queries',
|
604 |
+
'http://api.polldaddy.com/pdapi.xsd:query' => 'PollDaddy_Query',
|
605 |
+
'http://api.polldaddy.com/pdapi.xsd:account' => 'PollDaddy_Account',
|
606 |
+
'http://api.polldaddy.com/pdapi.xsd:list' => 'PollDaddy_List',
|
607 |
+
'http://api.polldaddy.com/pdapi.xsd:polls' => 'PollDaddy_Polls',
|
608 |
+
'http://api.polldaddy.com/pdapi.xsd:search' => 'PollDaddy_Search',
|
609 |
+
'http://api.polldaddy.com/pdapi.xsd:poll' => 'PollDaddy_Poll',
|
610 |
+
'http://api.polldaddy.com/pdapi.xsd:emailAddress' => 'PollDaddy_Email',
|
611 |
+
'http://api.polldaddy.com/pdapi.xsd:message' => 'PollDaddy_Email_Message',
|
612 |
+
'http://api.polldaddy.com/pdapi.xsd:answers' => 'PollDaddy_Poll_Answers',
|
613 |
+
'http://api.polldaddy.com/pdapi.xsd:answer' => 'PollDaddy_Poll_Answer',
|
614 |
+
'http://api.polldaddy.com/pdapi.xsd:otherAnswers' => 'PollDaddy_Other_Answers',
|
615 |
+
'http://api.polldaddy.com/pdapi.xsd:result' => 'PollDaddy_Poll_Result',
|
616 |
+
'http://api.polldaddy.com/pdapi.xsd:comments' => 'PollDaddy_Comments',
|
617 |
+
'http://api.polldaddy.com/pdapi.xsd:comment' => 'PollDaddy_Comment',
|
618 |
+
'http://api.polldaddy.com/pdapi.xsd:extensions' => 'PollDaddy_Extensions',
|
619 |
+
'http://api.polldaddy.com/pdapi.xsd:folders' => 'PollDaddy_Folders',
|
620 |
+
'http://api.polldaddy.com/pdapi.xsd:folder' => 'PollDaddy_Folder',
|
621 |
+
'http://api.polldaddy.com/pdapi.xsd:styles' => 'PollDaddy_Styles',
|
622 |
+
'http://api.polldaddy.com/pdapi.xsd:style' => 'PollDaddy_Style',
|
623 |
+
'http://api.polldaddy.com/pdapi.xsd:packs' => 'PollDaddy_Packs',
|
624 |
+
'http://api.polldaddy.com/pdapi.xsd:pack' => 'PollDaddy_Pack',
|
625 |
+
'http://api.polldaddy.com/pdapi.xsd:languages' => 'PollDaddy_Languages',
|
626 |
+
'http://api.polldaddy.com/pdapi.xsd:language' => 'PollDaddy_Language',
|
627 |
+
'http://api.polldaddy.com/pdapi.xsd:activity' => 'PollDaddy_Activity',
|
628 |
+
'pack' => 'Custom_Pack',
|
629 |
+
'phrase' => 'Custom_Pack_Phrase',
|
630 |
+
'http://api.polldaddy.com/pdapi.xsd:rating_result' => 'PollDaddy_Rating_Result',
|
631 |
+
'http://api.polldaddy.com/pdapi.xsd:ratings' => 'PollDaddy_Ratings',
|
632 |
+
'http://api.polldaddy.com/pdapi.xsd:rating' => 'PollDaddy_Rating',
|
633 |
+
'http://api.polldaddy.com/pdapi.xsd:nonce' => 'PollDaddy_Nonce',
|
634 |
+
'http://api.polldaddy.com/pdapi.xsd:partner' => 'PollDaddy_Partner'
|
635 |
+
);// the parser matches the tag names to the class name and creates an object defined by that class
|
636 |
+
|
637 |
+
var $object_stack = array();
|
638 |
+
var $object_pos = null;
|
639 |
+
|
640 |
+
var $objects = array();
|
641 |
+
|
642 |
+
function PollDaddy_XML_Parser( $xml = null ) {
|
643 |
+
if ( is_null( $xml ) )
|
644 |
+
return;
|
645 |
+
|
646 |
+
return $this->parse( $xml );
|
647 |
+
}
|
648 |
+
|
649 |
+
function parse( $xml ) {
|
650 |
+
$this->parser = xml_parser_create_ns( 'UTF-8' );
|
651 |
+
xml_set_object( $this->parser, $this );
|
652 |
+
xml_set_element_handler( $this->parser, 'tag_open', 'tag_close' );
|
653 |
+
xml_set_character_data_handler( $this->parser, 'text' );
|
654 |
+
xml_parser_set_option( $this->parser, XML_OPTION_CASE_FOLDING, 0 );
|
655 |
+
xml_parser_set_option( $this->parser, XML_OPTION_SKIP_WHITE, 1 );
|
656 |
+
|
657 |
+
xml_parse( $this->parser, $xml );
|
658 |
+
xml_parser_free( $this->parser );
|
659 |
+
return $this->objects;
|
660 |
+
}
|
661 |
+
|
662 |
+
function tag_open( &$parser, $tag, $attributes ) {
|
663 |
+
$object_pos = $this->object_pos;
|
664 |
+
if ( $this->object_stack ) {
|
665 |
+
if ( isset( $this->object_stack[$object_pos]['args'][$tag] ) ) {
|
666 |
+
if ( is_array( $this->object_stack[$object_pos]['args'][$tag] ) ) {
|
667 |
+
$this->object_stack[$object_pos]['args'][$tag][] = false;
|
668 |
+
} else {
|
669 |
+
$this->object_stack[$object_pos]['args'][$tag] = array( $this->object_stack[$object_pos]['args'][$tag], false );
|
670 |
+
}
|
671 |
+
end( $this->object_stack[$object_pos]['args'][$tag] );
|
672 |
+
$this->object_stack[$object_pos]['args_tag_pos'] = key( $this->object_stack[$object_pos]['args'][$tag] );
|
673 |
+
} else {
|
674 |
+
$this->object_stack[$object_pos]['args'][$tag] = false;
|
675 |
+
}
|
676 |
+
$this->object_stack[$object_pos]['args_tag'] = $tag;
|
677 |
+
}
|
678 |
+
|
679 |
+
if ( isset( $this->polldaddy_objects[$tag] ) ) {
|
680 |
+
$this->object_stack[] = array(
|
681 |
+
'tag' => $tag,
|
682 |
+
'atts' => $attributes,
|
683 |
+
'args' => array(),
|
684 |
+
'parent' => $this->object_pos,
|
685 |
+
'args_tag' => null,
|
686 |
+
'args_tag_pos' => null
|
687 |
+
);
|
688 |
+
end( $this->object_stack );
|
689 |
+
$this->object_pos = key( $this->object_stack );
|
690 |
+
}
|
691 |
+
}
|
692 |
+
|
693 |
+
function text( &$parser, $text ) {
|
694 |
+
if ( !$this->object_stack )
|
695 |
+
return;
|
696 |
+
|
697 |
+
$text = trim( $text );
|
698 |
+
if ( !strlen( $text ) )
|
699 |
+
return;
|
700 |
+
|
701 |
+
if ( $this->object_stack[$this->object_pos]['args_tag_pos'] ) {
|
702 |
+
if ( isset($this->object_stack[$this->object_pos]['args'][$this->object_stack[$this->object_pos]['args_tag']][$this->object_stack[$this->object_pos]['args_tag_pos']]) )
|
703 |
+
$this->object_stack[$this->object_pos]['args'][$this->object_stack[$this->object_pos]['args_tag']][$this->object_stack[$this->object_pos]['args_tag_pos']] .= $text;
|
704 |
+
else
|
705 |
+
$this->object_stack[$this->object_pos]['args'][$this->object_stack[$this->object_pos]['args_tag']][$this->object_stack[$this->object_pos]['args_tag_pos']] = $text;
|
706 |
+
} elseif ( $this->object_stack[$this->object_pos]['args_tag'] ) {
|
707 |
+
if ( isset($this->object_stack[$this->object_pos]['args'][$this->object_stack[$this->object_pos]['args_tag']]) )
|
708 |
+
$this->object_stack[$this->object_pos]['args'][$this->object_stack[$this->object_pos]['args_tag']] .= $text;
|
709 |
+
else
|
710 |
+
$this->object_stack[$this->object_pos]['args'][$this->object_stack[$this->object_pos]['args_tag']] = $text;
|
711 |
+
} else {
|
712 |
+
if ( isset($this->object_stack[$this->object_pos]['args']['___content']) )
|
713 |
+
$this->object_stack[$this->object_pos]['args']['___content'] .= $text;
|
714 |
+
else
|
715 |
+
$this->object_stack[$this->object_pos]['args']['___content'] = $text;
|
716 |
+
}
|
717 |
+
}
|
718 |
+
|
719 |
+
function tag_close( &$parser, $tag ) {
|
720 |
+
if ( isset( $this->polldaddy_objects[$tag] ) ) {
|
721 |
+
if ( $tag !== $this->object_stack[$this->object_pos]['tag'] )
|
722 |
+
die( 'damn' );
|
723 |
+
|
724 |
+
$new = $this->polldaddy_objects[$tag];
|
725 |
+
$new_object =& new $new( $this->object_stack[$this->object_pos]['args'], $this->object_stack[$this->object_pos]['atts'] );
|
726 |
+
|
727 |
+
if ( is_numeric( $this->object_stack[$this->object_pos]['parent'] ) ) {
|
728 |
+
$this->object_pos = $this->object_stack[$this->object_pos]['parent'];
|
729 |
+
if ( $this->object_stack[$this->object_pos]['args_tag_pos'] ) {
|
730 |
+
$this->object_stack[$this->object_pos]['args'][$this->object_stack[$this->object_pos]['args_tag']][$this->object_stack[$this->object_pos]['args_tag_pos']] =& $new_object;
|
731 |
+
} elseif ( $this->object_stack[$this->object_pos]['args_tag'] ) {
|
732 |
+
$this->object_stack[$this->object_pos]['args'][$this->object_stack[$this->object_pos]['args_tag']] =& $new_object;
|
733 |
+
}
|
734 |
+
} else {
|
735 |
+
$this->object_pos = null;
|
736 |
+
$this->objects[] =& $new_object;
|
737 |
+
}
|
738 |
+
|
739 |
+
array_pop( $this->object_stack );
|
740 |
+
}
|
741 |
+
}
|
742 |
+
}
|
743 |
+
?>
|
polldaddy.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(function($){ $('.hide-if-js').hide(); $('.empty-if-js').empty(); $('.hide-if-no-js').removeClass( 'hide-if-no-js' ); $('a.delete-poll').click( function() { return confirm( 'Are you sure you want to delete "' + $(this).parents( 'td' ).find( 'strong' ).text() + '"?' ); } ); $('span.view a.thickbox').attr( 'href', function() { return $(this).attr( 'href' ) + '&iframe&TB_iframe=true'; } ); var delAnswerPrep = function( context ) { $('a.delete-answer', context || null ).click( function() { if ( confirm( 'Are you sure you want to delete this answer?' ) ) { $(this).parents( 'li' ).remove(); $('#choices option:last-child').remove(); } return false; } ); }; delAnswerPrep(); $('#answers').sortable( { axis: 'y', containment: 'parent', handle: '.handle', tolerance: 'pointer' } ); $('#add-answer-holder').show().find( 'button').click( function() { var aa = ( 1 + $('#answers li').size() ).toString();delAnswerPrep( $('#answers').append( '<li><span class="handle">↕</span><div><input type="text" name="answer[new' + aa + ']" size="30" tabindex="2" value="" autocomplete="off" /></div><a title="delete this answer" class="delete-answer delete" href="#">×</a></li>' ).find( 'li:last' ) ); $('#choices').append('<option value="'+aa+'">'+aa+'</option>'); return false; } ); var win = window.dialogArguments || opener || parent || top; $('.polldaddy-send-to-editor').click( function() { var pollID = $(this).siblings('.polldaddy-poll-id').val(); if ( !pollID ) pollID = $('.polldaddy-poll-id:first').val(); win.send_to_editor( '[polldaddy poll=' + parseInt( pollID ).toString() + ']' ); } ); $('.polldaddy-show-shortcode').toggle( function() { $(this).parents('tr:first').next('tr').fadeIn(); $(this).parents('tr:first').next('tr').show(); return false; }, function() { $(this).parents('tr:first').next('tr').fadeOut(); $(this).parents('tr:first').next('tr').hide(); return false; } );var hiddenStyleID = $(':input[name=styleID]'); var customStyle = $(':input[name=customSelect]'); var customStyleVal = parseInt( customStyle.val() ); customStyle.change(function() { var customStyleVal = parseInt( customStyle.val() ); hiddenStyleID.val( customStyleVal.toString() ); }); if ( customStyleVal > 0 ) { $('#design_standard').hide(); $('#design_custom').show(); $('.polldaddy-show-design-options').html('Standard Styles'); hiddenStyleID.val( customStyleVal.toString() ); $('.polldaddy-show-design-options').toggle( function() { $('#design_custom').hide(); $('#design_standard').fadeIn(); $('.polldaddy-show-design-options').html('Custom Styles'); hiddenStyleID.val( 'x' ); return false; }, function() { $('#design_standard').hide(); $('#design_custom').fadeIn(); $('.polldaddy-show-design-options').html('Standard Styles'); var customStyle = $(':input[name=customSelect]'); var customStyleVal = parseInt( customStyle.val() ); if ( customStyleVal > 0 ){ hiddenStyleID.val( customStyleVal.toString() ); } else{hiddenStyleID.val( 'x' ); } return false; } ); } else{ $('#design_custom').hide(); $('#design_standard').show(); $('.polldaddy-show-design-options').toggle( function() { $('#design_standard').hide(); $('#design_custom').fadeIn(); $('.polldaddy-show-design-options').html('Standard Styles'); var customStyle = $(':input[name=customSelect]'); var customStyleVal = parseInt( customStyle.val() ); if ( customStyleVal > 0 ){ hiddenStyleID.val( customStyleVal.toString() ); } else{ hiddenStyleID.val( 'x' ); } return false; }, function() { $('#design_custom').hide(); $('#design_standard').fadeIn(); $('.polldaddy-show-design-options').html('Custom Styles'); hiddenStyleID.val( 'x' ); return false; } ); } $("#multipleChoice").click(function(){ if ($("#multipleChoice").is(":checked")) { $("#numberChoices").show("fast"); } else { $("#numberChoices").hide("fast"); } });$( '.block-repeat' ).click( function(){var repeat = jQuery( this ).val();if( repeat == 'off' ){$( '#cookieip_expiration_label' ).hide();$( '#cookieip_expiration' ).hide();}else{$( '#cookieip_expiration_label' ).show();$( '#cookieip_expiration' ).show();} } ); });
|
1 |
+
jQuery(function($){ if ( typeof(window.$) == 'undefined' ){window.$ = jQuery;} $('.hide-if-js').hide(); $('.empty-if-js').empty(); $('.hide-if-no-js').removeClass( 'hide-if-no-js' ); $('a.delete-poll').click( function() { return confirm( 'Are you sure you want to delete "' + $(this).parents( 'td' ).find( 'strong' ).text() + '"?' ); } ); $('span.view a.thickbox').attr( 'href', function() { return $(this).attr( 'href' ) + '&iframe&TB_iframe=true'; } ); var delAnswerPrep = function( context ) { $('a.delete-answer', context || null ).click( function() { if ( confirm( 'Are you sure you want to delete this answer?' ) ) { $(this).parents( 'li' ).remove(); $('#choices option:last-child').remove(); } return false; } ); }; delAnswerPrep(); $('#answers').sortable( { axis: 'y', containment: 'parent', handle: '.handle', tolerance: 'pointer' } ); $('#add-answer-holder').show().find( 'button').click( function() { var aa = ( 1 + $('#answers li').size() ).toString();delAnswerPrep( $('#answers').append( '<li><span class="handle">↕</span><div><input type="text" name="answer[new' + aa + ']" size="30" tabindex="2" value="" autocomplete="off" /></div><a title="delete this answer" class="delete-answer delete" href="#">×</a></li>' ).find( 'li:last' ) ); $('#choices').append('<option value="'+aa+'">'+aa+'</option>'); return false; } ); var win = window.dialogArguments || opener || parent || top; $('.polldaddy-send-to-editor').click( function() { var pollID = $(this).siblings('.polldaddy-poll-id').val(); if ( !pollID ) pollID = $('.polldaddy-poll-id:first').val(); win.send_to_editor( '[polldaddy poll=' + parseInt( pollID ).toString() + ']' ); } ); $('.polldaddy-show-shortcode').toggle( function() { $(this).parents('tr:first').next('tr').fadeIn(); $(this).parents('tr:first').next('tr').show(); return false; }, function() { $(this).parents('tr:first').next('tr').fadeOut(); $(this).parents('tr:first').next('tr').hide(); return false; } );var hiddenStyleID = $(':input[name=styleID]'); var customStyle = $(':input[name=customSelect]'); var customStyleVal = parseInt( customStyle.val() ); customStyle.change(function() { var customStyleVal = parseInt( customStyle.val() ); hiddenStyleID.val( customStyleVal.toString() ); }); if ( customStyleVal > 0 ) { $('#design_standard').hide(); $('#design_custom').show(); $('.polldaddy-show-design-options').html('Standard Styles'); hiddenStyleID.val( customStyleVal.toString() ); $('.polldaddy-show-design-options').toggle( function() { $('#design_custom').hide(); $('#design_standard').fadeIn(); $('.polldaddy-show-design-options').html('Custom Styles'); hiddenStyleID.val( 'x' ); return false; }, function() { $('#design_standard').hide(); $('#design_custom').fadeIn(); $('.polldaddy-show-design-options').html('Standard Styles'); var customStyle = $(':input[name=customSelect]'); var customStyleVal = parseInt( customStyle.val() ); if ( customStyleVal > 0 ){ hiddenStyleID.val( customStyleVal.toString() ); } else{hiddenStyleID.val( 'x' ); } return false; } ); } else{ $('#design_custom').hide(); $('#design_standard').show(); $('.polldaddy-show-design-options').toggle( function() { $('#design_standard').hide(); $('#design_custom').fadeIn(); $('.polldaddy-show-design-options').html('Standard Styles'); var customStyle = $(':input[name=customSelect]'); var customStyleVal = parseInt( customStyle.val() ); if ( customStyleVal > 0 ){ hiddenStyleID.val( customStyleVal.toString() ); } else{ hiddenStyleID.val( 'x' ); } return false; }, function() { $('#design_custom').hide(); $('#design_standard').fadeIn(); $('.polldaddy-show-design-options').html('Custom Styles'); hiddenStyleID.val( 'x' ); return false; } ); } $("#multipleChoice").click(function(){ if ($("#multipleChoice").is(":checked")) { $("#numberChoices").show("fast"); } else { $("#numberChoices").hide("fast"); } });$( '.block-repeat' ).click( function(){var repeat = jQuery( this ).val();if( repeat == 'off' ){$( '#cookieip_expiration_label' ).hide();$( '#cookieip_expiration' ).hide();}else{$( '#cookieip_expiration_label' ).show();$( '#cookieip_expiration' ).show();} } ); });
|
polldaddy.php
CHANGED
@@ -1,4053 +1,3997 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/*
|
4 |
-
Plugin Name: PollDaddy Polls
|
5 |
-
Description: Create and manage PollDaddy polls and ratings in WordPress
|
6 |
-
Author: Automattic, Inc.
|
7 |
-
Author URL: http://automattic.com/
|
8 |
-
Version: 1.
|
9 |
-
*/
|
10 |
-
|
11 |
-
// You can hardcode your PollDaddy PartnerGUID (API Key) here
|
12 |
-
//define( 'WP_POLLDADDY__PARTNERGUID', '12345...' );
|
13 |
-
|
14 |
-
class WP_PollDaddy {
|
15 |
-
var $errors;
|
16 |
-
var $base_url;
|
17 |
-
var $is_admin;
|
18 |
-
var $is_author;
|
19 |
-
var $scheme;
|
20 |
-
var $version;
|
21 |
-
var $polldaddy_client_class;
|
22 |
-
var $polldaddy_clients;
|
23 |
-
var $id;
|
24 |
-
var $multiple_accounts;
|
25 |
-
var $user_code;
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
$
|
34 |
-
$this->
|
35 |
-
$this->
|
36 |
-
$this->
|
37 |
-
$this->
|
38 |
-
$this->
|
39 |
-
|
40 |
-
$this->
|
41 |
-
|
42 |
-
$this->
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
$hook =
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
$hook =
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
$hook =
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
$hook =
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
'
|
138 |
-
'
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
$
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
$
|
171 |
-
|
172 |
-
$request
|
173 |
-
$request .=
|
174 |
-
$request .=
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
$
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
<
|
250 |
-
|
251 |
-
<
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
<input type="
|
277 |
-
|
278 |
-
|
279 |
-
</
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
$polldaddy->reset();
|
294 |
-
|
295 |
-
if ( empty( $this->user_code ) ){
|
296 |
-
$this->user_code = $polldaddy->get_usercode( $this->id );
|
297 |
-
}
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
break;
|
336 |
-
case '
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
'
|
379 |
-
'
|
380 |
-
'
|
381 |
-
|
382 |
-
'
|
383 |
-
'
|
384 |
-
'
|
385 |
-
'
|
386 |
-
'
|
387 |
-
|
388 |
-
'
|
389 |
-
|
390 |
-
'
|
391 |
-
|
392 |
-
'
|
393 |
-
'
|
394 |
-
'
|
395 |
-
|
396 |
-
'
|
397 |
-
'
|
398 |
-
'cite' => array ()),
|
399 |
-
'
|
400 |
-
'
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
if (
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
$
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
$
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
$
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
$
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
$polldaddy->
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
$this->
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
$
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
if (
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
$
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
$
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
$
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
$
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
$
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
$user_defaults[$option] =
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
if ( isset
|
846 |
-
$user_defaults['
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
$message =
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
$message =
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
break;
|
943 |
-
case '
|
944 |
-
$message = __( '
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
$
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
|
1097 |
-
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
-
|
1125 |
-
|
1126 |
-
|
1127 |
-
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
if(
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
1140 |
-
|
1141 |
-
|
1142 |
-
$
|
1143 |
-
|
1144 |
-
|
1145 |
-
$
|
1146 |
-
|
1147 |
-
|
1148 |
-
$
|
1149 |
-
|
1150 |
-
|
1151 |
-
|
1152 |
-
|
1153 |
-
|
1154 |
-
|
1155 |
-
|
1156 |
-
|
1157 |
-
|
1158 |
-
|
1159 |
-
|
1160 |
-
|
1161 |
-
|
1162 |
-
|
1163 |
-
<
|
1164 |
-
<?php
|
1165 |
-
|
1166 |
-
|
1167 |
-
|
1168 |
-
|
1169 |
-
|
1170 |
-
|
1171 |
-
|
1172 |
-
|
1173 |
-
|
1174 |
-
|
1175 |
-
|
1176 |
-
|
1177 |
-
|
1178 |
-
|
1179 |
-
<?php
|
1180 |
-
|
1181 |
-
<
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
1188 |
-
|
1189 |
-
|
1190 |
-
|
1191 |
-
|
1192 |
-
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
1198 |
-
|
1199 |
-
|
1200 |
-
|
1201 |
-
$
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
|
1210 |
-
$
|
1211 |
-
$
|
1212 |
-
$
|
1213 |
-
|
1214 |
-
|
1215 |
-
|
1216 |
-
|
1217 |
-
|
1218 |
-
|
1219 |
-
|
1220 |
-
|
1221 |
-
|
1222 |
-
|
1223 |
-
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
-
|
1228 |
-
|
1229 |
-
|
1230 |
-
|
1231 |
-
<?php
|
1232 |
-
<
|
1233 |
-
<?php
|
1234 |
-
|
1235 |
-
|
1236 |
-
|
1237 |
-
|
1238 |
-
|
1239 |
-
<?php
|
1240 |
-
|
1241 |
-
|
1242 |
-
|
1243 |
-
<?php
|
1244 |
-
|
1245 |
-
|
1246 |
-
|
1247 |
-
|
1248 |
-
|
1249 |
-
<?php
|
1250 |
-
<span class="
|
1251 |
-
|
1252 |
-
|
1253 |
-
|
1254 |
-
|
1255 |
-
|
1256 |
-
|
1257 |
-
|
1258 |
-
|
1259 |
-
|
1260 |
-
|
1261 |
-
|
1262 |
-
|
1263 |
-
|
1264 |
-
|
1265 |
-
|
1266 |
-
|
1267 |
-
|
1268 |
-
|
1269 |
-
|
1270 |
-
|
1271 |
-
|
1272 |
-
|
1273 |
-
|
1274 |
-
|
1275 |
-
|
1276 |
-
|
1277 |
-
|
1278 |
-
|
1279 |
-
|
1280 |
-
|
1281 |
-
|
1282 |
-
|
1283 |
-
|
1284 |
-
|
1285 |
-
|
1286 |
-
|
1287 |
-
|
1288 |
-
|
1289 |
-
|
1290 |
-
|
1291 |
-
|
1292 |
-
|
1293 |
-
|
1294 |
-
|
1295 |
-
|
1296 |
-
|
1297 |
-
|
1298 |
-
|
1299 |
-
|
1300 |
-
|
1301 |
-
</
|
1302 |
-
|
1303 |
-
|
1304 |
-
|
1305 |
-
|
1306 |
-
|
1307 |
-
|
1308 |
-
|
1309 |
-
|
1310 |
-
|
1311 |
-
|
1312 |
-
|
1313 |
-
|
1314 |
-
|
1315 |
-
|
1316 |
-
|
1317 |
-
$
|
1318 |
-
|
1319 |
-
|
1320 |
-
|
1321 |
-
|
1322 |
-
|
1323 |
-
|
1324 |
-
|
1325 |
-
|
1326 |
-
|
1327 |
-
|
1328 |
-
|
1329 |
-
|
1330 |
-
|
1331 |
-
|
1332 |
-
|
1333 |
-
|
1334 |
-
|
1335 |
-
|
1336 |
-
|
1337 |
-
|
1338 |
-
|
1339 |
-
|
1340 |
-
|
1341 |
-
|
1342 |
-
|
1343 |
-
|
1344 |
-
|
1345 |
-
|
1346 |
-
|
1347 |
-
|
1348 |
-
|
1349 |
-
|
1350 |
-
|
1351 |
-
|
1352 |
-
|
1353 |
-
|
1354 |
-
|
1355 |
-
<?php
|
1356 |
-
|
1357 |
-
<input type="
|
1358 |
-
|
1359 |
-
|
1360 |
-
|
1361 |
-
|
1362 |
-
|
1363 |
-
|
1364 |
-
|
1365 |
-
|
1366 |
-
|
1367 |
-
|
1368 |
-
|
1369 |
-
|
1370 |
-
|
1371 |
-
|
1372 |
-
|
1373 |
-
|
1374 |
-
|
1375 |
-
|
1376 |
-
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
1380 |
-
|
1381 |
-
|
1382 |
-
|
1383 |
-
|
1384 |
-
|
1385 |
-
|
1386 |
-
|
1387 |
-
|
1388 |
-
|
1389 |
-
|
1390 |
-
|
1391 |
-
|
1392 |
-
|
1393 |
-
|
1394 |
-
|
1395 |
-
|
1396 |
-
|
1397 |
-
|
1398 |
-
|
1399 |
-
|
1400 |
-
|
1401 |
-
|
1402 |
-
|
1403 |
-
|
1404 |
-
|
1405 |
-
|
1406 |
-
|
1407 |
-
|
1408 |
-
|
1409 |
-
|
1410 |
-
|
1411 |
-
|
1412 |
-
|
1413 |
-
|
1414 |
-
|
1415 |
-
|
1416 |
-
|
1417 |
-
|
1418 |
-
<option value="
|
1419 |
-
<option value="
|
1420 |
-
<option value="
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
|
1425 |
-
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
1430 |
-
|
1431 |
-
|
1432 |
-
|
1433 |
-
|
1434 |
-
|
1435 |
-
|
1436 |
-
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
|
1446 |
-
|
1447 |
-
|
1448 |
-
|
1449 |
-
|
1450 |
-
|
1451 |
-
|
1452 |
-
|
1453 |
-
$
|
1454 |
-
|
1455 |
-
|
1456 |
-
|
1457 |
-
|
1458 |
-
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
<?php
|
1464 |
-
|
1465 |
-
|
1466 |
-
|
1467 |
-
|
1468 |
-
|
1469 |
-
|
1470 |
-
|
1471 |
-
|
1472 |
-
|
1473 |
-
|
1474 |
-
|
1475 |
-
|
1476 |
-
<?php
|
1477 |
-
|
1478 |
-
?>
|
1479 |
-
|
1480 |
-
|
1481 |
-
|
1482 |
-
|
1483 |
-
|
1484 |
-
|
1485 |
-
|
1486 |
-
|
1487 |
-
|
1488 |
-
|
1489 |
-
|
1490 |
-
|
1491 |
-
|
1492 |
-
|
1493 |
-
|
1494 |
-
|
1495 |
-
|
1496 |
-
|
1497 |
-
|
1498 |
-
|
1499 |
-
|
1500 |
-
|
1501 |
-
|
1502 |
-
|
1503 |
-
|
1504 |
-
|
1505 |
-
|
1506 |
-
|
1507 |
-
|
1508 |
-
|
1509 |
-
|
1510 |
-
|
1511 |
-
|
1512 |
-
|
1513 |
-
|
1514 |
-
|
1515 |
-
|
1516 |
-
|
1517 |
-
if( $
|
1518 |
-
|
1519 |
-
|
1520 |
-
|
1521 |
-
|
1522 |
-
|
1523 |
-
|
1524 |
-
|
1525 |
-
|
1526 |
-
|
1527 |
-
|
1528 |
-
|
1529 |
-
|
1530 |
-
|
1531 |
-
|
1532 |
-
|
1533 |
-
|
1534 |
-
|
1535 |
-
|
1536 |
-
|
1537 |
-
|
1538 |
-
|
1539 |
-
|
1540 |
-
|
1541 |
-
|
1542 |
-
|
1543 |
-
|
1544 |
-
|
1545 |
-
|
1546 |
-
|
1547 |
-
|
1548 |
-
|
1549 |
-
|
1550 |
-
|
1551 |
-
|
1552 |
-
|
1553 |
-
|
1554 |
-
|
1555 |
-
|
1556 |
-
|
1557 |
-
|
1558 |
-
|
1559 |
-
|
1560 |
-
|
1561 |
-
|
1562 |
-
|
1563 |
-
|
1564 |
-
|
1565 |
-
|
1566 |
-
|
1567 |
-
|
1568 |
-
|
1569 |
-
|
1570 |
-
|
1571 |
-
|
1572 |
-
|
1573 |
-
|
1574 |
-
|
1575 |
-
|
1576 |
-
|
1577 |
-
|
1578 |
-
|
1579 |
-
|
1580 |
-
|
1581 |
-
|
1582 |
-
|
1583 |
-
|
1584 |
-
|
1585 |
-
|
1586 |
-
|
1587 |
-
|
1588 |
-
|
1589 |
-
|
1590 |
-
|
1591 |
-
|
1592 |
-
|
1593 |
-
|
1594 |
-
|
1595 |
-
|
1596 |
-
|
1597 |
-
|
1598 |
-
|
1599 |
-
|
1600 |
-
|
1601 |
-
|
1602 |
-
|
1603 |
-
|
1604 |
-
|
1605 |
-
|
1606 |
-
|
1607 |
-
|
1608 |
-
|
1609 |
-
|
1610 |
-
$
|
1611 |
-
}
|
1612 |
-
|
1613 |
-
|
1614 |
-
$
|
1615 |
-
|
1616 |
-
|
1617 |
-
|
1618 |
-
|
1619 |
-
|
1620 |
-
|
1621 |
-
|
1622 |
-
|
1623 |
-
|
1624 |
-
|
1625 |
-
|
1626 |
-
|
1627 |
-
|
1628 |
-
|
1629 |
-
|
1630 |
-
|
1631 |
-
|
1632 |
-
|
1633 |
-
|
1634 |
-
|
1635 |
-
|
1636 |
-
|
1637 |
-
|
1638 |
-
|
1639 |
-
|
1640 |
-
|
1641 |
-
|
1642 |
-
|
1643 |
-
|
1644 |
-
|
1645 |
-
|
1646 |
-
|
1647 |
-
<td
|
1648 |
-
|
1649 |
-
|
1650 |
-
|
1651 |
-
|
1652 |
-
|
1653 |
-
|
1654 |
-
|
1655 |
-
|
1656 |
-
|
1657 |
-
|
1658 |
-
|
1659 |
-
|
1660 |
-
|
1661 |
-
|
1662 |
-
|
1663 |
-
|
1664 |
-
|
1665 |
-
|
1666 |
-
|
1667 |
-
|
1668 |
-
|
1669 |
-
|
1670 |
-
|
1671 |
-
</tr>
|
1672 |
-
|
1673 |
-
|
1674 |
-
|
1675 |
-
|
1676 |
-
|
1677 |
-
|
1678 |
-
|
1679 |
-
|
1680 |
-
|
1681 |
-
|
1682 |
-
|
1683 |
-
|
1684 |
-
|
1685 |
-
|
1686 |
-
|
1687 |
-
|
1688 |
-
|
1689 |
-
|
1690 |
-
|
1691 |
-
|
1692 |
-
|
1693 |
-
|
1694 |
-
|
1695 |
-
|
1696 |
-
|
1697 |
-
|
1698 |
-
|
1699 |
-
|
1700 |
-
|
1701 |
-
|
1702 |
-
|
1703 |
-
|
1704 |
-
|
1705 |
-
|
1706 |
-
|
1707 |
-
|
1708 |
-
|
1709 |
-
|
1710 |
-
|
1711 |
-
|
1712 |
-
|
1713 |
-
|
1714 |
-
|
1715 |
-
|
1716 |
-
<?php
|
1717 |
-
|
1718 |
-
|
1719 |
-
|
1720 |
-
|
1721 |
-
|
1722 |
-
|
1723 |
-
|
1724 |
-
|
1725 |
-
|
1726 |
-
|
1727 |
-
|
1728 |
-
|
1729 |
-
|
1730 |
-
|
1731 |
-
|
1732 |
-
|
1733 |
-
|
1734 |
-
|
1735 |
-
|
1736 |
-
|
1737 |
-
|
1738 |
-
|
1739 |
-
|
1740 |
-
|
1741 |
-
|
1742 |
-
|
1743 |
-
|
1744 |
-
|
1745 |
-
|
1746 |
-
|
1747 |
-
|
1748 |
-
|
1749 |
-
|
1750 |
-
|
1751 |
-
<
|
1752 |
-
</th>
|
1753 |
-
<th
|
1754 |
-
|
1755 |
-
|
1756 |
-
|
1757 |
-
|
1758 |
-
|
1759 |
-
|
1760 |
-
|
1761 |
-
|
1762 |
-
|
1763 |
-
|
1764 |
-
|
1765 |
-
|
1766 |
-
|
1767 |
-
|
1768 |
-
|
1769 |
-
|
1770 |
-
|
1771 |
-
|
1772 |
-
|
1773 |
-
<td
|
1774 |
-
|
1775 |
-
|
1776 |
-
|
1777 |
-
|
1778 |
-
|
1779 |
-
|
1780 |
-
|
1781 |
-
|
1782 |
-
|
1783 |
-
|
1784 |
-
|
1785 |
-
|
1786 |
-
|
1787 |
-
|
1788 |
-
|
1789 |
-
|
1790 |
-
|
1791 |
-
|
1792 |
-
|
1793 |
-
|
1794 |
-
|
1795 |
-
|
1796 |
-
|
1797 |
-
</tr>
|
1798 |
-
|
1799 |
-
|
1800 |
-
|
1801 |
-
|
1802 |
-
|
1803 |
-
|
1804 |
-
|
1805 |
-
|
1806 |
-
|
1807 |
-
|
1808 |
-
|
1809 |
-
|
1810 |
-
|
1811 |
-
|
1812 |
-
<?php
|
1813 |
-
|
1814 |
-
|
1815 |
-
|
1816 |
-
|
1817 |
-
|
1818 |
-
|
1819 |
-
|
1820 |
-
|
1821 |
-
|
1822 |
-
|
1823 |
-
|
1824 |
-
|
1825 |
-
|
1826 |
-
|
1827 |
-
|
1828 |
-
|
1829 |
-
|
1830 |
-
|
1831 |
-
|
1832 |
-
|
1833 |
-
|
1834 |
-
|
1835 |
-
|
1836 |
-
|
1837 |
-
|
1838 |
-
|
1839 |
-
|
1840 |
-
|
1841 |
-
|
1842 |
-
|
1843 |
-
|
1844 |
-
|
1845 |
-
|
1846 |
-
|
1847 |
-
|
1848 |
-
|
1849 |
-
|
1850 |
-
|
1851 |
-
|
1852 |
-
|
1853 |
-
</
|
1854 |
-
</div
|
1855 |
-
|
1856 |
-
|
1857 |
-
|
1858 |
-
|
1859 |
-
|
1860 |
-
|
1861 |
-
|
1862 |
-
|
1863 |
-
|
1864 |
-
|
1865 |
-
|
1866 |
-
|
1867 |
-
|
1868 |
-
|
1869 |
-
|
1870 |
-
|
1871 |
-
|
1872 |
-
|
1873 |
-
|
1874 |
-
|
1875 |
-
|
1876 |
-
|
1877 |
-
|
1878 |
-
|
1879 |
-
|
1880 |
-
|
1881 |
-
|
1882 |
-
|
1883 |
-
|
1884 |
-
|
1885 |
-
$
|
1886 |
-
|
1887 |
-
|
1888 |
-
|
1889 |
-
|
1890 |
-
|
1891 |
-
|
1892 |
-
|
1893 |
-
|
1894 |
-
|
1895 |
-
|
1896 |
-
|
1897 |
-
|
1898 |
-
|
1899 |
-
|
1900 |
-
|
1901 |
-
|
1902 |
-
|
1903 |
-
|
1904 |
-
|
1905 |
-
|
1906 |
-
|
1907 |
-
|
1908 |
-
|
1909 |
-
|
1910 |
-
|
1911 |
-
|
1912 |
-
|
1913 |
-
|
1914 |
-
|
1915 |
-
|
1916 |
-
|
1917 |
-
|
1918 |
-
|
1919 |
-
|
1920 |
-
|
1921 |
-
|
1922 |
-
|
1923 |
-
|
1924 |
-
|
1925 |
-
|
1926 |
-
|
1927 |
-
|
1928 |
-
|
1929 |
-
|
1930 |
-
|
1931 |
-
|
1932 |
-
|
1933 |
-
|
1934 |
-
|
1935 |
-
|
1936 |
-
|
1937 |
-
|
1938 |
-
|
1939 |
-
|
1940 |
-
|
1941 |
-
|
1942 |
-
|
1943 |
-
|
1944 |
-
|
1945 |
-
|
1946 |
-
|
1947 |
-
|
1948 |
-
|
1949 |
-
|
1950 |
-
$this->
|
1951 |
-
$
|
1952 |
-
|
1953 |
-
$
|
1954 |
-
|
1955 |
-
|
1956 |
-
|
1957 |
-
|
1958 |
-
|
1959 |
-
|
1960 |
-
|
1961 |
-
|
1962 |
-
|
1963 |
-
|
1964 |
-
|
1965 |
-
|
1966 |
-
|
1967 |
-
|
1968 |
-
|
1969 |
-
|
1970 |
-
|
1971 |
-
|
1972 |
-
|
1973 |
-
|
1974 |
-
|
1975 |
-
|
1976 |
-
|
1977 |
-
|
1978 |
-
|
1979 |
-
|
1980 |
-
|
1981 |
-
|
1982 |
-
|
1983 |
-
|
1984 |
-
|
1985 |
-
|
1986 |
-
|
1987 |
-
|
1988 |
-
|
1989 |
-
|
1990 |
-
|
1991 |
-
|
1992 |
-
|
1993 |
-
|
1994 |
-
|
1995 |
-
|
1996 |
-
|
1997 |
-
|
1998 |
-
|
1999 |
-
|
2000 |
-
|
2001 |
-
|
2002 |
-
|
2003 |
-
|
2004 |
-
|
2005 |
-
|
2006 |
-
|
2007 |
-
|
2008 |
-
<?php
|
2009 |
-
|
2010 |
-
<span class="
|
2011 |
-
|
2012 |
-
|
2013 |
-
|
2014 |
-
|
2015 |
-
|
2016 |
-
|
2017 |
-
|
2018 |
-
|
2019 |
-
|
2020 |
-
|
2021 |
-
|
2022 |
-
|
2023 |
-
|
2024 |
-
|
2025 |
-
|
2026 |
-
|
2027 |
-
|
2028 |
-
|
2029 |
-
|
2030 |
-
|
2031 |
-
|
2032 |
-
|
2033 |
-
|
2034 |
-
|
2035 |
-
|
2036 |
-
|
2037 |
-
|
2038 |
-
|
2039 |
-
|
2040 |
-
|
2041 |
-
|
2042 |
-
|
2043 |
-
$
|
2044 |
-
|
2045 |
-
|
2046 |
-
|
2047 |
-
|
2048 |
-
|
2049 |
-
|
2050 |
-
|
2051 |
-
|
2052 |
-
|
2053 |
-
|
2054 |
-
|
2055 |
-
|
2056 |
-
|
2057 |
-
$style->css =
|
2058 |
-
|
2059 |
-
$
|
2060 |
-
|
2061 |
-
|
2062 |
-
|
2063 |
-
|
2064 |
-
|
2065 |
-
|
2066 |
-
|
2067 |
-
|
2068 |
-
|
2069 |
-
|
2070 |
-
|
2071 |
-
|
2072 |
-
$
|
2073 |
-
|
2074 |
-
|
2075 |
-
|
2076 |
-
|
2077 |
-
|
2078 |
-
|
2079 |
-
|
2080 |
-
$
|
2081 |
-
|
2082 |
-
|
2083 |
-
|
2084 |
-
|
2085 |
-
|
2086 |
-
|
2087 |
-
|
2088 |
-
|
2089 |
-
|
2090 |
-
<
|
2091 |
-
|
2092 |
-
|
2093 |
-
|
2094 |
-
|
2095 |
-
|
2096 |
-
|
2097 |
-
|
2098 |
-
|
2099 |
-
|
2100 |
-
|
2101 |
-
|
2102 |
-
|
2103 |
-
|
2104 |
-
|
2105 |
-
|
2106 |
-
|
2107 |
-
|
2108 |
-
|
2109 |
-
|
2110 |
-
|
2111 |
-
|
2112 |
-
|
2113 |
-
|
2114 |
-
</td>
|
2115 |
-
|
2116 |
-
|
2117 |
-
|
2118 |
-
|
2119 |
-
|
2120 |
-
|
2121 |
-
|
2122 |
-
|
2123 |
-
<option value="
|
2124 |
-
<option value="
|
2125 |
-
<option value="
|
2126 |
-
|
2127 |
-
|
2128 |
-
|
2129 |
-
|
2130 |
-
|
2131 |
-
|
2132 |
-
|
2133 |
-
|
2134 |
-
</td>
|
2135 |
-
|
2136 |
-
|
2137 |
-
|
2138 |
-
|
2139 |
-
|
2140 |
-
|
2141 |
-
|
2142 |
-
<option value="pds-
|
2143 |
-
<option value="pds-
|
2144 |
-
<option value="pds-
|
2145 |
-
<option value="pds-answer-
|
2146 |
-
<option value="pds-answer
|
2147 |
-
<option value="pds-
|
2148 |
-
|
2149 |
-
|
2150 |
-
|
2151 |
-
|
2152 |
-
|
2153 |
-
|
2154 |
-
|
2155 |
-
|
2156 |
-
|
2157 |
-
|
2158 |
-
|
2159 |
-
|
2160 |
-
|
2161 |
-
|
2162 |
-
|
2163 |
-
|
2164 |
-
|
2165 |
-
|
2166 |
-
|
2167 |
-
|
2168 |
-
|
2169 |
-
|
2170 |
-
|
2171 |
-
|
2172 |
-
|
2173 |
-
|
2174 |
-
|
2175 |
-
|
2176 |
-
|
2177 |
-
|
2178 |
-
|
2179 |
-
|
2180 |
-
|
2181 |
-
<
|
2182 |
-
<
|
2183 |
-
|
2184 |
-
|
2185 |
-
|
2186 |
-
|
2187 |
-
|
2188 |
-
|
2189 |
-
|
2190 |
-
|
2191 |
-
|
2192 |
-
|
2193 |
-
|
2194 |
-
|
2195 |
-
|
2196 |
-
|
2197 |
-
|
2198 |
-
<option value="
|
2199 |
-
<option value="
|
2200 |
-
<option value="
|
2201 |
-
<option value="
|
2202 |
-
<option value="
|
2203 |
-
<option value="
|
2204 |
-
<option value="
|
2205 |
-
<option value="
|
2206 |
-
<option value="
|
2207 |
-
<option value="
|
2208 |
-
|
2209 |
-
|
2210 |
-
|
2211 |
-
|
2212 |
-
|
2213 |
-
|
2214 |
-
|
2215 |
-
|
2216 |
-
|
2217 |
-
|
2218 |
-
|
2219 |
-
|
2220 |
-
<option value="
|
2221 |
-
<option value="
|
2222 |
-
<option value="
|
2223 |
-
|
2224 |
-
|
2225 |
-
|
2226 |
-
|
2227 |
-
|
2228 |
-
|
2229 |
-
|
2230 |
-
|
2231 |
-
|
2232 |
-
|
2233 |
-
<td>
|
2234 |
-
|
2235 |
-
|
2236 |
-
|
2237 |
-
|
2238 |
-
|
2239 |
-
<td>
|
2240 |
-
|
2241 |
-
|
2242 |
-
|
2243 |
-
|
2244 |
-
|
2245 |
-
<td>
|
2246 |
-
|
2247 |
-
|
2248 |
-
|
2249 |
-
|
2250 |
-
|
2251 |
-
<td>
|
2252 |
-
|
2253 |
-
|
2254 |
-
|
2255 |
-
|
2256 |
-
|
2257 |
-
|
2258 |
-
|
2259 |
-
<option value="
|
2260 |
-
<option value="
|
2261 |
-
<option value="
|
2262 |
-
<option value="
|
2263 |
-
<option value="
|
2264 |
-
<option value="
|
2265 |
-
<option value="
|
2266 |
-
<option value="
|
2267 |
-
<option value="
|
2268 |
-
<option value="
|
2269 |
-
|
2270 |
-
|
2271 |
-
|
2272 |
-
|
2273 |
-
|
2274 |
-
|
2275 |
-
|
2276 |
-
|
2277 |
-
|
2278 |
-
|
2279 |
-
|
2280 |
-
|
2281 |
-
|
2282 |
-
|
2283 |
-
|
2284 |
-
|
2285 |
-
|
2286 |
-
|
2287 |
-
|
2288 |
-
|
2289 |
-
|
2290 |
-
|
2291 |
-
|
2292 |
-
<td>
|
2293 |
-
|
2294 |
-
|
2295 |
-
|
2296 |
-
|
2297 |
-
|
2298 |
-
<td>
|
2299 |
-
|
2300 |
-
|
2301 |
-
|
2302 |
-
|
2303 |
-
|
2304 |
-
|
2305 |
-
|
2306 |
-
|
2307 |
-
|
2308 |
-
|
2309 |
-
|
2310 |
-
|
2311 |
-
|
2312 |
-
|
2313 |
-
|
2314 |
-
|
2315 |
-
|
2316 |
-
|
2317 |
-
<option value="
|
2318 |
-
<option value="
|
2319 |
-
<option value="
|
2320 |
-
<option value="
|
2321 |
-
|
2322 |
-
|
2323 |
-
|
2324 |
-
|
2325 |
-
|
2326 |
-
|
2327 |
-
|
2328 |
-
|
2329 |
-
|
2330 |
-
|
2331 |
-
|
2332 |
-
|
2333 |
-
|
2334 |
-
|
2335 |
-
|
2336 |
-
<option value="
|
2337 |
-
<option value="
|
2338 |
-
<option value="
|
2339 |
-
<option value="
|
2340 |
-
<option value="
|
2341 |
-
<option value="
|
2342 |
-
<option value="
|
2343 |
-
<option value="
|
2344 |
-
<option value="
|
2345 |
-
<option value="
|
2346 |
-
<option value="
|
2347 |
-
<option value="
|
2348 |
-
<option value="
|
2349 |
-
<option value="
|
2350 |
-
<option value="
|
2351 |
-
<option value="
|
2352 |
-
<option value="
|
2353 |
-
<option value="
|
2354 |
-
<option value="
|
2355 |
-
<option value="
|
2356 |
-
<option value="
|
2357 |
-
<option value="
|
2358 |
-
<option value="
|
2359 |
-
<option value="
|
2360 |
-
<option value="
|
2361 |
-
<option value="
|
2362 |
-
|
2363 |
-
|
2364 |
-
|
2365 |
-
|
2366 |
-
|
2367 |
-
|
2368 |
-
|
2369 |
-
|
2370 |
-
|
2371 |
-
|
2372 |
-
|
2373 |
-
|
2374 |
-
<option value="
|
2375 |
-
<option value="
|
2376 |
-
<option value="
|
2377 |
-
<option value="
|
2378 |
-
<option value="
|
2379 |
-
|
2380 |
-
|
2381 |
-
|
2382 |
-
|
2383 |
-
|
2384 |
-
|
2385 |
-
|
2386 |
-
|
2387 |
-
|
2388 |
-
|
2389 |
-
<td
|
2390 |
-
|
2391 |
-
|
2392 |
-
|
2393 |
-
|
2394 |
-
|
2395 |
-
|
2396 |
-
|
2397 |
-
<option value="
|
2398 |
-
<option value="
|
2399 |
-
<option value="
|
2400 |
-
<option value="
|
2401 |
-
<option value="
|
2402 |
-
<option value="
|
2403 |
-
<option value="
|
2404 |
-
<option value="
|
2405 |
-
<option value="
|
2406 |
-
<option value="
|
2407 |
-
<option value="
|
2408 |
-
<option value="
|
2409 |
-
<option value="
|
2410 |
-
<option value="
|
2411 |
-
<option value="
|
2412 |
-
<option value="
|
2413 |
-
<option value="
|
2414 |
-
<option value="
|
2415 |
-
<option value="
|
2416 |
-
<option value="
|
2417 |
-
<option value="
|
2418 |
-
<option value="
|
2419 |
-
<option value="
|
2420 |
-
<option value="
|
2421 |
-
<option value="
|
2422 |
-
<option value="
|
2423 |
-
|
2424 |
-
|
2425 |
-
|
2426 |
-
|
2427 |
-
|
2428 |
-
|
2429 |
-
|
2430 |
-
|
2431 |
-
|
2432 |
-
|
2433 |
-
|
2434 |
-
|
2435 |
-
|
2436 |
-
|
2437 |
-
|
2438 |
-
|
2439 |
-
|
2440 |
-
<option value="
|
2441 |
-
<option value="
|
2442 |
-
<option value="
|
2443 |
-
<option value="
|
2444 |
-
<option value="
|
2445 |
-
<option value="
|
2446 |
-
<option value="
|
2447 |
-
<option value="
|
2448 |
-
<option value="
|
2449 |
-
<option value="
|
2450 |
-
<option value="
|
2451 |
-
<option value="
|
2452 |
-
<option value="
|
2453 |
-
<option value="
|
2454 |
-
<option value="
|
2455 |
-
<option value="
|
2456 |
-
<option value="
|
2457 |
-
<option value="
|
2458 |
-
<option value="
|
2459 |
-
<option value="
|
2460 |
-
<option value="
|
2461 |
-
<option value="
|
2462 |
-
<option value="
|
2463 |
-
<option value="
|
2464 |
-
<option value="
|
2465 |
-
<option value="
|
2466 |
-
|
2467 |
-
|
2468 |
-
|
2469 |
-
|
2470 |
-
|
2471 |
-
|
2472 |
-
|
2473 |
-
|
2474 |
-
|
2475 |
-
|
2476 |
-
|
2477 |
-
|
2478 |
-
<option value="
|
2479 |
-
<option value="
|
2480 |
-
<option value="
|
2481 |
-
<option value="
|
2482 |
-
<option value="
|
2483 |
-
<option value="
|
2484 |
-
<option value="
|
2485 |
-
<option value="
|
2486 |
-
<option value="
|
2487 |
-
<option value="
|
2488 |
-
<option value="
|
2489 |
-
<option value="
|
2490 |
-
<option value="
|
2491 |
-
<option value="
|
2492 |
-
<option value="
|
2493 |
-
<option value="
|
2494 |
-
<option value="
|
2495 |
-
<option value="
|
2496 |
-
<option value="
|
2497 |
-
<option value="
|
2498 |
-
<option value="
|
2499 |
-
<option value="
|
2500 |
-
<option value="
|
2501 |
-
<option value="
|
2502 |
-
<option value="
|
2503 |
-
<option value="
|
2504 |
-
|
2505 |
-
|
2506 |
-
|
2507 |
-
|
2508 |
-
|
2509 |
-
|
2510 |
-
|
2511 |
-
|
2512 |
-
|
2513 |
-
|
2514 |
-
|
2515 |
-
|
2516 |
-
<option value="
|
2517 |
-
<option value="
|
2518 |
-
<option value="
|
2519 |
-
<option value="
|
2520 |
-
<option value="
|
2521 |
-
<option value="
|
2522 |
-
<option value="
|
2523 |
-
<option value="
|
2524 |
-
<option value="
|
2525 |
-
<option value="
|
2526 |
-
<option value="
|
2527 |
-
<option value="
|
2528 |
-
<option value="
|
2529 |
-
<option value="
|
2530 |
-
<option value="
|
2531 |
-
<option value="
|
2532 |
-
<option value="
|
2533 |
-
<option value="
|
2534 |
-
<option value="
|
2535 |
-
<option value="
|
2536 |
-
<option value="
|
2537 |
-
<option value="
|
2538 |
-
<option value="
|
2539 |
-
<option value="
|
2540 |
-
<option value="
|
2541 |
-
<option value="
|
2542 |
-
|
2543 |
-
|
2544 |
-
|
2545 |
-
|
2546 |
-
|
2547 |
-
|
2548 |
-
|
2549 |
-
|
2550 |
-
|
2551 |
-
|
2552 |
-
|
2553 |
-
|
2554 |
-
<option value="
|
2555 |
-
<option value="
|
2556 |
-
<option value="
|
2557 |
-
<option value="
|
2558 |
-
<option value="
|
2559 |
-
<option value="
|
2560 |
-
<option value="
|
2561 |
-
<option value="
|
2562 |
-
<option value="
|
2563 |
-
<option value="
|
2564 |
-
<option value="
|
2565 |
-
<option value="
|
2566 |
-
<option value="
|
2567 |
-
<option value="
|
2568 |
-
<option value="
|
2569 |
-
<option value="
|
2570 |
-
<option value="
|
2571 |
-
<option value="
|
2572 |
-
<option value="
|
2573 |
-
<option value="
|
2574 |
-
<option value="
|
2575 |
-
<option value="
|
2576 |
-
<option value="
|
2577 |
-
<option value="
|
2578 |
-
<option value="
|
2579 |
-
<option value="
|
2580 |
-
|
2581 |
-
|
2582 |
-
|
2583 |
-
|
2584 |
-
|
2585 |
-
|
2586 |
-
|
2587 |
-
|
2588 |
-
|
2589 |
-
|
2590 |
-
|
2591 |
-
|
2592 |
-
|
2593 |
-
|
2594 |
-
|
2595 |
-
<option value="
|
2596 |
-
<option value="
|
2597 |
-
<option value="
|
2598 |
-
<option value="
|
2599 |
-
<option value="
|
2600 |
-
<option value="
|
2601 |
-
<option value="
|
2602 |
-
<option value="
|
2603 |
-
<option value="
|
2604 |
-
<option value="
|
2605 |
-
<option value="
|
2606 |
-
<option value="
|
2607 |
-
<option value="
|
2608 |
-
<option value="
|
2609 |
-
<option value="
|
2610 |
-
<option value="
|
2611 |
-
<option value="
|
2612 |
-
<option value="
|
2613 |
-
<option value="
|
2614 |
-
<option value="
|
2615 |
-
<option value="
|
2616 |
-
<option value="
|
2617 |
-
<option value="
|
2618 |
-
<option value="
|
2619 |
-
<option value="
|
2620 |
-
<option value="
|
2621 |
-
|
2622 |
-
|
2623 |
-
|
2624 |
-
|
2625 |
-
|
2626 |
-
|
2627 |
-
|
2628 |
-
|
2629 |
-
|
2630 |
-
|
2631 |
-
|
2632 |
-
|
2633 |
-
<option value="
|
2634 |
-
<option value="
|
2635 |
-
<option value="
|
2636 |
-
<option value="
|
2637 |
-
<option value="
|
2638 |
-
<option value="
|
2639 |
-
<option value="
|
2640 |
-
<option value="
|
2641 |
-
<option value="
|
2642 |
-
<option value="
|
2643 |
-
<option value="
|
2644 |
-
<option value="
|
2645 |
-
<option value="
|
2646 |
-
<option value="
|
2647 |
-
<option value="
|
2648 |
-
<option value="
|
2649 |
-
<option value="
|
2650 |
-
<option value="
|
2651 |
-
<option value="
|
2652 |
-
<option value="
|
2653 |
-
<option value="
|
2654 |
-
<option value="
|
2655 |
-
<option value="
|
2656 |
-
<option value="
|
2657 |
-
<option value="
|
2658 |
-
<option value="
|
2659 |
-
|
2660 |
-
|
2661 |
-
|
2662 |
-
|
2663 |
-
|
2664 |
-
|
2665 |
-
|
2666 |
-
|
2667 |
-
|
2668 |
-
|
2669 |
-
|
2670 |
-
|
2671 |
-
<option value="
|
2672 |
-
<option value="
|
2673 |
-
<option value="
|
2674 |
-
<option value="
|
2675 |
-
<option value="
|
2676 |
-
<option value="
|
2677 |
-
<option value="
|
2678 |
-
<option value="
|
2679 |
-
<option value="
|
2680 |
-
<option value="
|
2681 |
-
<option value="
|
2682 |
-
<option value="
|
2683 |
-
<option value="
|
2684 |
-
<option value="
|
2685 |
-
<option value="
|
2686 |
-
<option value="
|
2687 |
-
<option value="
|
2688 |
-
<option value="
|
2689 |
-
<option value="
|
2690 |
-
<option value="
|
2691 |
-
<option value="
|
2692 |
-
<option value="
|
2693 |
-
<option value="
|
2694 |
-
<option value="
|
2695 |
-
<option value="
|
2696 |
-
<option value="
|
2697 |
-
|
2698 |
-
|
2699 |
-
|
2700 |
-
|
2701 |
-
|
2702 |
-
|
2703 |
-
|
2704 |
-
|
2705 |
-
|
2706 |
-
|
2707 |
-
|
2708 |
-
|
2709 |
-
<option value="
|
2710 |
-
<option value="
|
2711 |
-
<option value="
|
2712 |
-
<option value="
|
2713 |
-
<option value="
|
2714 |
-
<option value="
|
2715 |
-
<option value="
|
2716 |
-
<option value="
|
2717 |
-
<option value="
|
2718 |
-
<option value="
|
2719 |
-
<option value="
|
2720 |
-
<option value="
|
2721 |
-
<option value="
|
2722 |
-
<option value="
|
2723 |
-
<option value="
|
2724 |
-
<option value="
|
2725 |
-
<option value="
|
2726 |
-
<option value="
|
2727 |
-
<option value="
|
2728 |
-
<option value="
|
2729 |
-
<option value="
|
2730 |
-
<option value="
|
2731 |
-
<option value="
|
2732 |
-
<option value="
|
2733 |
-
<option value="
|
2734 |
-
<option value="
|
2735 |
-
|
2736 |
-
|
2737 |
-
|
2738 |
-
|
2739 |
-
|
2740 |
-
|
2741 |
-
|
2742 |
-
|
2743 |
-
|
2744 |
-
|
2745 |
-
|
2746 |
-
|
2747 |
-
|
2748 |
-
<td
|
2749 |
-
|
2750 |
-
|
2751 |
-
|
2752 |
-
|
2753 |
-
|
2754 |
-
|
2755 |
-
|
2756 |
-
|
2757 |
-
|
2758 |
-
|
2759 |
-
|
2760 |
-
|
2761 |
-
|
2762 |
-
|
2763 |
-
|
2764 |
-
|
2765 |
-
|
2766 |
-
|
2767 |
-
|
2768 |
-
|
2769 |
-
|
2770 |
-
|
2771 |
-
|
2772 |
-
|
2773 |
-
|
2774 |
-
|
2775 |
-
|
2776 |
-
|
2777 |
-
|
2778 |
-
|
2779 |
-
|
2780 |
-
|
2781 |
-
|
2782 |
-
|
2783 |
-
|
2784 |
-
|
2785 |
-
|
2786 |
-
|
2787 |
-
|
2788 |
-
|
2789 |
-
|
2790 |
-
|
2791 |
-
|
2792 |
-
|
2793 |
-
|
2794 |
-
|
2795 |
-
|
2796 |
-
|
2797 |
-
|
2798 |
-
|
2799 |
-
|
2800 |
-
|
2801 |
-
|
2802 |
-
|
2803 |
-
<
|
2804 |
-
|
2805 |
-
|
2806 |
-
|
2807 |
-
|
2808 |
-
|
2809 |
-
|
2810 |
-
|
2811 |
-
<
|
2812 |
-
|
2813 |
-
|
2814 |
-
|
2815 |
-
|
2816 |
-
|
2817 |
-
|
2818 |
-
|
2819 |
-
<
|
2820 |
-
|
2821 |
-
|
2822 |
-
|
2823 |
-
|
2824 |
-
<span class="pds-answer-
|
2825 |
-
<input type="
|
2826 |
-
</span>
|
2827 |
-
<span class="pds-
|
2828 |
-
|
2829 |
-
|
2830 |
-
|
2831 |
-
|
2832 |
-
|
2833 |
-
|
2834 |
-
|
2835 |
-
|
2836 |
-
|
2837 |
-
|
2838 |
-
|
2839 |
-
<
|
2840 |
-
|
2841 |
-
|
2842 |
-
|
2843 |
-
|
2844 |
-
|
2845 |
-
|
2846 |
-
|
2847 |
-
|
2848 |
-
|
2849 |
-
|
2850 |
-
|
2851 |
-
|
2852 |
-
|
2853 |
-
|
2854 |
-
<span class="pds-
|
2855 |
-
|
2856 |
-
|
2857 |
-
|
2858 |
-
|
2859 |
-
<span class="pds-clear"></span>
|
2860 |
-
|
2861 |
-
|
2862 |
-
|
2863 |
-
<span class="pds-
|
2864 |
-
|
2865 |
-
|
2866 |
-
|
2867 |
-
|
2868 |
-
<span class="pds-clear"></span>
|
2869 |
-
|
2870 |
-
|
2871 |
-
|
2872 |
-
<span class="pds-
|
2873 |
-
|
2874 |
-
|
2875 |
-
|
2876 |
-
|
2877 |
-
<span class="pds-clear"></span>
|
2878 |
-
|
2879 |
-
|
2880 |
-
|
2881 |
-
<span class="pds-
|
2882 |
-
|
2883 |
-
|
2884 |
-
|
2885 |
-
|
2886 |
-
|
2887 |
-
|
2888 |
-
|
2889 |
-
|
2890 |
-
|
2891 |
-
<
|
2892 |
-
|
2893 |
-
|
2894 |
-
|
2895 |
-
|
2896 |
-
|
2897 |
-
|
2898 |
-
|
2899 |
-
|
2900 |
-
|
2901 |
-
|
2902 |
-
|
2903 |
-
|
2904 |
-
|
2905 |
-
|
2906 |
-
|
2907 |
-
|
2908 |
-
|
2909 |
-
|
2910 |
-
|
2911 |
-
|
2912 |
-
|
2913 |
-
|
2914 |
-
|
2915 |
-
|
2916 |
-
<
|
2917 |
-
<
|
2918 |
-
|
2919 |
-
|
2920 |
-
|
2921 |
-
|
2922 |
-
|
2923 |
-
</
|
2924 |
-
<
|
2925 |
-
|
2926 |
-
<script type="text/javascript" language="javascript">window.onload = function() {
|
2927 |
-
var CSSXML;
|
2928 |
-
loadStyle();
|
2929 |
-
showResults( false );
|
2930 |
-
renderStyleEdit( $('styleName').value );
|
2931 |
-
}</script>
|
2932 |
-
<
|
2933 |
-
|
2934 |
-
|
2935 |
-
|
2936 |
-
|
2937 |
-
|
2938 |
-
|
2939 |
-
|
2940 |
-
|
2941 |
-
|
2942 |
-
|
2943 |
-
|
2944 |
-
|
2945 |
-
|
2946 |
-
|
2947 |
-
|
2948 |
-
|
2949 |
-
|
2950 |
-
|
2951 |
-
|
2952 |
-
|
2953 |
-
|
2954 |
-
|
2955 |
-
|
2956 |
-
|
2957 |
-
|
2958 |
-
|
2959 |
-
|
2960 |
-
|
2961 |
-
|
2962 |
-
|
2963 |
-
|
2964 |
-
|
2965 |
-
|
2966 |
-
|
2967 |
-
|
2968 |
-
|
2969 |
-
|
2970 |
-
|
2971 |
-
|
2972 |
-
|
2973 |
-
|
2974 |
-
|
2975 |
-
|
2976 |
-
|
2977 |
-
|
2978 |
-
|
2979 |
-
|
2980 |
-
|
2981 |
-
|
2982 |
-
|
2983 |
-
|
2984 |
-
|
2985 |
-
|
2986 |
-
|
2987 |
-
|
2988 |
-
|
2989 |
-
|
2990 |
-
|
2991 |
-
|
2992 |
-
|
2993 |
-
|
2994 |
-
|
2995 |
-
|
2996 |
-
|
2997 |
-
|
2998 |
-
|
2999 |
-
|
3000 |
-
|
3001 |
-
|
3002 |
-
|
3003 |
-
|
3004 |
-
|
3005 |
-
|
3006 |
-
|
3007 |
-
|
3008 |
-
|
3009 |
-
|
3010 |
-
|
3011 |
-
|
3012 |
-
|
3013 |
-
|
3014 |
-
|
3015 |
-
|
3016 |
-
|
3017 |
-
|
3018 |
-
|
3019 |
-
|
3020 |
-
|
3021 |
-
|
3022 |
-
|
3023 |
-
|
3024 |
-
|
3025 |
-
|
3026 |
-
|
3027 |
-
|
3028 |
-
|
3029 |
-
|
3030 |
-
|
3031 |
-
|
3032 |
-
|
3033 |
-
|
3034 |
-
|
3035 |
-
|
3036 |
-
|
3037 |
-
|
3038 |
-
|
3039 |
-
|
3040 |
-
|
3041 |
-
|
3042 |
-
|
3043 |
-
|
3044 |
-
|
3045 |
-
|
3046 |
-
|
3047 |
-
|
3048 |
-
|
3049 |
-
|
3050 |
-
|
3051 |
-
|
3052 |
-
|
3053 |
-
|
3054 |
-
|
3055 |
-
|
3056 |
-
|
3057 |
-
|
3058 |
-
|
3059 |
-
|
3060 |
-
|
3061 |
-
|
3062 |
-
|
3063 |
-
|
3064 |
-
|
3065 |
-
|
3066 |
-
|
3067 |
-
|
3068 |
-
|
3069 |
-
|
3070 |
-
|
3071 |
-
|
3072 |
-
|
3073 |
-
|
3074 |
-
|
3075 |
-
|
3076 |
-
|
3077 |
-
|
3078 |
-
|
3079 |
-
|
3080 |
-
|
3081 |
-
|
3082 |
-
|
3083 |
-
|
3084 |
-
|
3085 |
-
|
3086 |
-
|
3087 |
-
|
3088 |
-
|
3089 |
-
|
3090 |
-
|
3091 |
-
|
3092 |
-
<div class="wrap">
|
3093 |
-
|
3094 |
-
|
3095 |
-
|
3096 |
-
|
3097 |
-
|
3098 |
-
|
3099 |
-
|
3100 |
-
|
3101 |
-
|
3102 |
-
|
3103 |
-
|
3104 |
-
|
3105 |
-
|
3106 |
-
|
3107 |
-
|
3108 |
-
|
3109 |
-
|
3110 |
-
|
3111 |
-
|
3112 |
-
|
3113 |
-
|
3114 |
-
|
3115 |
-
|
3116 |
-
|
3117 |
-
|
3118 |
-
|
3119 |
-
|
3120 |
-
|
3121 |
-
|
3122 |
-
|
3123 |
-
|
3124 |
-
|
3125 |
-
|
3126 |
-
|
3127 |
-
|
3128 |
-
|
3129 |
-
|
3130 |
-
|
3131 |
-
|
3132 |
-
|
3133 |
-
|
3134 |
-
|
3135 |
-
|
3136 |
-
|
3137 |
-
|
3138 |
-
|
3139 |
-
|
3140 |
-
|
3141 |
-
|
3142 |
-
|
3143 |
-
|
3144 |
-
|
3145 |
-
|
3146 |
-
|
3147 |
-
|
3148 |
-
|
3149 |
-
|
3150 |
-
|
3151 |
-
|
3152 |
-
|
3153 |
-
|
3154 |
-
|
3155 |
-
|
3156 |
-
|
3157 |
-
|
3158 |
-
|
3159 |
-
|
3160 |
-
|
3161 |
-
|
3162 |
-
|
3163 |
-
|
3164 |
-
|
3165 |
-
|
3166 |
-
|
3167 |
-
|
3168 |
-
|
3169 |
-
|
3170 |
-
|
3171 |
-
|
3172 |
-
|
3173 |
-
|
3174 |
-
|
3175 |
-
|
3176 |
-
|
3177 |
-
|
3178 |
-
|
3179 |
-
|
3180 |
-
|
3181 |
-
|
3182 |
-
|
3183 |
-
|
3184 |
-
|
3185 |
-
|
3186 |
-
|
3187 |
-
|
3188 |
-
|
3189 |
-
|
3190 |
-
|
3191 |
-
|
3192 |
-
|
3193 |
-
|
3194 |
-
|
3195 |
-
|
3196 |
-
|
3197 |
-
|
3198 |
-
|
3199 |
-
|
3200 |
-
|
3201 |
-
|
3202 |
-
|
3203 |
-
|
3204 |
-
|
3205 |
-
|
3206 |
-
|
3207 |
-
|
3208 |
-
|
3209 |
-
|
3210 |
-
|
3211 |
-
|
3212 |
-
|
3213 |
-
|
3214 |
-
|
3215 |
-
|
3216 |
-
|
3217 |
-
|
3218 |
-
|
3219 |
-
|
3220 |
-
|
3221 |
-
|
3222 |
-
|
3223 |
-
|
3224 |
-
|
3225 |
-
|
3226 |
-
|
3227 |
-
|
3228 |
-
|
3229 |
-
|
3230 |
-
|
3231 |
-
|
3232 |
-
|
3233 |
-
|
3234 |
-
|
3235 |
-
|
3236 |
-
|
3237 |
-
|
3238 |
-
|
3239 |
-
|
3240 |
-
|
3241 |
-
|
3242 |
-
|
3243 |
-
|
3244 |
-
|
3245 |
-
|
3246 |
-
|
3247 |
-
|
3248 |
-
|
3249 |
-
|
3250 |
-
|
3251 |
-
|
3252 |
-
|
3253 |
-
|
3254 |
-
|
3255 |
-
|
3256 |
-
|
3257 |
-
|
3258 |
-
|
3259 |
-
|
3260 |
-
|
3261 |
-
|
3262 |
-
|
3263 |
-
|
3264 |
-
|
3265 |
-
|
3266 |
-
|
3267 |
-
|
3268 |
-
|
3269 |
-
|
3270 |
-
|
3271 |
-
|
3272 |
-
|
3273 |
-
|
3274 |
-
|
3275 |
-
|
3276 |
-
|
3277 |
-
|
3278 |
-
|
3279 |
-
|
3280 |
-
|
3281 |
-
|
3282 |
-
|
3283 |
-
|
3284 |
-
|
3285 |
-
|
3286 |
-
|
3287 |
-
|
3288 |
-
|
3289 |
-
|
3290 |
-
|
3291 |
-
|
3292 |
-
|
3293 |
-
|
3294 |
-
|
3295 |
-
|
3296 |
-
|
3297 |
-
|
3298 |
-
|
3299 |
-
|
3300 |
-
|
3301 |
-
|
3302 |
-
|
3303 |
-
|
3304 |
-
|
3305 |
-
|
3306 |
-
|
3307 |
-
|
3308 |
-
|
3309 |
-
|
3310 |
-
|
3311 |
-
|
3312 |
-
|
3313 |
-
|
3314 |
-
|
3315 |
-
|
3316 |
-
|
3317 |
-
|
3318 |
-
|
3319 |
-
|
3320 |
-
|
3321 |
-
|
3322 |
-
|
3323 |
-
|
3324 |
-
|
3325 |
-
|
3326 |
-
|
3327 |
-
|
3328 |
-
|
3329 |
-
|
3330 |
-
|
3331 |
-
|
3332 |
-
|
3333 |
-
|
3334 |
-
|
3335 |
-
|
3336 |
-
|
3337 |
-
|
3338 |
-
|
3339 |
-
|
3340 |
-
|
3341 |
-
|
3342 |
-
|
3343 |
-
|
3344 |
-
|
3345 |
-
|
3346 |
-
|
3347 |
-
|
3348 |
-
|
3349 |
-
|
3350 |
-
|
3351 |
-
|
3352 |
-
|
3353 |
-
|
3354 |
-
|
3355 |
-
|
3356 |
-
|
3357 |
-
|
3358 |
-
|
3359 |
-
|
3360 |
-
|
3361 |
-
|
3362 |
-
|
3363 |
-
|
3364 |
-
|
3365 |
-
|
3366 |
-
|
3367 |
-
|
3368 |
-
|
3369 |
-
|
3370 |
-
|
3371 |
-
|
3372 |
-
|
3373 |
-
|
3374 |
-
|
3375 |
-
|
3376 |
-
|
3377 |
-
|
3378 |
-
|
3379 |
-
|
3380 |
-
|
3381 |
-
|
3382 |
-
|
3383 |
-
|
3384 |
-
|
3385 |
-
|
3386 |
-
|
3387 |
-
|
3388 |
-
|
3389 |
-
|
3390 |
-
|
3391 |
-
|
3392 |
-
|
3393 |
-
|
3394 |
-
|
3395 |
-
|
3396 |
-
|
3397 |
-
|
3398 |
-
|
3399 |
-
|
3400 |
-
|
3401 |
-
|
3402 |
-
|
3403 |
-
|
3404 |
-
|
3405 |
-
|
3406 |
-
|
3407 |
-
|
3408 |
-
|
3409 |
-
|
3410 |
-
|
3411 |
-
|
3412 |
-
|
3413 |
-
|
3414 |
-
|
3415 |
-
|
3416 |
-
|
3417 |
-
|
3418 |
-
|
3419 |
-
|
3420 |
-
|
3421 |
-
|
3422 |
-
|
3423 |
-
|
3424 |
-
|
3425 |
-
|
3426 |
-
|
3427 |
-
|
3428 |
-
|
3429 |
-
|
3430 |
-
|
3431 |
-
|
3432 |
-
|
3433 |
-
|
3434 |
-
|
3435 |
-
|
3436 |
-
|
3437 |
-
|
3438 |
-
|
3439 |
-
|
3440 |
-
|
3441 |
-
|
3442 |
-
|
3443 |
-
|
3444 |
-
|
3445 |
-
|
3446 |
-
|
3447 |
-
|
3448 |
-
|
3449 |
-
|
3450 |
-
|
3451 |
-
|
3452 |
-
|
3453 |
-
|
3454 |
-
|
3455 |
-
|
3456 |
-
|
3457 |
-
|
3458 |
-
|
3459 |
-
|
3460 |
-
|
3461 |
-
|
3462 |
-
|
3463 |
-
|
3464 |
-
|
3465 |
-
|
3466 |
-
|
3467 |
-
|
3468 |
-
|
3469 |
-
|
3470 |
-
|
3471 |
-
|
3472 |
-
|
3473 |
-
|
3474 |
-
|
3475 |
-
|
3476 |
-
|
3477 |
-
|
3478 |
-
|
3479 |
-
|
3480 |
-
|
3481 |
-
|
3482 |
-
|
3483 |
-
|
3484 |
-
|
3485 |
-
|
3486 |
-
|
3487 |
-
|
3488 |
-
|
3489 |
-
|
3490 |
-
|
3491 |
-
|
3492 |
-
|
3493 |
-
|
3494 |
-
|
3495 |
-
|
3496 |
-
|
3497 |
-
|
3498 |
-
|
3499 |
-
|
3500 |
-
|
3501 |
-
|
3502 |
-
|
3503 |
-
|
3504 |
-
|
3505 |
-
|
3506 |
-
|
3507 |
-
|
3508 |
-
|
3509 |
-
|
3510 |
-
|
3511 |
-
|
3512 |
-
|
3513 |
-
|
3514 |
-
|
3515 |
-
|
3516 |
-
|
3517 |
-
|
3518 |
-
|
3519 |
-
|
3520 |
-
|
3521 |
-
|
3522 |
-
|
3523 |
-
|
3524 |
-
|
3525 |
-
|
3526 |
-
|
3527 |
-
|
3528 |
-
|
3529 |
-
|
3530 |
-
|
3531 |
-
|
3532 |
-
|
3533 |
-
|
3534 |
-
|
3535 |
-
|
3536 |
-
|
3537 |
-
|
3538 |
-
|
3539 |
-
|
3540 |
-
|
3541 |
-
|
3542 |
-
|
3543 |
-
|
3544 |
-
|
3545 |
-
|
3546 |
-
|
3547 |
-
|
3548 |
-
|
3549 |
-
|
3550 |
-
|
3551 |
-
|
3552 |
-
|
3553 |
-
|
3554 |
-
|
3555 |
-
|
3556 |
-
|
3557 |
-
|
3558 |
-
|
3559 |
-
|
3560 |
-
|
3561 |
-
|
3562 |
-
|
3563 |
-
|
3564 |
-
|
3565 |
-
|
3566 |
-
|
3567 |
-
|
3568 |
-
|
3569 |
-
|
3570 |
-
|
3571 |
-
|
3572 |
-
|
3573 |
-
|
3574 |
-
|
3575 |
-
|
3576 |
-
|
3577 |
-
|
3578 |
-
|
3579 |
-
|
3580 |
-
|
3581 |
-
|
3582 |
-
|
3583 |
-
|
3584 |
-
|
3585 |
-
|
3586 |
-
|
3587 |
-
|
3588 |
-
|
3589 |
-
|
3590 |
-
|
3591 |
-
|
3592 |
-
|
3593 |
-
|
3594 |
-
|
3595 |
-
|
3596 |
-
|
3597 |
-
|
3598 |
-
|
3599 |
-
|
3600 |
-
|
3601 |
-
|
3602 |
-
|
3603 |
-
|
3604 |
-
|
3605 |
-
|
3606 |
-
|
3607 |
-
|
3608 |
-
|
3609 |
-
|
3610 |
-
|
3611 |
-
|
3612 |
-
|
3613 |
-
|
3614 |
-
|
3615 |
-
|
3616 |
-
|
3617 |
-
|
3618 |
-
|
3619 |
-
|
3620 |
-
|
3621 |
-
|
3622 |
-
|
3623 |
-
|
3624 |
-
|
3625 |
-
|
3626 |
-
|
3627 |
-
|
3628 |
-
|
3629 |
-
|
3630 |
-
|
3631 |
-
|
3632 |
-
|
3633 |
-
|
3634 |
-
|
3635 |
-
|
3636 |
-
|
3637 |
-
|
3638 |
-
|
3639 |
-
|
3640 |
-
|
3641 |
-
|
3642 |
-
|
3643 |
-
|
3644 |
-
|
3645 |
-
|
3646 |
-
|
3647 |
-
|
3648 |
-
|
3649 |
-
|
3650 |
-
|
3651 |
-
|
3652 |
-
|
3653 |
-
|
3654 |
-
|
3655 |
-
|
3656 |
-
|
3657 |
-
|
3658 |
-
|
3659 |
-
|
3660 |
-
|
3661 |
-
|
3662 |
-
|
3663 |
-
|
3664 |
-
|
3665 |
-
|
3666 |
-
|
3667 |
-
|
3668 |
-
|
3669 |
-
|
3670 |
-
|
3671 |
-
|
3672 |
-
|
3673 |
-
|
3674 |
-
|
3675 |
-
|
3676 |
-
|
3677 |
-
|
3678 |
-
|
3679 |
-
|
3680 |
-
|
3681 |
-
|
3682 |
-
|
3683 |
-
|
3684 |
-
|
3685 |
-
|
3686 |
-
|
3687 |
-
|
3688 |
-
|
3689 |
-
|
3690 |
-
|
3691 |
-
|
3692 |
-
|
3693 |
-
|
3694 |
-
|
3695 |
-
|
3696 |
-
|
3697 |
-
|
3698 |
-
|
3699 |
-
|
3700 |
-
|
3701 |
-
|
3702 |
-
?>
|
3703 |
-
|
3704 |
-
|
3705 |
-
|
3706 |
-
|
3707 |
-
|
3708 |
-
|
3709 |
-
|
3710 |
-
|
3711 |
-
|
3712 |
-
|
3713 |
-
|
3714 |
-
|
3715 |
-
|
3716 |
-
|
3717 |
-
|
3718 |
-
|
3719 |
-
|
3720 |
-
|
3721 |
-
|
3722 |
-
|
3723 |
-
|
3724 |
-
|
3725 |
-
|
3726 |
-
|
3727 |
-
|
3728 |
-
|
3729 |
-
|
3730 |
-
|
3731 |
-
|
3732 |
-
|
3733 |
-
|
3734 |
-
</
|
3735 |
-
|
3736 |
-
|
3737 |
-
|
3738 |
-
|
3739 |
-
|
3740 |
-
|
3741 |
-
|
3742 |
-
|
3743 |
-
|
3744 |
-
|
3745 |
-
|
3746 |
-
|
3747 |
-
|
3748 |
-
|
3749 |
-
|
3750 |
-
|
3751 |
-
|
3752 |
-
|
3753 |
-
|
3754 |
-
|
3755 |
-
|
3756 |
-
|
3757 |
-
|
3758 |
-
|
3759 |
-
|
3760 |
-
|
3761 |
-
|
3762 |
-
|
3763 |
-
|
3764 |
-
|
3765 |
-
|
3766 |
-
|
3767 |
-
|
3768 |
-
|
3769 |
-
|
3770 |
-
|
3771 |
-
|
3772 |
-
|
3773 |
-
|
3774 |
-
|
3775 |
-
|
3776 |
-
|
3777 |
-
|
3778 |
-
|
3779 |
-
|
3780 |
-
|
3781 |
-
|
3782 |
-
|
3783 |
-
|
3784 |
-
|
3785 |
-
|
3786 |
-
|
3787 |
-
|
3788 |
-
|
3789 |
-
|
3790 |
-
|
3791 |
-
|
3792 |
-
|
3793 |
-
|
3794 |
-
|
3795 |
-
|
3796 |
-
|
3797 |
-
|
3798 |
-
|
3799 |
-
|
3800 |
-
|
3801 |
-
|
3802 |
-
|
3803 |
-
|
3804 |
-
|
3805 |
-
|
3806 |
-
|
3807 |
-
|
3808 |
-
|
3809 |
-
|
3810 |
-
|
3811 |
-
|
3812 |
-
|
3813 |
-
|
3814 |
-
|
3815 |
-
|
3816 |
-
|
3817 |
-
|
3818 |
-
|
3819 |
-
|
3820 |
-
|
3821 |
-
|
3822 |
-
|
3823 |
-
|
3824 |
-
|
3825 |
-
|
3826 |
-
|
3827 |
-
|
3828 |
-
|
3829 |
-
|
3830 |
-
|
3831 |
-
|
3832 |
-
|
3833 |
-
|
3834 |
-
|
3835 |
-
|
3836 |
-
|
3837 |
-
|
3838 |
-
|
3839 |
-
|
3840 |
-
|
3841 |
-
|
3842 |
-
|
3843 |
-
|
3844 |
-
|
3845 |
-
|
3846 |
-
|
3847 |
-
|
3848 |
-
|
3849 |
-
|
3850 |
-
|
3851 |
-
|
3852 |
-
|
3853 |
-
|
3854 |
-
|
3855 |
-
|
3856 |
-
|
3857 |
-
|
3858 |
-
|
3859 |
-
|
3860 |
-
|
3861 |
-
|
3862 |
-
|
3863 |
-
|
3864 |
-
|
3865 |
-
|
3866 |
-
|
3867 |
-
|
3868 |
-
|
3869 |
-
|
3870 |
-
|
3871 |
-
|
3872 |
-
|
3873 |
-
|
3874 |
-
|
3875 |
-
|
3876 |
-
|
3877 |
-
|
3878 |
-
|
3879 |
-
|
3880 |
-
|
3881 |
-
|
3882 |
-
|
3883 |
-
|
3884 |
-
|
3885 |
-
|
3886 |
-
|
3887 |
-
|
3888 |
-
|
3889 |
-
|
3890 |
-
|
3891 |
-
|
3892 |
-
|
3893 |
-
|
3894 |
-
|
3895 |
-
|
3896 |
-
|
3897 |
-
<
|
3898 |
-
|
3899 |
-
|
3900 |
-
|
3901 |
-
|
3902 |
-
|
3903 |
-
|
3904 |
-
|
3905 |
-
|
3906 |
-
|
3907 |
-
|
3908 |
-
|
3909 |
-
|
3910 |
-
|
3911 |
-
|
3912 |
-
|
3913 |
-
|
3914 |
-
|
3915 |
-
|
3916 |
-
|
3917 |
-
|
3918 |
-
|
3919 |
-
|
3920 |
-
|
3921 |
-
|
3922 |
-
|
3923 |
-
|
3924 |
-
|
3925 |
-
|
3926 |
-
|
3927 |
-
|
3928 |
-
|
3929 |
-
|
3930 |
-
|
3931 |
-
|
3932 |
-
|
3933 |
-
|
3934 |
-
|
3935 |
-
|
3936 |
-
|
3937 |
-
|
3938 |
-
|
3939 |
-
|
3940 |
-
|
3941 |
-
|
3942 |
-
|
3943 |
-
|
3944 |
-
|
3945 |
-
|
3946 |
-
|
3947 |
-
|
3948 |
-
|
3949 |
-
|
3950 |
-
|
3951 |
-
|
3952 |
-
|
3953 |
-
|
3954 |
-
|
3955 |
-
|
3956 |
-
|
3957 |
-
|
3958 |
-
|
3959 |
-
|
3960 |
-
|
3961 |
-
|
3962 |
-
|
3963 |
-
|
3964 |
-
|
3965 |
-
|
3966 |
-
|
3967 |
-
|
3968 |
-
|
3969 |
-
|
3970 |
-
|
3971 |
-
|
3972 |
-
|
3973 |
-
|
3974 |
-
|
3975 |
-
|
3976 |
-
|
3977 |
-
|
3978 |
-
|
3979 |
-
|
3980 |
-
|
3981 |
-
|
3982 |
-
|
3983 |
-
|
3984 |
-
|
3985 |
-
|
3986 |
-
|
3987 |
-
|
3988 |
-
|
3989 |
-
|
3990 |
-
|
3991 |
-
|
3992 |
-
|
3993 |
-
|
3994 |
-
|
3995 |
-
|
3996 |
-
|
3997 |
-
|
3998 |
-
</select> <?php _e( 'Block repeat voters', 'polldaddy' ); ?>
|
3999 |
-
</label>
|
4000 |
-
<br />
|
4001 |
-
<label for="blockExpiration">
|
4002 |
-
<select id="blockExpiration" name="blockExpiration">
|
4003 |
-
<option value="0" <?php echo $poll->blockExpiration == 0 ? 'selected="selected"':''; ?>><?php _e('Never', 'polldaddy'); ?></option>
|
4004 |
-
<option value="3600" <?php echo $poll->blockExpiration == 3600 ? 'selected="selected"':''; ?>><?php printf( __('%d hour', 'polldaddy'), 1 ); ?></option>
|
4005 |
-
<option value="10800" <?php echo (int) $poll->blockExpiration == 10800 ? 'selected="selected"' : ''; ?>><?php printf( __('%d hours', 'polldaddy'), 3 ); ?></option>
|
4006 |
-
<option value="21600" <?php echo (int) $poll->blockExpiration == 21600 ? 'selected="selected"' : ''; ?>><?php printf( __('%d hours', 'polldaddy'), 6 ); ?></option>
|
4007 |
-
<option value="43200" <?php echo (int) $poll->blockExpiration == 43200 ? 'selected="selected"' : ''; ?>><?php printf( __('%d hours', 'polldaddy'), 12 ); ?></option>
|
4008 |
-
<option value="86400" <?php echo (int) $poll->blockExpiration == 86400 ? 'selected="selected"' : ''; ?>><?php printf( __('%d day', 'polldaddy'), 1 ); ?></option>
|
4009 |
-
<option value="604800" <?php echo (int) $poll->blockExpiration == 604800 ? 'selected="selected"' : ''; ?>><?php printf( __('%d week', 'polldaddy'), 1 ); ?></option>
|
4010 |
-
<option value="2419200" <?php echo (int) $poll->blockExpiration == 2419200 ? 'selected="selected"' : ''; ?>><?php printf( __('%d month', 'polldaddy'), 1 ); ?></option>
|
4011 |
-
</select> <?php _e( 'Block expiration limit', 'polldaddy' ); ?>
|
4012 |
-
</label>
|
4013 |
-
<br />
|
4014 |
-
</fieldset>
|
4015 |
-
</td>
|
4016 |
-
</tr>
|
4017 |
-
<?php $this->plugin_options_add(); ?>
|
4018 |
-
</tbody>
|
4019 |
-
</table>
|
4020 |
-
<p class="submit">
|
4021 |
-
<?php wp_nonce_field( 'polldaddy-account' ); ?>
|
4022 |
-
<input type="hidden" name="action" value="update-options" />
|
4023 |
-
<input type="submit" value="<?php echo attribute_escape( __( 'Save Options', 'polldaddy' ) ); ?>" />
|
4024 |
-
</p>
|
4025 |
-
</form>
|
4026 |
-
</div>
|
4027 |
-
<?php
|
4028 |
-
}
|
4029 |
-
|
4030 |
-
function plugin_options_add(){}
|
4031 |
-
|
4032 |
-
function round($number, $increments) {
|
4033 |
-
$increments = 1 / $increments;
|
4034 |
-
return ( round ( $number * $increments ) / $increments );
|
4035 |
-
}
|
4036 |
-
|
4037 |
-
function signup() {
|
4038 |
-
return $this->api_key_page();
|
4039 |
-
}
|
4040 |
-
|
4041 |
-
function can_edit( &$poll ) {
|
4042 |
-
if ( empty( $poll->_owner ) )
|
4043 |
-
return true;
|
4044 |
-
|
4045 |
-
if ( $this->id == $poll->_owner )
|
4046 |
-
return true;
|
4047 |
-
|
4048 |
-
return (bool) current_user_can( 'edit_others_posts' );
|
4049 |
-
}
|
4050 |
-
}
|
4051 |
-
|
4052 |
-
require 'rating.php';
|
4053 |
-
require 'polldaddy-org.php';
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
Plugin Name: PollDaddy Polls
|
5 |
+
Description: Create and manage PollDaddy polls and ratings in WordPress
|
6 |
+
Author: Automattic, Inc.
|
7 |
+
Author URL: http://automattic.com/
|
8 |
+
Version: 1.8.0
|
9 |
+
*/
|
10 |
+
|
11 |
+
// You can hardcode your PollDaddy PartnerGUID (API Key) here
|
12 |
+
//define( 'WP_POLLDADDY__PARTNERGUID', '12345...' );
|
13 |
+
|
14 |
+
class WP_PollDaddy {
|
15 |
+
var $errors;
|
16 |
+
var $base_url;
|
17 |
+
var $is_admin;
|
18 |
+
var $is_author;
|
19 |
+
var $scheme;
|
20 |
+
var $version;
|
21 |
+
var $polldaddy_client_class;
|
22 |
+
var $polldaddy_clients;
|
23 |
+
var $id;
|
24 |
+
var $multiple_accounts;
|
25 |
+
var $user_code;
|
26 |
+
var $rating_user_code;
|
27 |
+
|
28 |
+
function WP_PollDaddy(){
|
29 |
+
$this ->__construct();
|
30 |
+
}
|
31 |
+
|
32 |
+
function __construct() {
|
33 |
+
global $current_user;
|
34 |
+
$this->errors = new WP_Error;
|
35 |
+
$this->scheme = 'https';
|
36 |
+
$this->version = '1.8.0';
|
37 |
+
$this->multiple_accounts = true;
|
38 |
+
$this->polldaddy_client_class = 'api_client';
|
39 |
+
$this->polldaddy_clients = array();
|
40 |
+
$this->is_admin = (bool) current_user_can('manage_options');
|
41 |
+
$this->is_author = true;
|
42 |
+
$this->id = (int) $current_user->ID;
|
43 |
+
$this->user_code = null;
|
44 |
+
$this->rating_user_code = null;
|
45 |
+
}
|
46 |
+
|
47 |
+
function &get_client( $api_key, $userCode = null ) {
|
48 |
+
if ( isset( $this->polldaddy_clients[$api_key] ) ) {
|
49 |
+
if ( !is_null( $userCode ) )
|
50 |
+
$this->polldaddy_clients[$api_key]->userCode = $userCode;
|
51 |
+
return $this->polldaddy_clients[$api_key];
|
52 |
+
}
|
53 |
+
require_once WP_POLLDADDY__POLLDADDY_CLIENT_PATH;
|
54 |
+
$this->polldaddy_clients[$api_key] = new $this->polldaddy_client_class( $api_key, $userCode );
|
55 |
+
return $this->polldaddy_clients[$api_key];
|
56 |
+
}
|
57 |
+
|
58 |
+
function admin_menu() {
|
59 |
+
if ( !defined( 'WP_POLLDADDY__PARTNERGUID' ) ) {
|
60 |
+
$guid = get_option( 'polldaddy_api_key' );
|
61 |
+
if ( !$guid || !is_string( $guid ) )
|
62 |
+
$guid = false;
|
63 |
+
define( 'WP_POLLDADDY__PARTNERGUID', $guid );
|
64 |
+
}
|
65 |
+
|
66 |
+
if ( !WP_POLLDADDY__PARTNERGUID ) {
|
67 |
+
if ( function_exists( 'add_object_page' ) ) // WP 2.7+
|
68 |
+
$hook = add_object_page( __( 'Ratings', 'polldaddy' ), __( 'Ratings', 'polldaddy' ), 'edit_posts', 'ratings', array( &$this, 'api_key_page' ), "{$this->base_url}polldaddy.png" );
|
69 |
+
else
|
70 |
+
$hook = add_management_page( __( 'Ratings', 'polldaddy' ), __( 'Ratings', 'polldaddy' ), 'edit_posts', 'ratings', array( &$this, 'api_key_page' ) );
|
71 |
+
|
72 |
+
add_action( "load-$hook", array( &$this, 'api_key_page_load' ) );
|
73 |
+
|
74 |
+
if ( function_exists( 'add_object_page' ) ) // WP 2.7+
|
75 |
+
$hook = add_object_page( __( 'Polls', 'polldaddy' ), __( 'Polls', 'polldaddy' ), 'edit_posts', 'polls', array( &$this, 'api_key_page' ), "{$this->base_url}polldaddy.png" );
|
76 |
+
else
|
77 |
+
$hook = add_management_page( __( 'Polls', 'polldaddy' ), __( 'Polls', 'polldaddy' ), 'edit_posts', 'polls', array( &$this, 'api_key_page' ) );
|
78 |
+
|
79 |
+
add_action( "load-$hook", array( &$this, 'api_key_page_load' ) );
|
80 |
+
if ( ( empty( $_GET['page'] ) || 'polls' != $_GET['page'] ) && ( empty( $_GET['page'] ) || 'ratings' != $_GET['page'] ) )
|
81 |
+
add_action( 'admin_notices', create_function( '', 'echo "<div class=\"error\"><p>" . sprintf( "You need to <a href=\"%s\">input your PollDaddy.com account details</a>.", "edit.php?page=polls" ) . "</p></div>";' ) );
|
82 |
+
return false;
|
83 |
+
}
|
84 |
+
|
85 |
+
if ( function_exists( 'add_object_page' ) ) // WP 2.7+
|
86 |
+
$hook = add_object_page( __( 'Ratings', 'polldaddy' ), __( 'Ratings', 'polldaddy' ), 'edit_posts', 'ratings', array( &$this, 'management_page' ), "{$this->base_url}polldaddy.png" );
|
87 |
+
else
|
88 |
+
$hook = add_management_page( __( 'Ratings', 'polldaddy' ), __( 'Ratings', 'polldaddy' ), 'edit_posts', 'ratings', array( &$this, 'management_page' ) );
|
89 |
+
|
90 |
+
add_action( "load-$hook", array( &$this, 'management_page_load' ) );
|
91 |
+
|
92 |
+
if ( function_exists( 'add_object_page' ) ) // WP 2.7+
|
93 |
+
$hook = add_object_page( __( 'Polls', 'polldaddy' ), __( 'Polls', 'polldaddy' ), 'edit_posts', 'polls', array( &$this, 'management_page' ), "{$this->base_url}polldaddy.png" );
|
94 |
+
else
|
95 |
+
$hook = add_management_page( __( 'Polls', 'polldaddy' ), __( 'Polls', 'polldaddy' ), 'edit_posts', 'polls', array( &$this, 'management_page' ) );
|
96 |
+
|
97 |
+
add_action( "load-$hook", array( &$this, 'management_page_load' ) );
|
98 |
+
|
99 |
+
if ( $this->is_admin ) {
|
100 |
+
add_submenu_page( 'ratings', __( 'Ratings – Settings', 'polldaddy' ), __( 'Settings', 'polldaddy' ), 'edit_posts', 'ratings', array( &$this, 'management_page' ) );
|
101 |
+
add_submenu_page( 'ratings', __( 'Ratings – Reports', 'polldaddy' ), __( 'Reports', 'polldaddy' ), 'edit_posts', 'ratings&action=reports', array( &$this, 'management_page' ) );
|
102 |
+
}
|
103 |
+
else{
|
104 |
+
add_submenu_page( 'ratings', __( 'Ratings – Reports', 'polldaddy' ), __( 'Reports', 'polldaddy' ), 'edit_posts', 'ratings', array( &$this, 'management_page' ) );
|
105 |
+
}
|
106 |
+
|
107 |
+
add_submenu_page( 'polls', __( 'Polls', 'polldaddy' ), __( 'Edit', 'polldaddy' ), 'edit_posts', 'polls', array( &$this, 'management_page' ) );
|
108 |
+
|
109 |
+
if ( $this->is_author ) {
|
110 |
+
add_submenu_page( 'polls', __( 'Add New Poll', 'polldaddy' ), __( 'Add New', 'polldaddy' ), 'edit_posts', 'polls&action=create-poll', array( &$this, 'management_page' ) );
|
111 |
+
add_submenu_page( 'polls', __( 'Custom Styles', 'polldaddy' ), __( 'Custom Styles', 'polldaddy' ), 'edit_posts', 'polls&action=list-styles', array( &$this, 'management_page' ) );
|
112 |
+
add_submenu_page( 'polls', __( 'Options', 'polldaddy' ), __( 'Options', 'polldaddy' ), 'edit_posts', 'polls&action=options', array( &$this, 'management_page' ) );
|
113 |
+
}
|
114 |
+
|
115 |
+
add_action( 'media_buttons', array( &$this, 'media_buttons' ) );
|
116 |
+
}
|
117 |
+
|
118 |
+
function api_key_page_load() {
|
119 |
+
if ( 'post' != strtolower( $_SERVER['REQUEST_METHOD'] ) || empty( $_POST['action'] ) || 'account' != $_POST['action'] )
|
120 |
+
return false;
|
121 |
+
|
122 |
+
check_admin_referer( 'polldaddy-account' );
|
123 |
+
|
124 |
+
$polldaddy_email = stripslashes( $_POST['polldaddy_email'] );
|
125 |
+
$polldaddy_password = stripslashes( $_POST['polldaddy_password'] );
|
126 |
+
|
127 |
+
if ( !$polldaddy_email )
|
128 |
+
$this->errors->add( 'polldaddy_email', __( 'Email address required', 'polldaddy' ) );
|
129 |
+
|
130 |
+
if ( !$polldaddy_password )
|
131 |
+
$this->errors->add( 'polldaddy_password', __( 'Password required', 'polldaddy' ) );
|
132 |
+
|
133 |
+
if ( $this->errors->get_error_codes() )
|
134 |
+
return false;
|
135 |
+
|
136 |
+
$details = array(
|
137 |
+
'uName' => get_bloginfo( 'name' ),
|
138 |
+
'uEmail' => $polldaddy_email,
|
139 |
+
'uPass' => $polldaddy_password,
|
140 |
+
'partner_userid' => $this->id
|
141 |
+
);
|
142 |
+
if ( function_exists( 'wp_remote_post' ) ) { // WP 2.7+
|
143 |
+
$polldaddy_api_key = wp_remote_post( $this->scheme . '://api.polldaddy.com/key.php', array(
|
144 |
+
'body' => $details
|
145 |
+
) );
|
146 |
+
if ( is_wp_error( $polldaddy_api_key ) ) {
|
147 |
+
$this->errors = $polldaddy_api_key;
|
148 |
+
return false;
|
149 |
+
}
|
150 |
+
$polldaddy_api_key = wp_remote_retrieve_body( $polldaddy_api_key );
|
151 |
+
} else {
|
152 |
+
$fp = fsockopen(
|
153 |
+
'api.polldaddy.com',
|
154 |
+
80,
|
155 |
+
$err_num,
|
156 |
+
$err_str,
|
157 |
+
3
|
158 |
+
);
|
159 |
+
|
160 |
+
if ( !$fp ) {
|
161 |
+
$this->errors->add( 'connect', __( "Can't connect to PollDaddy.com", 'polldaddy' ) );
|
162 |
+
return false;
|
163 |
+
}
|
164 |
+
|
165 |
+
if ( function_exists( 'stream_set_timeout' ) )
|
166 |
+
stream_set_timeout( $fp, 3 );
|
167 |
+
|
168 |
+
global $wp_version;
|
169 |
+
|
170 |
+
$request_body = http_build_query( $details, null, '&' );
|
171 |
+
|
172 |
+
$request = "POST /key.php HTTP/1.0\r\n";
|
173 |
+
$request .= "Host: api.polldaddy.com\r\n";
|
174 |
+
$request .= "User-agent: WordPress/$wp_version\r\n";
|
175 |
+
$request .= 'Content-Type: application/x-www-form-urlencoded; charset=' . get_option('blog_charset') . "\r\n";
|
176 |
+
$request .= 'Content-Length: ' . strlen( $request_body ) . "\r\n";
|
177 |
+
|
178 |
+
fwrite( $fp, "$request\r\n$request_body" );
|
179 |
+
|
180 |
+
$response = '';
|
181 |
+
while ( !feof( $fp ) )
|
182 |
+
$response .= fread( $fp, 4096 );
|
183 |
+
fclose( $fp );
|
184 |
+
list($headers, $polldaddy_api_key) = explode( "\r\n\r\n", $response, 2 );
|
185 |
+
}
|
186 |
+
|
187 |
+
if ( !$polldaddy_api_key ) {
|
188 |
+
$this->errors->add( 'polldaddy_password', __( 'Invalid Account', 'polldaddy' ) );
|
189 |
+
return false;
|
190 |
+
}
|
191 |
+
|
192 |
+
update_option( 'polldaddy_api_key', $polldaddy_api_key );
|
193 |
+
|
194 |
+
$polldaddy = $this->get_client( $polldaddy_api_key );
|
195 |
+
$polldaddy->reset();
|
196 |
+
if ( !$polldaddy->get_usercode( $this->id ) ) {
|
197 |
+
$this->parse_errors( $polldaddy );
|
198 |
+
$this->errors->add( 'GetUserCode', __( 'Account could not be accessed. Are your email address and password correct?', 'polldaddy' ) );
|
199 |
+
return false;
|
200 |
+
}
|
201 |
+
|
202 |
+
return true;
|
203 |
+
}
|
204 |
+
|
205 |
+
function parse_errors( &$polldaddy ) {
|
206 |
+
if ( $polldaddy->errors )
|
207 |
+
foreach ( $polldaddy->errors as $code => $error )
|
208 |
+
$this->errors->add( $code, $error );
|
209 |
+
if ( isset( $this->errors->errors[4] ) ) {
|
210 |
+
$this->errors->errors[4] = array( sprintf( __( 'Obsolete PollDaddy User API Key: <a href="%s">Sign in again to re-authenticate</a>', 'polldaddy' ), add_query_arg( array( 'action' => 'signup', 'reaction' => empty( $_GET['action'] ) ? false : $_GET['action'] ) ) ) );
|
211 |
+
$this->errors->add_data( true, 4 );
|
212 |
+
}
|
213 |
+
}
|
214 |
+
|
215 |
+
function print_errors() {
|
216 |
+
if ( !$error_codes = $this->errors->get_error_codes() )
|
217 |
+
return;
|
218 |
+
?>
|
219 |
+
|
220 |
+
<div class="error">
|
221 |
+
|
222 |
+
<?php
|
223 |
+
|
224 |
+
foreach ( $error_codes as $error_code ) :
|
225 |
+
foreach ( $this->errors->get_error_messages( $error_code ) as $error_message ) :
|
226 |
+
?>
|
227 |
+
|
228 |
+
<p><?php echo $this->errors->get_error_data( $error_code ) ? $error_message : wp_specialchars( $error_message ); ?></p>
|
229 |
+
|
230 |
+
<?php
|
231 |
+
endforeach;
|
232 |
+
endforeach;
|
233 |
+
|
234 |
+
$this->errors = new WP_Error;
|
235 |
+
?>
|
236 |
+
|
237 |
+
</div>
|
238 |
+
<br class="clear" />
|
239 |
+
|
240 |
+
<?php
|
241 |
+
}
|
242 |
+
|
243 |
+
function api_key_page() {
|
244 |
+
$this->print_errors();
|
245 |
+
?>
|
246 |
+
|
247 |
+
<div class="wrap">
|
248 |
+
|
249 |
+
<h2><?php _e( 'PollDaddy Account', 'polldaddy' ); ?></h2>
|
250 |
+
|
251 |
+
<p><?php printf( __( 'Before you can use the PollDaddy plugin, you need to enter your <a href="%s">PollDaddy.com</a> account details.', 'polldaddy' ), 'http://polldaddy.com/' ); ?></p>
|
252 |
+
|
253 |
+
<form action="" method="post">
|
254 |
+
<table class="form-table">
|
255 |
+
<tbody>
|
256 |
+
<tr class="form-field form-required">
|
257 |
+
<th valign="top" scope="row">
|
258 |
+
<label for="polldaddy-email"><?php _e( 'PollDaddy Email Address', 'polldaddy' ); ?></label>
|
259 |
+
</th>
|
260 |
+
<td>
|
261 |
+
<input type="text" name="polldaddy_email" id="polldaddy-email" aria-required="true" size="40" />
|
262 |
+
</td>
|
263 |
+
</tr>
|
264 |
+
<tr class="form-field form-required">
|
265 |
+
<th valign="top" scope="row">
|
266 |
+
<label for="polldaddy-password"><?php _e( 'PollDaddy Password', 'polldaddy' ); ?></label>
|
267 |
+
</th>
|
268 |
+
<td>
|
269 |
+
<input type="password" name="polldaddy_password" id="polldaddy-password" aria-required="true" size="40" />
|
270 |
+
</td>
|
271 |
+
</tr>
|
272 |
+
</tbody>
|
273 |
+
</table>
|
274 |
+
<p class="submit">
|
275 |
+
<?php wp_nonce_field( 'polldaddy-account' ); ?>
|
276 |
+
<input type="hidden" name="action" value="account" />
|
277 |
+
<input type="hidden" name="account" value="import" />
|
278 |
+
<input type="submit" value="<?php echo attribute_escape( __( 'Submit', 'polldaddy' ) ); ?>" />
|
279 |
+
</p>
|
280 |
+
</form>
|
281 |
+
</div>
|
282 |
+
|
283 |
+
<?php
|
284 |
+
}
|
285 |
+
|
286 |
+
function media_buttons() {
|
287 |
+
$title = __( 'Add Poll', 'polldaddy' );
|
288 |
+
echo "<a href='admin.php?page=polls&iframe&TB_iframe=true' onclick='return false;' id='add_poll' class='thickbox' title='$title'><img src='{$this->base_url}polldaddy.png' alt='$title' /></a>";
|
289 |
+
}
|
290 |
+
|
291 |
+
function set_api_user_code(){
|
292 |
+
$polldaddy = $this->get_client( WP_POLLDADDY__PARTNERGUID );
|
293 |
+
$polldaddy->reset();
|
294 |
+
|
295 |
+
if ( empty( $this->user_code ) ){
|
296 |
+
$this->user_code = $polldaddy->get_usercode( $this->id );
|
297 |
+
}
|
298 |
+
}
|
299 |
+
|
300 |
+
function management_page_load() {
|
301 |
+
wp_reset_vars( array( 'page', 'action', 'poll', 'style', 'rating' ) );
|
302 |
+
global $plugin_page, $page, $action, $poll, $style, $rating, $wp_locale;
|
303 |
+
|
304 |
+
$this->set_api_user_code();
|
305 |
+
|
306 |
+
if ( empty( $this->user_code ) && $page == 'polls' ){
|
307 |
+
$action = 'signup';
|
308 |
+
}
|
309 |
+
|
310 |
+
require_once WP_POLLDADDY__POLLDADDY_CLIENT_PATH;
|
311 |
+
|
312 |
+
wp_enqueue_script( 'polls', "{$this->base_url}polldaddy.js", array( 'jquery', 'jquery-ui-sortable' ), $this->version );
|
313 |
+
wp_enqueue_script( 'polls-common', "{$this->base_url}common.js", array(), $this->version );
|
314 |
+
|
315 |
+
if( $page == 'polls' ) {
|
316 |
+
if ( !$this->is_author && in_array( $action, array( 'edit', 'edit-poll', 'create-poll', 'edit-style', 'create-style', 'list-styles', 'options', 'update-options', 'import-account' ) ) ) {//check user privileges has access to action
|
317 |
+
$action = '';
|
318 |
+
}
|
319 |
+
|
320 |
+
switch ( $action ) :
|
321 |
+
case 'edit' :
|
322 |
+
case 'edit-poll' :
|
323 |
+
case 'create-poll' :
|
324 |
+
wp_enqueue_script( 'polls-style', "http://i.polldaddy.com/js/poll-style-picker.js", array(), $this->version );
|
325 |
+
|
326 |
+
if ( $action == 'create-poll' )
|
327 |
+
$plugin_page = 'polls&action=create-poll';
|
328 |
+
|
329 |
+
break;
|
330 |
+
case 'edit-style' :
|
331 |
+
case 'create-style' :
|
332 |
+
wp_enqueue_script( 'polls-style', "http://i.polldaddy.com/js/style-editor.js", array(), $this->version );
|
333 |
+
wp_enqueue_script( 'polls-style-color', "http://i.polldaddy.com/js/jscolor.js", array(), $this->version );
|
334 |
+
wp_enqueue_style( 'polls', "{$this->base_url}style-editor.css", array(), $this->version );
|
335 |
+
break;
|
336 |
+
case 'list-styles' :
|
337 |
+
$plugin_page = 'polls&action=list-styles';
|
338 |
+
break;
|
339 |
+
case 'options' :
|
340 |
+
case 'update-options' :
|
341 |
+
case 'import-account' :
|
342 |
+
$plugin_page = 'polls&action=options';
|
343 |
+
break;
|
344 |
+
endswitch;
|
345 |
+
} elseif( $page == 'ratings' ) {
|
346 |
+
if ( !$this->is_admin && !in_array( $action, array( 'change-report', 'reports' ) ) ) {//check user privileges has access to action
|
347 |
+
$action = 'reports';
|
348 |
+
}
|
349 |
+
switch ( $action ) :
|
350 |
+
case 'change-report' :
|
351 |
+
case 'reports' :
|
352 |
+
$plugin_page = 'ratings&action=reports';
|
353 |
+
break;
|
354 |
+
default :
|
355 |
+
wp_enqueue_script( 'rating-text-color', "http://i.polldaddy.com/js/jscolor.js", array(), $this->version );
|
356 |
+
wp_enqueue_script( 'ratings', 'http://i.polldaddy.com/ratings/rating.js', array(), $this->version );
|
357 |
+
wp_localize_script( 'polls-common', 'adminRatingsL10n', array(
|
358 |
+
'star_colors' => __( 'Star Colors', 'polldaddy' ), 'star_size' => __( 'Star Size', 'polldaddy' ),
|
359 |
+
'nero_type' => __( 'Nero Type', 'polldaddy' ), 'nero_size' => __( 'Nero Size', 'polldaddy' ), ) );
|
360 |
+
endswitch;
|
361 |
+
}
|
362 |
+
|
363 |
+
wp_enqueue_script( 'admin-forms' );
|
364 |
+
add_thickbox();
|
365 |
+
|
366 |
+
wp_enqueue_style( 'polls', "{$this->base_url}polldaddy.css", array( 'global', 'wp-admin' ), $this->version );
|
367 |
+
if ( isset($wp_locale->text_direction) && 'rtl' == $wp_locale->text_direction )
|
368 |
+
wp_enqueue_style( 'polls-rtl', "{$this->base_url}polldaddy-rtl.css", array( 'global', 'wp-admin' ), $this->version );
|
369 |
+
add_action( 'admin_body_class', array( &$this, 'admin_body_class' ) );
|
370 |
+
|
371 |
+
add_action( 'admin_notices', array( &$this, 'management_page_notices' ) );
|
372 |
+
|
373 |
+
$query_args = array();
|
374 |
+
$args = array();
|
375 |
+
|
376 |
+
$allowedtags = array(
|
377 |
+
'a' => array(
|
378 |
+
'href' => array (),
|
379 |
+
'title' => array (),
|
380 |
+
'target' => array ()),
|
381 |
+
'img' => array(
|
382 |
+
'alt' => array (),
|
383 |
+
'align' => array (),
|
384 |
+
'border' => array (),
|
385 |
+
'class' => array (),
|
386 |
+
'height' => array (),
|
387 |
+
'hspace' => array (),
|
388 |
+
'longdesc' => array (),
|
389 |
+
'vspace' => array (),
|
390 |
+
'src' => array (),
|
391 |
+
'width' => array ()),
|
392 |
+
'abbr' => array(
|
393 |
+
'title' => array ()),
|
394 |
+
'acronym' => array(
|
395 |
+
'title' => array ()),
|
396 |
+
'b' => array(),
|
397 |
+
'blockquote' => array(
|
398 |
+
'cite' => array ()),
|
399 |
+
'cite' => array (),
|
400 |
+
'em' => array (),
|
401 |
+
'i' => array (),
|
402 |
+
'q' => array(
|
403 |
+
'cite' => array ()),
|
404 |
+
'strike' => array(),
|
405 |
+
'strong' => array()
|
406 |
+
);
|
407 |
+
|
408 |
+
$is_POST = 'post' == strtolower( $_SERVER['REQUEST_METHOD'] );
|
409 |
+
|
410 |
+
if( $page == 'polls' ) {
|
411 |
+
switch ( $action ) :
|
412 |
+
case 'signup' : // sign up for first time
|
413 |
+
case 'account' : // reauthenticate
|
414 |
+
case 'import-account' : // reauthenticate
|
415 |
+
if ( !$is_POST )
|
416 |
+
return;
|
417 |
+
|
418 |
+
check_admin_referer( 'polldaddy-account' );
|
419 |
+
|
420 |
+
if ( $new_args = $this->management_page_load_signup() )
|
421 |
+
$query_args = array_merge( $query_args, $new_args );
|
422 |
+
if ( $this->errors->get_error_codes() )
|
423 |
+
return false;
|
424 |
+
|
425 |
+
$query_args['message'] = 'imported-account';
|
426 |
+
|
427 |
+
wp_reset_vars( array( 'action' ) );
|
428 |
+
if ( !empty( $_GET['reaction'] ) )
|
429 |
+
$query_args['action'] = $_GET['reaction'];
|
430 |
+
elseif ( !empty( $_GET['action'] ) && 'account' == $_GET['action'] )
|
431 |
+
$query_args['action'] = $_GET['action'];
|
432 |
+
else
|
433 |
+
$query_args['action'] = false;
|
434 |
+
break;
|
435 |
+
|
436 |
+
case 'delete' :
|
437 |
+
if ( empty( $poll ) )
|
438 |
+
return;
|
439 |
+
|
440 |
+
if ( is_array( $poll ) )
|
441 |
+
check_admin_referer( 'action-poll_bulk' );
|
442 |
+
else
|
443 |
+
check_admin_referer( "delete-poll_$poll" );
|
444 |
+
|
445 |
+
$polldaddy = $this->get_client( WP_POLLDADDY__PARTNERGUID, $this->user_code );
|
446 |
+
|
447 |
+
foreach ( (array) $_REQUEST['poll'] as $poll_id ) {
|
448 |
+
$polldaddy->reset();
|
449 |
+
$poll_object = $polldaddy->get_poll( $poll );
|
450 |
+
|
451 |
+
if ( !$this->can_edit( $poll_object ) ) {
|
452 |
+
$this->errors->add( 'permission', __( 'You are not allowed to delete this poll.', 'polldaddy' ) );
|
453 |
+
return false;
|
454 |
+
}
|
455 |
+
|
456 |
+
// Send Poll Author credentials
|
457 |
+
if ( !empty( $poll_object->_owner ) && $this->id != $poll_object->_owner ) {
|
458 |
+
$polldaddy->reset();
|
459 |
+
if ( !$userCode = $polldaddy->get_usercode( $poll_object->_owner ) ) {
|
460 |
+
$this->errors->add( 'no_usercode', __( 'Invalid Poll Author', 'polldaddy' ) );
|
461 |
+
}
|
462 |
+
$polldaddy->userCode = $userCode;
|
463 |
+
}
|
464 |
+
|
465 |
+
$polldaddy->reset();
|
466 |
+
$polldaddy->delete_poll( $poll_id );
|
467 |
+
}
|
468 |
+
|
469 |
+
$query_args['message'] = 'deleted';
|
470 |
+
$query_args['deleted'] = count( (array) $poll );
|
471 |
+
break;
|
472 |
+
case 'open' :
|
473 |
+
if ( empty( $poll ) )
|
474 |
+
return;
|
475 |
+
|
476 |
+
if ( is_array( $poll ) )
|
477 |
+
check_admin_referer( 'action-poll_bulk' );
|
478 |
+
else
|
479 |
+
check_admin_referer( "open-poll_$poll" );
|
480 |
+
|
481 |
+
$polldaddy = $this->get_client( WP_POLLDADDY__PARTNERGUID, $this->user_code );
|
482 |
+
|
483 |
+
foreach ( (array) $_REQUEST['poll'] as $poll_id ) {
|
484 |
+
$polldaddy->reset();
|
485 |
+
$poll_object = $polldaddy->get_poll( $poll );
|
486 |
+
|
487 |
+
if ( !$this->can_edit( $poll_object ) ) {
|
488 |
+
$this->errors->add( 'permission', __( 'You are not allowed to open this poll.', 'polldaddy' ) );
|
489 |
+
return false;
|
490 |
+
}
|
491 |
+
|
492 |
+
// Send Poll Author credentials
|
493 |
+
if ( !empty( $poll_object->_owner ) && $this->id != $poll_object->_owner ) {
|
494 |
+
$polldaddy->reset();
|
495 |
+
if ( !$userCode = $polldaddy->get_usercode( $poll_object->_owner ) ) {
|
496 |
+
$this->errors->add( 'no_usercode', __( 'Invalid Poll Author', 'polldaddy' ) );
|
497 |
+
}
|
498 |
+
$polldaddy->userCode = $userCode;
|
499 |
+
}
|
500 |
+
|
501 |
+
$polldaddy->reset();
|
502 |
+
$polldaddy->open_poll( $poll_id );
|
503 |
+
}
|
504 |
+
|
505 |
+
$query_args['message'] = 'opened';
|
506 |
+
$query_args['opened'] = count( (array) $poll );
|
507 |
+
break;
|
508 |
+
case 'close' :
|
509 |
+
if ( empty( $poll ) )
|
510 |
+
return;
|
511 |
+
|
512 |
+
if ( is_array( $poll ) )
|
513 |
+
check_admin_referer( 'action-poll_bulk' );
|
514 |
+
else
|
515 |
+
check_admin_referer( "close-poll_$poll" );
|
516 |
+
|
517 |
+
$polldaddy = $this->get_client( WP_POLLDADDY__PARTNERGUID, $this->user_code );
|
518 |
+
|
519 |
+
foreach ( (array) $_REQUEST['poll'] as $poll_id ) {
|
520 |
+
$polldaddy->reset();
|
521 |
+
$poll_object = $polldaddy->get_poll( $poll );
|
522 |
+
|
523 |
+
if ( !$this->can_edit( $poll_object ) ) {
|
524 |
+
$this->errors->add( 'permission', __( 'You are not allowed to close this poll.', 'polldaddy' ) );
|
525 |
+
return false;
|
526 |
+
}
|
527 |
+
|
528 |
+
// Send Poll Author credentials
|
529 |
+
if ( !empty( $poll_object->_owner ) && $this->id != $poll_object->_owner ) {
|
530 |
+
$polldaddy->reset();
|
531 |
+
if ( !$userCode = $polldaddy->get_usercode( $poll_object->_owner ) ) {
|
532 |
+
$this->errors->add( 'no_usercode', __( 'Invalid Poll Author', 'polldaddy' ) );
|
533 |
+
}
|
534 |
+
$polldaddy->userCode = $userCode;
|
535 |
+
}
|
536 |
+
|
537 |
+
$polldaddy->reset();
|
538 |
+
$polldaddy->close_poll( $poll_id );
|
539 |
+
}
|
540 |
+
|
541 |
+
$query_args['message'] = 'closed';
|
542 |
+
$query_args['closed'] = count( (array) $poll );
|
543 |
+
break;
|
544 |
+
case 'edit-poll' : // TODO: use polldaddy_poll
|
545 |
+
if ( !$is_POST || !$poll = (int) $poll )
|
546 |
+
return;
|
547 |
+
|
548 |
+
check_admin_referer( "edit-poll_$poll" );
|
549 |
+
|
550 |
+
$polldaddy = $this->get_client( WP_POLLDADDY__PARTNERGUID, $this->user_code );
|
551 |
+
$polldaddy->reset();
|
552 |
+
|
553 |
+
$poll_object = $polldaddy->get_poll( $poll );
|
554 |
+
$this->parse_errors( $polldaddy );
|
555 |
+
|
556 |
+
if ( !$this->can_edit( $poll_object ) ) {
|
557 |
+
$this->errors->add( 'permission', __( 'You are not allowed to edit this poll.', 'polldaddy' ) );
|
558 |
+
return false;
|
559 |
+
}
|
560 |
+
|
561 |
+
// Send Poll Author credentials
|
562 |
+
|
563 |
+
if ( !empty( $poll_object->_owner ) && $this->id != $poll_object->_owner ) {
|
564 |
+
$polldaddy->reset();
|
565 |
+
if ( !$userCode = $polldaddy->get_usercode( $poll_object->_owner ) ) {
|
566 |
+
$this->errors->add( 'no_usercode', __( 'Invalid Poll Author', 'polldaddy' ) );
|
567 |
+
}
|
568 |
+
$this->parse_errors( $polldaddy );
|
569 |
+
$polldaddy->userCode = $userCode;
|
570 |
+
}
|
571 |
+
|
572 |
+
if ( !$poll_object )
|
573 |
+
$this->errors->add( 'GetPoll', __( 'Poll not found', 'polldaddy' ) );
|
574 |
+
|
575 |
+
if ( $this->errors->get_error_codes() )
|
576 |
+
return false;
|
577 |
+
|
578 |
+
$poll_data = get_object_vars( $poll_object );
|
579 |
+
foreach ( $poll_data as $key => $value )
|
580 |
+
if ( '_' === $key[0] )
|
581 |
+
unset( $poll_data[$key] );
|
582 |
+
|
583 |
+
foreach ( array( 'multipleChoice', 'randomiseAnswers', 'otherAnswer', 'sharing' ) as $option ) {
|
584 |
+
if ( isset( $_POST[$option] ) && $_POST[$option] )
|
585 |
+
$poll_data[$option] = 'yes';
|
586 |
+
else
|
587 |
+
$poll_data[$option] = 'no';
|
588 |
+
}
|
589 |
+
|
590 |
+
$blocks = array( 'off', 'cookie', 'cookieip' );
|
591 |
+
if ( isset( $_POST['blockRepeatVotersType'] ) && in_array( $_POST['blockRepeatVotersType'], $blocks ) )
|
592 |
+
$poll_data['blockRepeatVotersType'] = $_POST['blockRepeatVotersType'];
|
593 |
+
|
594 |
+
$results = array( 'show', 'percent', 'hide' );
|
595 |
+
if ( isset( $_POST['resultsType'] ) && in_array( $_POST['resultsType'], $results ) )
|
596 |
+
$poll_data['resultsType'] = $_POST['resultsType'];
|
597 |
+
$poll_data['question'] = stripslashes( $_POST['question'] );
|
598 |
+
|
599 |
+
if ( empty( $_POST['answer'] ) || !is_array( $_POST['answer'] ) )
|
600 |
+
$this->errors->add( 'answer', __( 'Invalid answers', 'polldaddy' ) );
|
601 |
+
|
602 |
+
$answers = array();
|
603 |
+
foreach ( $_POST['answer'] as $answer_id => $answer ) {
|
604 |
+
if ( !$answer = trim( stripslashes( $answer ) ) )
|
605 |
+
continue;
|
606 |
+
|
607 |
+
$args['text'] = wp_kses( $answer, $allowedtags );
|
608 |
+
|
609 |
+
if ( is_numeric( $answer_id ) )
|
610 |
+
$answers[] = polldaddy_poll_answer( $args, $answer_id );
|
611 |
+
else
|
612 |
+
$answers[] = polldaddy_poll_answer( $args );
|
613 |
+
}
|
614 |
+
|
615 |
+
if ( 2 > count( $answers ) )
|
616 |
+
$this->errors->add( 'answer', __( 'You must include at least 2 answers', 'polldaddy' ) );
|
617 |
+
|
618 |
+
if ( $this->errors->get_error_codes() )
|
619 |
+
return false;
|
620 |
+
|
621 |
+
$poll_data['answers'] = $answers;
|
622 |
+
|
623 |
+
$poll_data['question'] = wp_kses( $poll_data['question'], $allowedtags );
|
624 |
+
|
625 |
+
if ( isset ( $_POST['styleID'] ) ){
|
626 |
+
if ( $_POST['styleID'] == 'x' ){
|
627 |
+
$this->errors->add( 'UpdatePoll', __( 'Please choose a poll style', 'polldaddy' ) );
|
628 |
+
return false;
|
629 |
+
}
|
630 |
+
}
|
631 |
+
$poll_data['styleID'] = (int) $_POST['styleID'];
|
632 |
+
$poll_data['choices'] = (int) $_POST['choices'];
|
633 |
+
|
634 |
+
if ( $poll_data['blockRepeatVotersType'] == 'cookie' ){
|
635 |
+
if( isset( $_POST['cookieip_expiration'] ) )
|
636 |
+
$poll_data['blockExpiration'] = (int) $_POST['cookieip_expiration'];
|
637 |
+
} elseif ( $poll_data['blockRepeatVotersType'] == 'cookieip' ){
|
638 |
+
if( isset( $_POST['cookieip_expiration'] ) )
|
639 |
+
$poll_data['blockExpiration'] = (int) $_POST['cookieip_expiration'];
|
640 |
+
}
|
641 |
+
|
642 |
+
$polldaddy->reset();
|
643 |
+
|
644 |
+
$update_response = $polldaddy->update_poll( $poll, $poll_data );
|
645 |
+
|
646 |
+
$this->parse_errors( $polldaddy );
|
647 |
+
|
648 |
+
if ( !$update_response )
|
649 |
+
$this->errors->add( 'UpdatePoll', __( 'Poll could not be updated', 'polldaddy' ) );
|
650 |
+
|
651 |
+
if ( $this->errors->get_error_codes() )
|
652 |
+
return false;
|
653 |
+
|
654 |
+
$query_args['message'] = 'updated';
|
655 |
+
if ( isset($_POST['iframe']) )
|
656 |
+
$query_args['iframe'] = '';
|
657 |
+
break;
|
658 |
+
case 'create-poll' :
|
659 |
+
if ( !$is_POST )
|
660 |
+
return;
|
661 |
+
|
662 |
+
check_admin_referer( 'create-poll' );
|
663 |
+
|
664 |
+
$polldaddy = $this->get_client( WP_POLLDADDY__PARTNERGUID, $this->user_code );
|
665 |
+
$polldaddy->reset();
|
666 |
+
|
667 |
+
$answers = array();
|
668 |
+
foreach ( $_POST['answer'] as $answer ){
|
669 |
+
if ( !$answer = trim( stripslashes( $answer ) ) )
|
670 |
+
continue;
|
671 |
+
|
672 |
+
$args['text'] = wp_kses( $answer, $allowedtags );
|
673 |
+
|
674 |
+
$answers[] = polldaddy_poll_answer( $args );
|
675 |
+
}
|
676 |
+
|
677 |
+
if ( !$answers )
|
678 |
+
return false;
|
679 |
+
|
680 |
+
$poll_data = _polldaddy_poll_defaults();
|
681 |
+
|
682 |
+
foreach ( array( 'multipleChoice', 'randomiseAnswers', 'otherAnswer', 'sharing' ) as $option ) {
|
683 |
+
if ( isset( $_POST[$option] ) && $_POST[$option] )
|
684 |
+
$poll_data[$option] = 'yes';
|
685 |
+
else
|
686 |
+
$poll_data[$option] = 'no';
|
687 |
+
}
|
688 |
+
|
689 |
+
$blocks = array( 'off', 'cookie', 'cookieip' );
|
690 |
+
if ( isset( $_POST['blockRepeatVotersType'] ) && in_array( $_POST['blockRepeatVotersType'], $blocks ) )
|
691 |
+
$poll_data['blockRepeatVotersType'] = $_POST['blockRepeatVotersType'];
|
692 |
+
|
693 |
+
$results = array( 'show', 'percent', 'hide' );
|
694 |
+
if ( isset( $_POST['resultsType'] ) && in_array( $_POST['resultsType'], $results ) )
|
695 |
+
$poll_data['resultsType'] = $_POST['resultsType'];
|
696 |
+
|
697 |
+
$poll_data['answers'] = $answers;
|
698 |
+
|
699 |
+
$poll_data['question'] = stripslashes( $_POST['question'] );
|
700 |
+
$poll_data['question'] = wp_kses( $poll_data['question'], $allowedtags );
|
701 |
+
|
702 |
+
if ( isset ( $_POST['styleID'] ) ){
|
703 |
+
if ( $_POST['styleID'] == 'x' ){
|
704 |
+
$this->errors->add( 'UpdatePoll', __( 'Please choose a poll style', 'polldaddy' ) );
|
705 |
+
return false;
|
706 |
+
}
|
707 |
+
}
|
708 |
+
$poll_data['styleID'] = (int) $_POST['styleID'];
|
709 |
+
$poll_data['choices'] = (int) $_POST['choices'];
|
710 |
+
|
711 |
+
if ( $poll_data['blockRepeatVotersType'] == 'cookie' ){
|
712 |
+
if( isset( $_POST['cookieip_expiration'] ) )
|
713 |
+
$poll_data['blockExpiration'] = (int) $_POST['cookieip_expiration'];
|
714 |
+
} elseif ( $poll_data['blockRepeatVotersType'] == 'cookieip' ){
|
715 |
+
if( isset( $_POST['cookieip_expiration'] ) )
|
716 |
+
$poll_data['blockExpiration'] = (int) $_POST['cookieip_expiration'];
|
717 |
+
}
|
718 |
+
|
719 |
+
$poll = $polldaddy->create_poll( $poll_data );
|
720 |
+
$this->parse_errors( $polldaddy );
|
721 |
+
|
722 |
+
if ( !$poll || empty( $poll->_id ) )
|
723 |
+
$this->errors->add( 'CreatePoll', __( 'Poll could not be created', 'polldaddy' ) );
|
724 |
+
|
725 |
+
if ( $this->errors->get_error_codes() )
|
726 |
+
return false;
|
727 |
+
|
728 |
+
$query_args['message'] = 'created';
|
729 |
+
$query_args['action'] = 'edit-poll';
|
730 |
+
$query_args['poll'] = $poll->_id;
|
731 |
+
if ( isset($_POST['iframe']) )
|
732 |
+
$query_args['iframe'] = '';
|
733 |
+
break;
|
734 |
+
case 'delete-style' :
|
735 |
+
if ( empty( $style ) )
|
736 |
+
return;
|
737 |
+
|
738 |
+
if ( is_array( $style ) )
|
739 |
+
check_admin_referer( 'action-style_bulk' );
|
740 |
+
else
|
741 |
+
check_admin_referer( "delete-style_$style" );
|
742 |
+
|
743 |
+
$polldaddy = $this->get_client( WP_POLLDADDY__PARTNERGUID, $this->user_code );
|
744 |
+
|
745 |
+
foreach ( (array) $_REQUEST['style'] as $style_id ) {
|
746 |
+
$polldaddy->reset();
|
747 |
+
$polldaddy->delete_style( $style_id );
|
748 |
+
}
|
749 |
+
|
750 |
+
$query_args['message'] = 'deleted-style';
|
751 |
+
$query_args['deleted'] = count( (array) $style );
|
752 |
+
break;
|
753 |
+
case 'edit-style' :
|
754 |
+
if ( !$is_POST || !$style = (int) $style )
|
755 |
+
return;
|
756 |
+
|
757 |
+
check_admin_referer( "edit-style$style" );
|
758 |
+
|
759 |
+
$polldaddy = $this->get_client( WP_POLLDADDY__PARTNERGUID, $this->user_code );
|
760 |
+
$polldaddy->reset();
|
761 |
+
|
762 |
+
$style_data = _polldaddy_style_defaults();
|
763 |
+
|
764 |
+
if ( isset($_POST['style-title'] ) )
|
765 |
+
$style_data['title'] = stripslashes( trim ( (string) $_POST['style-title'] ) );
|
766 |
+
|
767 |
+
if ( isset($_POST['CSSXML'] ) )
|
768 |
+
$style_data['css'] = urlencode( stripslashes( trim ( (string) $_POST['CSSXML'] ) ) );
|
769 |
+
|
770 |
+
$update_response = $polldaddy->update_style( $style, $style_data );
|
771 |
+
|
772 |
+
$this->parse_errors( $polldaddy );
|
773 |
+
|
774 |
+
if ( !$update_response )
|
775 |
+
$this->errors->add( 'UpdateStyle', __( 'Style could not be updated', 'polldaddy' ) );
|
776 |
+
|
777 |
+
if ( $this->errors->get_error_codes() )
|
778 |
+
return false;
|
779 |
+
|
780 |
+
$query_args['message'] = 'updated-style';
|
781 |
+
if ( isset($_POST['iframe']) )
|
782 |
+
$query_args['iframe'] = '';
|
783 |
+
break;
|
784 |
+
case 'create-style' :
|
785 |
+
if ( !$is_POST )
|
786 |
+
return;
|
787 |
+
|
788 |
+
check_admin_referer( 'create-style' );
|
789 |
+
|
790 |
+
$polldaddy = $this->get_client( WP_POLLDADDY__PARTNERGUID, $this->user_code );
|
791 |
+
$polldaddy->reset();
|
792 |
+
|
793 |
+
$style_data = _polldaddy_style_defaults();
|
794 |
+
|
795 |
+
if ( isset($_POST['style-title'] ) )
|
796 |
+
$style_data['title'] = stripslashes( strip_tags( trim ( (string) $_POST['style-title'] ) ) );
|
797 |
+
|
798 |
+
if ( isset($_POST['CSSXML'] ) )
|
799 |
+
$style_data['css'] = urlencode( stripslashes( trim ( (string) $_POST['CSSXML'] ) ) );
|
800 |
+
|
801 |
+
$style = $polldaddy->create_style( $style_data );
|
802 |
+
$this->parse_errors( $polldaddy );
|
803 |
+
|
804 |
+
if ( !$style || empty( $style->_id ) )
|
805 |
+
$this->errors->add( 'CreateStyle', __( 'Style could not be created', 'polldaddy' ) );
|
806 |
+
|
807 |
+
if ( $this->errors->get_error_codes() )
|
808 |
+
return false;
|
809 |
+
|
810 |
+
$query_args['message'] = 'created-style';
|
811 |
+
$query_args['action'] = 'edit-style';
|
812 |
+
$query_args['style'] = $style->_id;
|
813 |
+
if ( isset($_POST['iframe']) )
|
814 |
+
$query_args['iframe'] = '';
|
815 |
+
break;
|
816 |
+
case 'update-options' :
|
817 |
+
if ( !$is_POST )
|
818 |
+
return;
|
819 |
+
|
820 |
+
check_admin_referer( 'polldaddy-account' );
|
821 |
+
|
822 |
+
$polldaddy = $this->get_client( WP_POLLDADDY__PARTNERGUID, $this->user_code );
|
823 |
+
$polldaddy->reset();
|
824 |
+
|
825 |
+
$poll_defaults = _polldaddy_poll_defaults();
|
826 |
+
|
827 |
+
$user_defaults = array();
|
828 |
+
|
829 |
+
foreach( array( "multipleChoice", "randomiseAnswers", "otherAnswer", "sharing", "resultsType", "styleID", "blockRepeatVotersType", "blockExpiration" ) as $option ){
|
830 |
+
if ( isset( $poll_defaults[$option] ) && $poll_defaults[$option] )
|
831 |
+
$user_defaults[$option] = $poll_defaults[$option];
|
832 |
+
}
|
833 |
+
|
834 |
+
foreach ( array( 'multipleChoice', 'randomiseAnswers', 'otherAnswer', 'sharing' ) as $option ) {
|
835 |
+
if ( isset( $_POST[$option] ) && $_POST[$option] )
|
836 |
+
$user_defaults[$option] = 'yes';
|
837 |
+
else
|
838 |
+
$user_defaults[$option] = 'no';
|
839 |
+
}
|
840 |
+
|
841 |
+
$results = array( 'show', 'percent', 'hide' );
|
842 |
+
if ( isset( $_POST['resultsType'] ) && in_array( $_POST['resultsType'], $results ) )
|
843 |
+
$user_defaults['resultsType'] = $_POST['resultsType'];
|
844 |
+
|
845 |
+
if ( isset ( $_POST['styleID'] ) ){
|
846 |
+
$user_defaults['styleID'] = (int) $_POST['styleID'];
|
847 |
+
}
|
848 |
+
|
849 |
+
$blocks = array( 'off', 'cookie', 'cookieip' );
|
850 |
+
if ( isset( $_POST['blockRepeatVotersType'] ) && in_array( $_POST['blockRepeatVotersType'], $blocks ) )
|
851 |
+
$user_defaults['blockRepeatVotersType'] = $_POST['blockRepeatVotersType'];
|
852 |
+
|
853 |
+
if( isset( $_POST['blockExpiration'] ) )
|
854 |
+
$user_defaults['blockExpiration'] = (int) $_POST['blockExpiration'];
|
855 |
+
|
856 |
+
$polldaddy->update_poll_defaults( 0, $user_defaults );
|
857 |
+
|
858 |
+
$this->parse_errors( $polldaddy );
|
859 |
+
if ( $this->errors->get_error_codes() )
|
860 |
+
return false;
|
861 |
+
|
862 |
+
$query_args['message'] = 'updated-options';
|
863 |
+
break;
|
864 |
+
default :
|
865 |
+
return;
|
866 |
+
endswitch;
|
867 |
+
} elseif( $page == 'ratings' ) {
|
868 |
+
return;
|
869 |
+
}
|
870 |
+
|
871 |
+
wp_redirect( add_query_arg( $query_args, wp_get_referer() ) );
|
872 |
+
exit;
|
873 |
+
}
|
874 |
+
|
875 |
+
function management_page_load_signup() {
|
876 |
+
switch ( $_POST['account'] ) :
|
877 |
+
case 'import' :
|
878 |
+
return $this->import_account();
|
879 |
+
break;
|
880 |
+
default :
|
881 |
+
return;
|
882 |
+
endswitch;
|
883 |
+
}
|
884 |
+
|
885 |
+
function import_account(){
|
886 |
+
$polldaddy = $this->get_client( WP_POLLDADDY__PARTNERGUID );
|
887 |
+
$polldaddy->reset();
|
888 |
+
$email = trim( stripslashes( $_POST['polldaddy_email'] ) );
|
889 |
+
$password = trim( stripslashes( $_POST['polldaddy_password'] ) );
|
890 |
+
|
891 |
+
if ( !is_email( $email ) )
|
892 |
+
$this->errors->add( 'polldaddy_email', __( 'Email address required', 'polldaddy' ) );
|
893 |
+
|
894 |
+
if ( !$password )
|
895 |
+
$this->errors->add( 'polldaddy_password', __( 'Password required', 'polldaddy' ) );
|
896 |
+
|
897 |
+
if ( $this->errors->get_error_codes() )
|
898 |
+
return false;
|
899 |
+
|
900 |
+
if ( $usercode = $polldaddy->initiate( $email, $password, $this->id ) ) {
|
901 |
+
$this->user_code = $usercode;
|
902 |
+
} else {
|
903 |
+
$this->parse_errors( $polldaddy );
|
904 |
+
$this->errors->add( 'import-account', __( 'Account could not be imported. Are your email address and password correct?', 'polldaddy' ) );
|
905 |
+
return false;
|
906 |
+
}
|
907 |
+
}
|
908 |
+
|
909 |
+
function admin_body_class( $class ) {
|
910 |
+
if ( isset( $_GET['iframe'] ) )
|
911 |
+
$class .= 'poll-preview-iframe ';
|
912 |
+
if ( isset( $_GET['TB_iframe'] ) )
|
913 |
+
$class .= 'poll-preview-iframe-editor ';
|
914 |
+
return $class;
|
915 |
+
}
|
916 |
+
|
917 |
+
function management_page_notices( $message = false ) {
|
918 |
+
switch ( (string) @$_GET['message'] ) :
|
919 |
+
case 'deleted' :
|
920 |
+
$deleted = (int) $_GET['deleted'];
|
921 |
+
if ( 1 == $deleted )
|
922 |
+
$message = __( 'Poll deleted.', 'polldaddy' );
|
923 |
+
else
|
924 |
+
$message = sprintf( __ngettext( '%s Poll Deleted.', '%s Polls Deleted.', $deleted ), number_format_i18n( $deleted ) );
|
925 |
+
break;
|
926 |
+
case 'opened' :
|
927 |
+
$opened = (int) $_GET['opened'];
|
928 |
+
if ( 1 == $opened )
|
929 |
+
$message = __( 'Poll opened.', 'polldaddy' );
|
930 |
+
else
|
931 |
+
$message = sprintf( __ngettext( '%s Poll Opened.', '%s Polls Opened.', $opened ), number_format_i18n( $opened ) );
|
932 |
+
break;
|
933 |
+
case 'closed' :
|
934 |
+
$closed = (int) $_GET['closed'];
|
935 |
+
if ( 1 == $closed )
|
936 |
+
$message = __( 'Poll closed.', 'polldaddy' );
|
937 |
+
else
|
938 |
+
$message = sprintf( __ngettext( '%s Poll Closed.', '%s Polls Closed.', $closed ), number_format_i18n( $closed ) );
|
939 |
+
break;
|
940 |
+
case 'updated' :
|
941 |
+
$message = __( 'Poll updated.', 'polldaddy' );
|
942 |
+
break;
|
943 |
+
case 'created' :
|
944 |
+
$message = __( 'Poll created.', 'polldaddy' );
|
945 |
+
if ( isset( $_GET['iframe'] ) )
|
946 |
+
$message .= ' <input type="button" class="button polldaddy-send-to-editor" value="' . attribute_escape( __( 'Send to Editor', 'polldaddy' ) ) . '" />';
|
947 |
+
break;
|
948 |
+
case 'updated-style' :
|
949 |
+
$message = __( 'Custom Style updated.', 'polldaddy' );
|
950 |
+
break;
|
951 |
+
case 'created-style' :
|
952 |
+
$message = __( 'Custom Style created.', 'polldaddy' );
|
953 |
+
break;
|
954 |
+
case 'deleted-style' :
|
955 |
+
$deleted = (int) $_GET['deleted'];
|
956 |
+
if ( 1 == $deleted )
|
957 |
+
$message = __( 'Custom Style deleted.', 'polldaddy' );
|
958 |
+
else
|
959 |
+
$message = sprintf( __ngettext( '%s Style Deleted.', '%s Custom Styles Deleted.', $deleted ), number_format_i18n( $deleted ) );
|
960 |
+
break;
|
961 |
+
case 'imported-account' :
|
962 |
+
$message = __( 'Account Imported.', 'polldaddy' );
|
963 |
+
break;
|
964 |
+
case 'updated-options' :
|
965 |
+
$message = __( 'Options Updated.', 'polldaddy' );
|
966 |
+
break;
|
967 |
+
endswitch;
|
968 |
+
|
969 |
+
$is_POST = 'post' == strtolower( $_SERVER['REQUEST_METHOD'] );
|
970 |
+
|
971 |
+
if ( $is_POST ) {
|
972 |
+
switch ( $GLOBALS['action'] ) :
|
973 |
+
case 'create-poll' :
|
974 |
+
$message = __( 'Error: An error has occurred; Poll not created.', 'polldaddy' );
|
975 |
+
break;
|
976 |
+
case 'edit-poll' :
|
977 |
+
$message = __( 'Error: An error has occurred; Poll not updated.', 'polldaddy' );
|
978 |
+
break;
|
979 |
+
case 'account' :
|
980 |
+
if ( 'import' == $_POST['account'] )
|
981 |
+
$message = __( 'Error: An error has occurred; Account could not be imported. Perhaps your email address or password is incorrect?', 'polldaddy' );
|
982 |
+
else
|
983 |
+
$message = __( 'Error: An error has occurred; Account could not be created.', 'polldaddy' );
|
984 |
+
break;
|
985 |
+
endswitch;
|
986 |
+
}
|
987 |
+
|
988 |
+
if ( !$message )
|
989 |
+
return;
|
990 |
+
?>
|
991 |
+
<div class='updated'><p><?php echo $message; ?></p></div>
|
992 |
+
<?php
|
993 |
+
$this->print_errors();
|
994 |
+
}
|
995 |
+
|
996 |
+
function management_page() {
|
997 |
+
global $page, $action, $poll, $style, $rating;
|
998 |
+
$poll = (int) $poll;
|
999 |
+
$style = (int) $style;
|
1000 |
+
$rating = wp_specialchars( $rating );
|
1001 |
+
?>
|
1002 |
+
|
1003 |
+
<div class="wrap" id="manage-polls">
|
1004 |
+
|
1005 |
+
<?php
|
1006 |
+
if( $page == 'polls' ) {
|
1007 |
+
if ( !$this->is_author && in_array( $action, array( 'edit', 'edit-poll', 'create-poll', 'edit-style', 'create-style', 'list-styles', 'options', 'update-options', 'import-account' ) ) ) {//check user privileges has access to action
|
1008 |
+
$action = '';
|
1009 |
+
}
|
1010 |
+
switch ( $action ) :
|
1011 |
+
case 'signup' :
|
1012 |
+
case 'account' :
|
1013 |
+
$this->signup();
|
1014 |
+
break;
|
1015 |
+
case 'preview' :
|
1016 |
+
?>
|
1017 |
+
|
1018 |
+
<h2 id="preview-header"><?php
|
1019 |
+
if( $this->is_author )
|
1020 |
+
printf( __( 'Poll Preview (<a href="%s">Edit Poll</a>, <a href="%s">List Polls</a>)', 'polldaddy' ),
|
1021 |
+
clean_url( add_query_arg( array( 'action' => 'edit', 'poll' => $poll, 'message' => false ) ) ),
|
1022 |
+
clean_url( add_query_arg( array( 'action' => false, 'poll' => false, 'message' => false ) ) ));
|
1023 |
+
else
|
1024 |
+
printf( __( 'Poll Preview (<a href="%s">List Polls</a>)', 'polldaddy'), clean_url( add_query_arg( array( 'action' => false, 'poll' => false, 'message' => false ) ) ) ); ?></h2>
|
1025 |
+
|
1026 |
+
<?php
|
1027 |
+
echo do_shortcode( "[polldaddy poll=$poll cb=1]" );
|
1028 |
+
break;
|
1029 |
+
case 'results' :
|
1030 |
+
?>
|
1031 |
+
|
1032 |
+
<h2><?php
|
1033 |
+
if( $this->is_author )
|
1034 |
+
printf( __( 'Poll Results (<a href="%s">Edit Poll</a>)', 'polldaddy' ), clean_url( add_query_arg( array( 'action' => 'edit', 'poll' => $poll, 'message' => false ) ) ) );
|
1035 |
+
else
|
1036 |
+
printf( __( 'Poll Results (<a href="%s">List Polls</a>)', 'polldaddy'), clean_url( add_query_arg( array( 'action' => false, 'poll' => false, 'message' => false ) ) ) ); ?></h2>
|
1037 |
+
|
1038 |
+
<?php
|
1039 |
+
$this->poll_results_page( $poll );
|
1040 |
+
break;
|
1041 |
+
case 'edit' :
|
1042 |
+
case 'edit-poll' :
|
1043 |
+
?>
|
1044 |
+
|
1045 |
+
<h2><?php printf( __('Edit Poll (<a href="%s">List Polls</a>)', 'polldaddy'), clean_url( add_query_arg( array( 'action' => false, 'poll' => false, 'message' => false ) ) ) ); ?></h2>
|
1046 |
+
|
1047 |
+
<?php
|
1048 |
+
|
1049 |
+
$this->poll_edit_form( $poll );
|
1050 |
+
break;
|
1051 |
+
case 'create-poll' :
|
1052 |
+
?>
|
1053 |
+
|
1054 |
+
<h2><?php printf( __('Create Poll (<a href="%s">List Polls</a>)', 'polldaddy'), clean_url( add_query_arg( array( 'action' => false, 'poll' => false, 'message' => false ) ) ) ); ?></h2>
|
1055 |
+
|
1056 |
+
<?php
|
1057 |
+
$this->poll_edit_form();
|
1058 |
+
break;
|
1059 |
+
case 'list-styles' :
|
1060 |
+
?>
|
1061 |
+
|
1062 |
+
<h2><?php
|
1063 |
+
if( $this->is_author )
|
1064 |
+
printf( __('Custom Styles (<a href="%s">Add New</a>)', 'polldaddy'), clean_url( add_query_arg( array( 'action' => 'create-style', 'poll' => false, 'message' => false ) ) ) );
|
1065 |
+
else
|
1066 |
+
_e('Custom Styles', 'polldaddy'); ?></h2>
|
1067 |
+
|
1068 |
+
<?php
|
1069 |
+
$this->styles_table();
|
1070 |
+
break;
|
1071 |
+
case 'edit-style' :
|
1072 |
+
?>
|
1073 |
+
|
1074 |
+
<h2><?php printf( __('Edit Style (<a href="%s">List Styles</a>)', 'polldaddy'), clean_url( add_query_arg( array( 'action' => 'list-styles', 'style' => false, 'message' => false, 'preload' => false ) ) ) ); ?></h2>
|
1075 |
+
|
1076 |
+
<?php
|
1077 |
+
|
1078 |
+
$this->style_edit_form( $style );
|
1079 |
+
break;
|
1080 |
+
case 'create-style' :
|
1081 |
+
?>
|
1082 |
+
|
1083 |
+
<h2><?php printf( __('Create Style (<a href="%s">List Styles</a>)', 'polldaddy'), clean_url( add_query_arg( array( 'action' => 'list-styles', 'style' => false, 'message' => false, 'preload' => false ) ) ) ); ?></h2>
|
1084 |
+
|
1085 |
+
<?php
|
1086 |
+
$this->style_edit_form();
|
1087 |
+
break;
|
1088 |
+
case 'options' :
|
1089 |
+
case 'import-account' :
|
1090 |
+
case 'update-options' :
|
1091 |
+
$this->plugin_options();
|
1092 |
+
break;
|
1093 |
+
default :
|
1094 |
+
|
1095 |
+
?>
|
1096 |
+
|
1097 |
+
<h2 id="poll-list-header"><?php
|
1098 |
+
if( $this->is_author )
|
1099 |
+
printf( __( 'Polls (<a href="%s">Add New</a>)', 'polldaddy' ), clean_url( add_query_arg( array('action' => 'create-poll','poll' => false,'message' => false) ) ) );
|
1100 |
+
else
|
1101 |
+
_e( 'Polls', 'polldaddy'); ?></h2>
|
1102 |
+
|
1103 |
+
<?php
|
1104 |
+
$this->polls_table( isset( $_GET['view'] ) && 'user' == $_GET['view'] ? 'user' : 'blog' );
|
1105 |
+
endswitch;
|
1106 |
+
} elseif( $page == 'ratings' ) {
|
1107 |
+
if ( !$this->is_admin && !in_array( $action, array( 'change-report', 'reports' ) ) ) {//check user privileges has access to action
|
1108 |
+
$action = 'reports';
|
1109 |
+
}
|
1110 |
+
|
1111 |
+
switch ( $action ) :
|
1112 |
+
case 'change-report' :
|
1113 |
+
case 'reports' :
|
1114 |
+
$this->rating_reports();
|
1115 |
+
break;
|
1116 |
+
case 'update-rating' :
|
1117 |
+
$this->update_rating();
|
1118 |
+
$this->rating_settings( $action );
|
1119 |
+
break;
|
1120 |
+
default :
|
1121 |
+
$this->rating_settings();
|
1122 |
+
endswitch;
|
1123 |
+
}
|
1124 |
+
?>
|
1125 |
+
|
1126 |
+
</div>
|
1127 |
+
|
1128 |
+
<?php
|
1129 |
+
|
1130 |
+
}
|
1131 |
+
|
1132 |
+
function polls_table( $view = 'blog' ) {
|
1133 |
+
$page = 1;
|
1134 |
+
if ( isset( $_GET['paged'] ) )
|
1135 |
+
$page = absint($_GET['paged']);
|
1136 |
+
$polldaddy = $this->get_client( WP_POLLDADDY__PARTNERGUID, $this->user_code );
|
1137 |
+
$polldaddy->reset();
|
1138 |
+
|
1139 |
+
if( !$this->is_author )
|
1140 |
+
$view = '';
|
1141 |
+
|
1142 |
+
if ( 'user' == $view )
|
1143 |
+
$polls_object = $polldaddy->get_polls( ( $page - 1 ) * 10 + 1, $page * 10 );
|
1144 |
+
else
|
1145 |
+
$polls_object = $polldaddy->get_polls_by_parent_id( ( $page - 1 ) * 10 + 1, $page * 10 );
|
1146 |
+
$this->parse_errors( $polldaddy );
|
1147 |
+
$this->print_errors();
|
1148 |
+
$polls = & $polls_object->poll;
|
1149 |
+
if( isset( $polls_object->_total ) )
|
1150 |
+
$total_polls = $polls_object->_total;
|
1151 |
+
else
|
1152 |
+
$total_polls = count( $polls );
|
1153 |
+
$class = '';
|
1154 |
+
|
1155 |
+
$page_links = paginate_links( array(
|
1156 |
+
'base' => add_query_arg( 'paged', '%#%' ),
|
1157 |
+
'format' => '',
|
1158 |
+
'total' => ceil( $total_polls / 10 ),
|
1159 |
+
'current' => $page
|
1160 |
+
) );
|
1161 |
+
|
1162 |
+
if( $this->is_author ){ ?>
|
1163 |
+
<ul class="subsubsub">
|
1164 |
+
<li><a href="<?php echo clean_url( add_query_arg( array( 'view' => false, 'paged' => false ) ) ); ?>"<?php if ( 'blog' == $view ) echo ' class="current"'; ?>><?php _e( "All Blog's Polls", 'polldaddy' ); ?></a> | </li>
|
1165 |
+
<li><a href="<?php echo clean_url( add_query_arg( array( 'view' => 'user', 'paged' => false ) ) ); ?>"<?php if ( 'user' == $view ) echo ' class="current"'; ?>><?php _e( "All My Polls", 'polldaddy' ); ?></a></li>
|
1166 |
+
</ul>
|
1167 |
+
<?php } ?>
|
1168 |
+
<form method="post" action="">
|
1169 |
+
<?php if( $this->is_author ){ ?>
|
1170 |
+
<div class="tablenav">
|
1171 |
+
<div class="alignleft">
|
1172 |
+
<select name="action">
|
1173 |
+
<option selected="selected" value=""><?php _e( 'Actions', 'polldaddy' ); ?></option>
|
1174 |
+
<option value="delete"><?php _e( 'Delete', 'polldaddy' ); ?></option>
|
1175 |
+
<option value="close"><?php _e( 'Close', 'polldaddy' ); ?></option>
|
1176 |
+
<option value="open"><?php _e( 'Open', 'polldaddy' ); ?></option>
|
1177 |
+
</select>
|
1178 |
+
<input class="button-secondary action" type="submit" name="doaction" value="<?php _e( 'Apply', 'polldaddy' ); ?>" />
|
1179 |
+
<?php wp_nonce_field( 'action-poll_bulk' ); ?>
|
1180 |
+
</div>
|
1181 |
+
<div class="tablenav-pages"><?php echo $page_links; ?></div>
|
1182 |
+
</div>
|
1183 |
+
<br class="clear" />
|
1184 |
+
<?php } ?>
|
1185 |
+
<table class="widefat">
|
1186 |
+
<thead>
|
1187 |
+
<tr>
|
1188 |
+
<th id="cb" class="manage-column column-cb check-column" scope="col" /><?php if( $this->is_author ){ ?><input type="checkbox" /><?php } ?></th>
|
1189 |
+
<th id="title" class="manage-column column-title" scope="col">Poll</th>
|
1190 |
+
<th id="votes" class="manage-column column-vote" scope="col">Votes</th>
|
1191 |
+
<th id="date" class="manage-column column-date" scope="col">Created</th>
|
1192 |
+
</tr>
|
1193 |
+
</thead>
|
1194 |
+
<tbody>
|
1195 |
+
|
1196 |
+
<?php
|
1197 |
+
if ( $polls ) :
|
1198 |
+
foreach ( $polls as $poll ) :
|
1199 |
+
$poll_id = (int) $poll->_id;
|
1200 |
+
|
1201 |
+
$poll->___content = trim( strip_tags( $poll->___content ) );
|
1202 |
+
if( strlen( $poll->___content ) == 0 ){
|
1203 |
+
$poll->___content = '-- empty HTML tag --';
|
1204 |
+
}
|
1205 |
+
|
1206 |
+
$poll_closed = (int) $poll->_closed;
|
1207 |
+
|
1208 |
+
if ( $this->is_author and $this->can_edit( $poll ) ) {
|
1209 |
+
$edit_link = clean_url( add_query_arg( array( 'action' => 'edit', 'poll' => $poll_id, 'message' => false ) ) );
|
1210 |
+
$delete_link = clean_url( wp_nonce_url( add_query_arg( array( 'action' => 'delete', 'poll' => $poll_id, 'message' => false ) ), "delete-poll_$poll_id" ) );
|
1211 |
+
$open_link = clean_url( wp_nonce_url( add_query_arg( array( 'action' => 'open', 'poll' => $poll_id, 'message' => false ) ), "open-poll_$poll_id" ) );
|
1212 |
+
$close_link = clean_url( wp_nonce_url( add_query_arg( array( 'action' => 'close', 'poll' => $poll_id, 'message' => false ) ), "close-poll_$poll_id" ) );
|
1213 |
+
}
|
1214 |
+
else {
|
1215 |
+
$edit_link = false;
|
1216 |
+
$delete_link = false;
|
1217 |
+
$open_link = false;
|
1218 |
+
$close_link = false;
|
1219 |
+
}
|
1220 |
+
|
1221 |
+
$class = $class ? '' : ' class="alternate"';
|
1222 |
+
$results_link = clean_url( add_query_arg( array( 'action' => 'results', 'poll' => $poll_id, 'message' => false ) ) );
|
1223 |
+
$preview_link = clean_url( add_query_arg( array( 'action' => 'preview', 'poll' => $poll_id, 'message' => false ) ) ); //, 'iframe' => '', 'TB_iframe' => 'true' ) ) );
|
1224 |
+
list($poll_time) = explode( '.', $poll->_created );
|
1225 |
+
$poll_time = strtotime( $poll_time );
|
1226 |
+
?>
|
1227 |
+
|
1228 |
+
<tr<?php echo $class; ?>>
|
1229 |
+
<th class="check-column" scope="row"><?php if( $this->is_author and $this->can_edit( $poll ) ){ ?><input type="checkbox" value="<?php echo (int) $poll_id; ?>" name="poll[]" /><?php } ?></th>
|
1230 |
+
<td class="post-title column-title">
|
1231 |
+
<?php if ( $edit_link ) { ?>
|
1232 |
+
<strong><a class="row-title" href="<?php echo $edit_link; ?>"><?php echo wp_specialchars( $poll->___content ); ?></a></strong>
|
1233 |
+
<span class="edit"><a href="<?php echo $edit_link; ?>"><?php _e( 'Edit', 'polldaddy' ); ?></a> | </span>
|
1234 |
+
<?php } else { ?>
|
1235 |
+
<strong><?php echo wp_specialchars( $poll->___content ); ?></strong>
|
1236 |
+
<?php } ?>
|
1237 |
+
<span class="results"><a href="<?php echo $results_link; ?>"><?php _e( 'Results', 'polldaddy' ); ?></a> | </span>
|
1238 |
+
<?php if ( $delete_link ) { ?>
|
1239 |
+
<span class="delete"><a class="delete-poll delete" href="<?php echo $delete_link; ?>"><?php _e( 'Delete', 'polldaddy' ); ?></a> | </span>
|
1240 |
+
<?php }
|
1241 |
+
if ( $poll_closed == 2 ) {
|
1242 |
+
if ( $open_link ) { ?>
|
1243 |
+
<span class="open"><a class="open-poll" href="<?php echo $open_link; ?>"><?php _e( 'Open', 'polldaddy' ); ?></a> | </span>
|
1244 |
+
<?php } } else {
|
1245 |
+
if ( $close_link ) { ?>
|
1246 |
+
<span class="close"><a class="close-poll" href="<?php echo $close_link; ?>"><?php _e( 'Close', 'polldaddy' ); ?></a> | </span>
|
1247 |
+
<?php } } ?>
|
1248 |
+
<?php if ( isset( $_GET['iframe'] ) ) { ?>
|
1249 |
+
<span class="view"><a href="<?php echo $preview_link; ?>"><?php _e( 'Preview', 'polldaddy' ); ?></a> | </span>
|
1250 |
+
<span class="editor">
|
1251 |
+
<a href="#" class="polldaddy-send-to-editor"><?php _e( 'Send to editor', 'polldaddy' ); ?></a>
|
1252 |
+
<input type="hidden" class="polldaddy-poll-id hack" value="<?php echo (int) $poll_id; ?>" /> |
|
1253 |
+
</span>
|
1254 |
+
<?php } else { ?>
|
1255 |
+
<span class="view"><a class="thickbox" href="<?php echo $preview_link; ?>"><?php _e( 'Preview', 'polldaddy' ); ?></a> | </span>
|
1256 |
+
<?php } ?>
|
1257 |
+
<span class="shortcode"><a href="#" class="polldaddy-show-shortcode"><?php _e( 'HTML code', 'polldaddy' ); ?></a></span>
|
1258 |
+
<?php $this->poll_table_add_option( $poll_id ); ?>
|
1259 |
+
</td>
|
1260 |
+
<td class="poll-votes column-vote"><?php echo number_format_i18n( $poll->_responses ); ?></td>
|
1261 |
+
<td class="date column-date"><abbr title="<?php echo date( __('Y/m/d g:i:s A', 'polldaddy'), $poll_time ); ?>"><?php echo date( __('Y/m/d', 'polldaddy'), $poll_time ); ?></abbr></td>
|
1262 |
+
</tr>
|
1263 |
+
<tr class="polldaddy-shortcode-row" style="display: none;">
|
1264 |
+
<td colspan="4">
|
1265 |
+
<h4><?php _e( 'Shortcode', 'polldaddy' ); ?></h4>
|
1266 |
+
<pre>[polldaddy poll=<?php echo (int) $poll_id; ?>]</pre>
|
1267 |
+
|
1268 |
+
<h4><?php _e( 'JavaScript', 'polldaddy' ); ?></h4>
|
1269 |
+
<pre><script type="text/javascript" language="javascript"
|
1270 |
+
src="http://static.polldaddy.com/p/<?php echo (int) $poll_id; ?>.js"></script>
|
1271 |
+
<noscript>
|
1272 |
+
<a href="http://answers.polldaddy.com/poll/<?php echo (int) $poll_id; ?>/"><?php echo trim( strip_tags( $poll->___content ) ); ?></a><br/>
|
1273 |
+
<span style="font:9px;">(<a href="http://www.polldaddy.com">polls</a>)</span>
|
1274 |
+
</noscript></pre>
|
1275 |
+
</td>
|
1276 |
+
</tr>
|
1277 |
+
|
1278 |
+
<?php
|
1279 |
+
endforeach;
|
1280 |
+
elseif ( $total_polls ) : // $polls
|
1281 |
+
?>
|
1282 |
+
|
1283 |
+
<tr>
|
1284 |
+
<td colspan="4"><?php printf( __( 'What are you doing here? <a href="%s">Go back</a>.', 'polldaddy' ), clean_url( add_query_arg( 'paged', false ) ) ); ?></td>
|
1285 |
+
</tr>
|
1286 |
+
|
1287 |
+
<?php
|
1288 |
+
else : // $polls
|
1289 |
+
?>
|
1290 |
+
|
1291 |
+
<tr>
|
1292 |
+
<td colspan="4"><?php
|
1293 |
+
if( $this->is_author )
|
1294 |
+
printf( __( 'No polls yet. <a href="%s">Create one</a>', 'polldaddy' ), clean_url( add_query_arg( array( 'action' => 'create-poll' ) ) ) );
|
1295 |
+
else
|
1296 |
+
_e( 'No polls yet.', 'polldaddy' ); ?></td>
|
1297 |
+
</tr>
|
1298 |
+
<?php endif; // $polls ?>
|
1299 |
+
|
1300 |
+
</tbody>
|
1301 |
+
</table>
|
1302 |
+
<?php $this->poll_table_extra(); ?>
|
1303 |
+
</form>
|
1304 |
+
<div class="tablenav">
|
1305 |
+
<div class="tablenav-pages"><?php echo $page_links; ?></div>
|
1306 |
+
</div>
|
1307 |
+
<br class="clear" />
|
1308 |
+
|
1309 |
+
<?php
|
1310 |
+
}
|
1311 |
+
|
1312 |
+
function poll_table_add_option(){}
|
1313 |
+
|
1314 |
+
function poll_table_extra(){}
|
1315 |
+
|
1316 |
+
function poll_edit_form( $poll_id = 1 ) {
|
1317 |
+
$poll_id = (int) $poll_id;
|
1318 |
+
|
1319 |
+
$polldaddy = $this->get_client( WP_POLLDADDY__PARTNERGUID, $this->user_code );
|
1320 |
+
$polldaddy->reset();
|
1321 |
+
|
1322 |
+
$is_POST = 'post' == strtolower( $_SERVER['REQUEST_METHOD'] );
|
1323 |
+
|
1324 |
+
if ( $poll_id ) {
|
1325 |
+
$poll = $polldaddy->get_poll( $poll_id );
|
1326 |
+
$this->parse_errors( $polldaddy );
|
1327 |
+
|
1328 |
+
if ( !$this->can_edit( $poll ) ) {
|
1329 |
+
$this->errors->add( 'permission', __( 'You are not allowed to edit this poll.', 'polldaddy' ) );
|
1330 |
+
}
|
1331 |
+
|
1332 |
+
if( $poll_id == 1 ){
|
1333 |
+
$poll->answers = array();
|
1334 |
+
$poll_id = 0;
|
1335 |
+
}
|
1336 |
+
|
1337 |
+
} else {
|
1338 |
+
$poll = polldaddy_poll( array(), null, false );
|
1339 |
+
}
|
1340 |
+
|
1341 |
+
$question = $is_POST ? attribute_escape( stripslashes( $_POST['question'] ) ) : attribute_escape( $poll->question );
|
1342 |
+
|
1343 |
+
$this->print_errors();
|
1344 |
+
?>
|
1345 |
+
|
1346 |
+
<form action="" method="post">
|
1347 |
+
<div id="poststuff"><div id="post-body" class="has-sidebar has-right-sidebar">
|
1348 |
+
|
1349 |
+
<div class="inner-sidebar" id="side-info-column">
|
1350 |
+
<div id="submitdiv" class="postbox">
|
1351 |
+
<h3><?php _e( 'Publish', 'polldaddy' ); ?></h3>
|
1352 |
+
<div class="inside">
|
1353 |
+
<div id="major-publishing-actions">
|
1354 |
+
<p id="publishing-action">
|
1355 |
+
<?php wp_nonce_field( $poll_id ? "edit-poll_$poll_id" : 'create-poll' ); ?>
|
1356 |
+
<input type="hidden" name="action" value="<?php echo $poll_id ? 'edit-poll' : 'create-poll'; ?>" />
|
1357 |
+
<input type="hidden" class="polldaddy-poll-id" name="poll" value="<?php echo $poll_id; ?>" />
|
1358 |
+
<input type="submit" class="button-primary" value="<?php echo attribute_escape( __( 'Save Poll', 'polldaddy' ) ); ?>" />
|
1359 |
+
|
1360 |
+
<?php if ( isset( $_GET['iframe'] ) && $poll_id ) : ?>
|
1361 |
+
|
1362 |
+
<input type="button" class="button polldaddy-send-to-editor" value="<?php echo attribute_escape( __( 'Send to Editor', 'polldaddy' ) ); ?>" />
|
1363 |
+
|
1364 |
+
<?php endif; ?>
|
1365 |
+
|
1366 |
+
</p>
|
1367 |
+
<br class="clear" />
|
1368 |
+
</div>
|
1369 |
+
</div>
|
1370 |
+
</div>
|
1371 |
+
|
1372 |
+
<div class="postbox">
|
1373 |
+
<h3><?php _e( 'Poll results', 'polldaddy' ); ?></h3>
|
1374 |
+
<div class="inside">
|
1375 |
+
<ul class="poll-options">
|
1376 |
+
|
1377 |
+
<?php
|
1378 |
+
foreach ( array( 'show' => __( 'Show results to voters', 'polldaddy' ), 'percent' => __( 'Only show percentages', 'polldaddy' ), 'hide' => __( 'Hide all results', 'polldaddy' ) ) as $value => $label ) :
|
1379 |
+
if ( $is_POST )
|
1380 |
+
$checked = $value === $_POST['resultsType'] ? ' checked="checked"' : '';
|
1381 |
+
else
|
1382 |
+
$checked = $value === $poll->resultsType ? ' checked="checked"' : '';
|
1383 |
+
?>
|
1384 |
+
|
1385 |
+
<li>
|
1386 |
+
<label for="resultsType-<?php echo $value; ?>"><input type="radio"<?php echo $checked; ?> value="<?php echo $value; ?>" name="resultsType" id="resultsType-<?php echo $value; ?>" /> <?php echo wp_specialchars( $label ); ?></label>
|
1387 |
+
</li>
|
1388 |
+
|
1389 |
+
<?php endforeach; ?>
|
1390 |
+
|
1391 |
+
</ul>
|
1392 |
+
</div>
|
1393 |
+
</div>
|
1394 |
+
|
1395 |
+
<div class="postbox">
|
1396 |
+
<h3><?php _e( 'Block repeat voters', 'polldaddy' ); ?></h3>
|
1397 |
+
<div class="inside">
|
1398 |
+
<ul class="poll-options">
|
1399 |
+
|
1400 |
+
<?php
|
1401 |
+
foreach ( array( 'off' => __( "Don't block repeat voters", 'polldaddy' ), 'cookie' => __( 'Block by cookie (recommended)', 'polldaddy' ), 'cookieip' => __( 'Block by cookie and by IP address', 'polldaddy' ) ) as $value => $label ) :
|
1402 |
+
if ( $is_POST )
|
1403 |
+
$checked = $value === $_POST['blockRepeatVotersType'] ? ' checked="checked"' : '';
|
1404 |
+
else
|
1405 |
+
$checked = $value === $poll->blockRepeatVotersType ? ' checked="checked"' : '';
|
1406 |
+
?>
|
1407 |
+
|
1408 |
+
<li>
|
1409 |
+
<label for="blockRepeatVotersType-<?php echo $value; ?>"><input class="block-repeat" type="radio"<?php echo $checked; ?> value="<?php echo $value; ?>" name="blockRepeatVotersType" id="blockRepeatVotersType-<?php echo $value; ?>" /> <?php echo wp_specialchars( $label ); ?></label>
|
1410 |
+
</li>
|
1411 |
+
|
1412 |
+
<?php endforeach; ?>
|
1413 |
+
|
1414 |
+
</ul>
|
1415 |
+
|
1416 |
+
<span style="margin:6px 6px 8px;" id="cookieip_expiration_label"><label><?php _e( 'Expires: ', 'polldaddy' ); ?></label></span>
|
1417 |
+
<select id="cookieip_expiration" name="cookieip_expiration" style="width: auto;<?php echo $poll->blockRepeatVotersType == 'off' ? 'display:none;' : ''; ?>">
|
1418 |
+
<option value="0" <?php echo (int) $poll->blockExpiration == 0 ? 'selected' : ''; ?>><?php _e( 'Never', 'polldaddy' ); ?></option>
|
1419 |
+
<option value="3600" <?php echo (int) $poll->blockExpiration == 3600 ? 'selected' : ''; ?>><?php printf( __('%d hour', 'polldaddy'), 1 ); ?></option>
|
1420 |
+
<option value="10800" <?php echo (int) $poll->blockExpiration == 10800 ? 'selected' : ''; ?>><?php printf( __('%d hours', 'polldaddy'), 3 ); ?></option>
|
1421 |
+
<option value="21600" <?php echo (int) $poll->blockExpiration == 21600 ? 'selected' : ''; ?>><?php printf( __('%d hours', 'polldaddy'), 6 ); ?></option>
|
1422 |
+
<option value="43200" <?php echo (int) $poll->blockExpiration == 43200 ? 'selected' : ''; ?>><?php printf( __('%d hours', 'polldaddy'), 12 ); ?></option>
|
1423 |
+
<option value="86400" <?php echo (int) $poll->blockExpiration == 86400 ? 'selected' : ''; ?>><?php printf( __('%d day', 'polldaddy'), 1 ); ?></option>
|
1424 |
+
<option value="604800" <?php echo (int) $poll->blockExpiration == 604800 ? 'selected' : ''; ?>><?php printf( __('%d week', 'polldaddy'), 1 ); ?></option>
|
1425 |
+
<option value="2419200" <?php echo (int) $poll->blockExpiration == 2419200 ? 'selected' : ''; ?>><?php printf( __('%d month', 'polldaddy'), 1 ); ?></option>
|
1426 |
+
</select>
|
1427 |
+
<p><?php _e( 'Note: Blocking by cookie and IP address can be problematic for some voters.', 'polldaddy'); ?></p>
|
1428 |
+
</div>
|
1429 |
+
</div>
|
1430 |
+
</div>
|
1431 |
+
|
1432 |
+
|
1433 |
+
<div id="post-body-content" class="has-sidebar-content">
|
1434 |
+
|
1435 |
+
<div id="titlediv">
|
1436 |
+
<div id="titlewrap">
|
1437 |
+
<input type="text" autocomplete="off" id="title" value="<?php echo $question; ?>" tabindex="1" size="30" name="question" />
|
1438 |
+
</div>
|
1439 |
+
</div>
|
1440 |
+
|
1441 |
+
<div id="answersdiv" class="postbox">
|
1442 |
+
<h3><?php _e( 'Answers', 'polldaddy' ); ?></h3>
|
1443 |
+
|
1444 |
+
<div id="answerswrap" class="inside">
|
1445 |
+
<ul id="answers">
|
1446 |
+
<?php
|
1447 |
+
$a = 0;
|
1448 |
+
$answers = array();
|
1449 |
+
if ( $is_POST && $_POST['answer'] ) {
|
1450 |
+
foreach( $_POST['answer'] as $answer_id => $answer )
|
1451 |
+
$answers[attribute_escape($answer_id)] = attribute_escape( stripslashes($answer) );
|
1452 |
+
} elseif ( isset( $poll->answers->answer ) ) {
|
1453 |
+
foreach ( $poll->answers->answer as $answer )
|
1454 |
+
$answers[(int) $answer->_id] = attribute_escape( $answer->text );
|
1455 |
+
}
|
1456 |
+
|
1457 |
+
foreach ( $answers as $answer_id => $answer ) :
|
1458 |
+
$a++;
|
1459 |
+
$delete_link = clean_url( wp_nonce_url( add_query_arg( array( 'action' => 'delete-answer', 'poll' => $poll_id, 'answer' => $answer_id, 'message' => false ) ), "delete-answer_$answer_id" ) );
|
1460 |
+
?>
|
1461 |
+
|
1462 |
+
<li>
|
1463 |
+
<span class="handle" title="<?php echo attribute_escape( 'click and drag to move' ); ?>">↕</span>
|
1464 |
+
<div><input type="text" autocomplete="off" id="answer-<?php echo $answer_id; ?>" value="<?php echo $answer; ?>" tabindex="2" size="30" name="answer[<?php echo $answer_id; ?>]" /></div>
|
1465 |
+
<a href="<?php echo $delete_link; ?>" class="delete-answer delete" title="<?php echo attribute_escape( 'delete this answer' ); ?>">×</a>
|
1466 |
+
</li>
|
1467 |
+
|
1468 |
+
<?php
|
1469 |
+
endforeach;
|
1470 |
+
|
1471 |
+
while ( 3 - $a > 0 ) :
|
1472 |
+
$a++;
|
1473 |
+
?>
|
1474 |
+
|
1475 |
+
<li>
|
1476 |
+
<span class="handle" title="<?php echo attribute_escape( 'click and drag to move' ); ?>">↕</span>
|
1477 |
+
<div><input type="text" autocomplete="off" value="" tabindex="2" size="30" name="answer[new<?php echo $a; ?>]" /></div>
|
1478 |
+
<a href="#" class="delete-answer delete" title="<?php echo attribute_escape( 'delete this answer' ); ?>">×</a>
|
1479 |
+
</li>
|
1480 |
+
|
1481 |
+
<?php
|
1482 |
+
endwhile;
|
1483 |
+
?>
|
1484 |
+
|
1485 |
+
</ul>
|
1486 |
+
|
1487 |
+
<p id="add-answer-holder">
|
1488 |
+
<button class="button"><?php echo wp_specialchars( __( 'Add another', 'polldaddy' ) ); ?></button>
|
1489 |
+
</p>
|
1490 |
+
|
1491 |
+
<ul id="answer-options">
|
1492 |
+
|
1493 |
+
<?php
|
1494 |
+
foreach ( array( 'multipleChoice' => __( 'Multiple choice', 'polldaddy' ), 'randomiseAnswers' => __( 'Randomize answer order', 'polldaddy' ), 'otherAnswer' => __( 'Allow other answers', 'polldaddy' ), 'sharing' => __( "'Share This' link", 'polldaddy' ) ) as $option => $label ) :
|
1495 |
+
if ( $is_POST )
|
1496 |
+
$checked = 'yes' === $_POST[$option] ? ' checked="checked"' : '';
|
1497 |
+
else
|
1498 |
+
$checked = 'yes' === $poll->$option ? ' checked="checked"' : '';
|
1499 |
+
?>
|
1500 |
+
|
1501 |
+
<li>
|
1502 |
+
<label for="<?php echo $option; ?>"><input type="checkbox"<?php echo $checked; ?> value="yes" id="<?php echo $option; ?>" name="<?php echo $option; ?>" /> <?php echo wp_specialchars( $label ); ?></label>
|
1503 |
+
</li>
|
1504 |
+
|
1505 |
+
<?php endforeach; ?>
|
1506 |
+
|
1507 |
+
</ul>
|
1508 |
+
<?php
|
1509 |
+
if ( $is_POST )
|
1510 |
+
$style = 'yes' === $_POST['multipleChoice'] ? 'display:block;' : 'display:none;';
|
1511 |
+
else
|
1512 |
+
$style = 'yes' === $poll->multipleChoice ? 'display:block;' : 'display:none;';
|
1513 |
+
?>
|
1514 |
+
<div id="numberChoices" name="numberChoices" style="padding-left:15px;<?php echo $style; ?>">
|
1515 |
+
<p>Number of choices: <select name="choices" id="choices"><option value="0">No Limit</option>
|
1516 |
+
<?php
|
1517 |
+
if ( $is_POST )
|
1518 |
+
$choices = (int) $_POST['choices'];
|
1519 |
+
else
|
1520 |
+
$choices = (int) $poll->choices;
|
1521 |
+
|
1522 |
+
if( $a > 1 ) :
|
1523 |
+
for( $i=2; $i<=$a; $i++ ) :
|
1524 |
+
$selected = $i == $choices ? 'selected="true"' : '';
|
1525 |
+
echo "<option value='$i' $selected>$i</option>";
|
1526 |
+
endfor;
|
1527 |
+
endif; ?>
|
1528 |
+
</select>
|
1529 |
+
</p>
|
1530 |
+
</div>
|
1531 |
+
</div>
|
1532 |
+
</div>
|
1533 |
+
|
1534 |
+
<div id="design" class="postbox">
|
1535 |
+
|
1536 |
+
<?php $style_ID = (int) ( $is_POST ? $_POST['styleID'] : $poll->styleID );
|
1537 |
+
|
1538 |
+
$iframe_view = false;
|
1539 |
+
if ( isset($_GET['iframe']) )
|
1540 |
+
$iframe_view = true;
|
1541 |
+
|
1542 |
+
$options = array(
|
1543 |
+
101 => 'Aluminum Narrow',
|
1544 |
+
102 => 'Aluminum Medium',
|
1545 |
+
103 => 'Aluminum Wide',
|
1546 |
+
104 => 'Plain White Narrow',
|
1547 |
+
105 => 'Plain White Medium',
|
1548 |
+
106 => 'Plain White Wide',
|
1549 |
+
107 => 'Plain Black Narrow',
|
1550 |
+
108 => 'Plain Black Medium',
|
1551 |
+
109 => 'Plain Black Wide',
|
1552 |
+
110 => 'Paper Narrow',
|
1553 |
+
111 => 'Paper Medium',
|
1554 |
+
112 => 'Paper Wide',
|
1555 |
+
113 => 'Skull Dark Narrow',
|
1556 |
+
114 => 'Skull Dark Medium',
|
1557 |
+
115 => 'Skull Dark Wide',
|
1558 |
+
116 => 'Skull Light Narrow',
|
1559 |
+
117 => 'Skull Light Medium',
|
1560 |
+
118 => 'Skull Light Wide',
|
1561 |
+
157 => 'Micro',
|
1562 |
+
119 => 'Plastic White Narrow',
|
1563 |
+
120 => 'Plastic White Medium',
|
1564 |
+
121 => 'Plastic White Wide',
|
1565 |
+
122 => 'Plastic Grey Narrow',
|
1566 |
+
123 => 'Plastic Grey Medium',
|
1567 |
+
124 => 'Plastic Grey Wide',
|
1568 |
+
125 => 'Plastic Black Narrow',
|
1569 |
+
126 => 'Plastic Black Medium',
|
1570 |
+
127 => 'Plastic Black Wide',
|
1571 |
+
128 => 'Manga Narrow',
|
1572 |
+
129 => 'Manga Medium',
|
1573 |
+
130 => 'Manga Wide',
|
1574 |
+
131 => 'Tech Dark Narrow',
|
1575 |
+
132 => 'Tech Dark Medium',
|
1576 |
+
133 => 'Tech Dark Wide',
|
1577 |
+
134 => 'Tech Grey Narrow',
|
1578 |
+
135 => 'Tech Grey Medium',
|
1579 |
+
136 => 'Tech Grey Wide',
|
1580 |
+
137 => 'Tech Light Narrow',
|
1581 |
+
138 => 'Tech Light Medium',
|
1582 |
+
139 => 'Tech Light Wide',
|
1583 |
+
140 => 'Working Male Narrow',
|
1584 |
+
141 => 'Working Male Medium',
|
1585 |
+
142 => 'Working Male Wide',
|
1586 |
+
143 => 'Working Female Narrow',
|
1587 |
+
144 => 'Working Female Medium',
|
1588 |
+
145 => 'Working Female Wide',
|
1589 |
+
146 => 'Thinking Male Narrow',
|
1590 |
+
147 => 'Thinking Male Medium',
|
1591 |
+
148 => 'Thinking Male Wide',
|
1592 |
+
149 => 'Thinking Female Narrow',
|
1593 |
+
150 => 'Thinking Female Medium',
|
1594 |
+
151 => 'Thinking Female Wide',
|
1595 |
+
152 => 'Sunset Narrow',
|
1596 |
+
153 => 'Sunset Medium',
|
1597 |
+
154 => 'Sunset Wide',
|
1598 |
+
155 => 'Music Medium',
|
1599 |
+
156 => 'Music Wide'
|
1600 |
+
);
|
1601 |
+
|
1602 |
+
$polldaddy->reset();
|
1603 |
+
$styles = $polldaddy->get_styles();
|
1604 |
+
|
1605 |
+
$show_custom = false;
|
1606 |
+
if( !empty( $styles ) && !empty( $styles->style ) && count( $styles->style ) > 0 ){
|
1607 |
+
foreach( (array) $styles->style as $style ){
|
1608 |
+
$options[ (int) $style->_id ] = $style->title;
|
1609 |
+
}
|
1610 |
+
$show_custom = true;
|
1611 |
+
}
|
1612 |
+
|
1613 |
+
if ( $style_ID > 18 ){
|
1614 |
+
$standard_style_ID = 0;
|
1615 |
+
$custom_style_ID = $style_ID;
|
1616 |
+
}
|
1617 |
+
else{
|
1618 |
+
$standard_style_ID = $style_ID;
|
1619 |
+
$custom_style_ID = 0;
|
1620 |
+
}
|
1621 |
+
?>
|
1622 |
+
|
1623 |
+
<h3><?php _e( 'Design', 'polldaddy' ); ?></h3>
|
1624 |
+
<input type="hidden" name="styleID" id="styleID" value="<?php echo $style_ID ?>">
|
1625 |
+
<div class="inside">
|
1626 |
+
<?php if ( $iframe_view ){ ?>
|
1627 |
+
<div id="design_standard" style="padding:0px;">
|
1628 |
+
<div class="hide-if-no-js">
|
1629 |
+
<table class="pollStyle">
|
1630 |
+
<thead>
|
1631 |
+
<tr>
|
1632 |
+
<th>
|
1633 |
+
<div style="display:none;">
|
1634 |
+
<input type="radio" name="styleTypeCB" id="regular" onclick="javascript:pd_build_styles( 0 );"/>
|
1635 |
+
</div>
|
1636 |
+
</th>
|
1637 |
+
</tr>
|
1638 |
+
</thead>
|
1639 |
+
<tr>
|
1640 |
+
<td class="selector">
|
1641 |
+
<table class="st_selector">
|
1642 |
+
<tr>
|
1643 |
+
<td class="dir_left">
|
1644 |
+
<a href="javascript:pd_move('prev');" style="width: 1em;display: block;font-size: 4em;text-decoration: none;">«</a>
|
1645 |
+
</td>
|
1646 |
+
<td class="img"><div class="st_image_loader"><div id="st_image" onmouseover="st_results(this, 'show');" onmouseout="st_results(this, 'hide');"></div></div></td>
|
1647 |
+
<td class="dir_right">
|
1648 |
+
<a href="javascript:pd_move('next');" style="width: 1em;display: block;font-size: 4em;text-decoration: none;">»</a>
|
1649 |
+
</td>
|
1650 |
+
</tr>
|
1651 |
+
<tr>
|
1652 |
+
<td></td>
|
1653 |
+
<td class="counter">
|
1654 |
+
<div id="st_number"></div>
|
1655 |
+
</td>
|
1656 |
+
<td></td>
|
1657 |
+
</tr>
|
1658 |
+
<tr>
|
1659 |
+
<td></td>
|
1660 |
+
<td class="title">
|
1661 |
+
<div id="st_name"></div>
|
1662 |
+
</td>
|
1663 |
+
<td></td>
|
1664 |
+
</tr>
|
1665 |
+
<tr>
|
1666 |
+
<td></td>
|
1667 |
+
<td>
|
1668 |
+
<div id="st_sizes"></div>
|
1669 |
+
</td>
|
1670 |
+
<td></td>
|
1671 |
+
</tr>
|
1672 |
+
<tr>
|
1673 |
+
<td colspan="3">
|
1674 |
+
<div id="st_description"></div>
|
1675 |
+
</td>
|
1676 |
+
</tr>
|
1677 |
+
</table>
|
1678 |
+
</td>
|
1679 |
+
</tr>
|
1680 |
+
</table>
|
1681 |
+
</div>
|
1682 |
+
|
1683 |
+
<p class="empty-if-js" id="no-js-styleID">
|
1684 |
+
<select id="styleID" name="styleID">
|
1685 |
+
|
1686 |
+
<?php foreach ( $options as $styleID => $label ) :
|
1687 |
+
$selected = $styleID == $style_ID ? ' selected="selected"' : ''; ?>
|
1688 |
+
<option value="<?php echo (int) $styleID; ?>"<?php echo $selected; ?>><?php echo wp_specialchars( $label ); ?></option>
|
1689 |
+
<?php endforeach; ?>
|
1690 |
+
|
1691 |
+
</select>
|
1692 |
+
</p>
|
1693 |
+
</div>
|
1694 |
+
<?php if ( $show_custom ){ ?>
|
1695 |
+
<div id="design_custom">
|
1696 |
+
<p class="hide-if-no-js">
|
1697 |
+
<table class="pollStyle">
|
1698 |
+
<thead>
|
1699 |
+
<tr>
|
1700 |
+
<th>
|
1701 |
+
<div style="display:none;">
|
1702 |
+
<?php $disabled = $show_custom == false ? ' disabled="true"' : ''; ?>
|
1703 |
+
<input type="radio" name="styleTypeCB" id="custom" onclick="javascript:pd_change_style(_$('customSelect').value);" <?php echo $disabled; ?>></input>
|
1704 |
+
<label onclick="javascript:pd_change_style(_$('customSelect').value);"><?php _e( 'Custom Style', 'polldaddy' ); ?></label>
|
1705 |
+
</div>
|
1706 |
+
</th>
|
1707 |
+
</tr>
|
1708 |
+
</thead>
|
1709 |
+
<tbody>
|
1710 |
+
<tr>
|
1711 |
+
<td class="customSelect">
|
1712 |
+
<table>
|
1713 |
+
<tr>
|
1714 |
+
<td><?php $hide = $show_custom == true ? ' style="display:block;"' : ' style="display:none;"'; ?>
|
1715 |
+
<select id="customSelect" name="customSelect" onclick="pd_change_style(this.value);" <?php echo $hide ?>>
|
1716 |
+
<?php $selected = $custom_style_ID == 0 ? ' selected="selected"' : ''; ?>
|
1717 |
+
<option value="x"<?php echo $selected; ?>><?php _e( 'Please choose a custom style...', 'polldaddy' ); ?></option>
|
1718 |
+
<?php if( $show_custom) : foreach ( (array)$styles->style as $style ) :
|
1719 |
+
$selected = $style->_id == $custom_style_ID ? ' selected="selected"' : ''; ?>
|
1720 |
+
<option value="<?php echo (int) $style->_id; ?>"<?php echo $selected; ?>><?php echo wp_specialchars( $style->title ); ?></option>
|
1721 |
+
<?php endforeach; endif; ?>
|
1722 |
+
</select>
|
1723 |
+
<div id="styleIDErr" class="formErr" style="display:none;"><?php _e( 'Please choose a style.', 'polldaddy' ); ?></div></td>
|
1724 |
+
</tr>
|
1725 |
+
<tr>
|
1726 |
+
<td><?php $extra = $show_custom == false ? 'You currently have no custom styles created.' : ''; ?>
|
1727 |
+
<p><?php echo $extra ?></p>
|
1728 |
+
<p><?php printf( __( 'Did you know we have a new editor for building your own custom poll styles? Find out more <a href="%s" target="_blank">here</a>.', 'polldaddy' ), 'http://support.polldaddy.com/custom-poll-styles/' ); ?></p>
|
1729 |
+
</td>
|
1730 |
+
</tr>
|
1731 |
+
</table>
|
1732 |
+
</td>
|
1733 |
+
</tr>
|
1734 |
+
</tbody>
|
1735 |
+
</table>
|
1736 |
+
</p>
|
1737 |
+
</div>
|
1738 |
+
<div id="design_options">
|
1739 |
+
<a href="#" class="polldaddy-show-design-options"><?php _e( 'Custom Styles', 'polldaddy' ); ?></a>
|
1740 |
+
</div>
|
1741 |
+
<?php }}else{?>
|
1742 |
+
<div class="design_standard">
|
1743 |
+
<div class="hide-if-no-js">
|
1744 |
+
<table class="pollStyle">
|
1745 |
+
<thead>
|
1746 |
+
<tr>
|
1747 |
+
<th class="cb">
|
1748 |
+
<input type="radio" name="styleTypeCB" id="regular" onclick="javascript:pd_build_styles( 0 );"/>
|
1749 |
+
</th>
|
1750 |
+
<th>
|
1751 |
+
<label for="skin" onclick="javascript:pd_build_styles( 0 );"><?php _e( 'PollDaddy Style', 'polldaddy' ); ?></label>
|
1752 |
+
</th>
|
1753 |
+
<th/>
|
1754 |
+
<th class="cb">
|
1755 |
+
<?php $disabled = $show_custom == false ? ' disabled="true"' : ''; ?>
|
1756 |
+
<input type="radio" name="styleTypeCB" id="custom" onclick="javascript:pd_change_style(_$('customSelect').value);" <?php echo $disabled; ?>></input>
|
1757 |
+
</th>
|
1758 |
+
<th>
|
1759 |
+
<label onclick="javascript:pd_change_style(_$('customSelect').value);"><?php _e( 'Custom Style', 'polldaddy' ); ?></label>
|
1760 |
+
</th>
|
1761 |
+
</tr>
|
1762 |
+
</thead>
|
1763 |
+
<tbody>
|
1764 |
+
<tr>
|
1765 |
+
<td/>
|
1766 |
+
<td class="selector">
|
1767 |
+
<table class="st_selector">
|
1768 |
+
<tr>
|
1769 |
+
<td class="dir_left">
|
1770 |
+
<a href="javascript:pd_move('prev');" style="width: 1em;display: block;font-size: 4em;text-decoration: none;">«</a>
|
1771 |
+
</td>
|
1772 |
+
<td class="img"><div class="st_image_loader"><div id="st_image" onmouseover="st_results(this, 'show');" onmouseout="st_results(this, 'hide');"></div></div></td>
|
1773 |
+
<td class="dir_right">
|
1774 |
+
<a href="javascript:pd_move('next');" style="width: 1em;display: block;font-size: 4em;text-decoration: none;">»</a>
|
1775 |
+
</td>
|
1776 |
+
</tr>
|
1777 |
+
<tr>
|
1778 |
+
<td></td>
|
1779 |
+
<td class="counter">
|
1780 |
+
<div id="st_number"></div>
|
1781 |
+
</td>
|
1782 |
+
<td></td>
|
1783 |
+
</tr>
|
1784 |
+
<tr>
|
1785 |
+
<td></td>
|
1786 |
+
<td class="title">
|
1787 |
+
<div id="st_name"></div>
|
1788 |
+
</td>
|
1789 |
+
<td></td>
|
1790 |
+
</tr>
|
1791 |
+
<tr>
|
1792 |
+
<td></td>
|
1793 |
+
<td>
|
1794 |
+
<div id="st_sizes"></div>
|
1795 |
+
</td>
|
1796 |
+
<td></td>
|
1797 |
+
</tr>
|
1798 |
+
<tr>
|
1799 |
+
<td colspan="3">
|
1800 |
+
<div id="st_description"></div>
|
1801 |
+
</td>
|
1802 |
+
</tr>
|
1803 |
+
</table>
|
1804 |
+
</td>
|
1805 |
+
<td width="100"></td>
|
1806 |
+
<td/>
|
1807 |
+
<td class="customSelect">
|
1808 |
+
<table>
|
1809 |
+
<tr>
|
1810 |
+
<td><?php $hide = $show_custom == true ? ' style="display:block;"' : ' style="display:none;"'; ?>
|
1811 |
+
<select id="customSelect" name="customSelect" onclick="pd_change_style(this.value);" <?php echo $hide ?>>
|
1812 |
+
<?php $selected = $custom_style_ID == 0 ? ' selected="selected"' : ''; ?>
|
1813 |
+
<option value="x"<?php echo $selected; ?>><?php _e( 'Please choose a custom style...'); ?></option>
|
1814 |
+
<?php if( $show_custom) : foreach ( (array)$styles->style as $style ) :
|
1815 |
+
$selected = $style->_id == $custom_style_ID ? ' selected="selected"' : ''; ?>
|
1816 |
+
<option value="<?php echo (int) $style->_id; ?>"<?php echo $selected; ?>><?php echo wp_specialchars( $style->title ); ?></option>
|
1817 |
+
<?php endforeach; endif;?>
|
1818 |
+
</select>
|
1819 |
+
<div id="styleIDErr" class="formErr" style="display:none;"><?php _e( 'Please choose a style.'); ?></div></td>
|
1820 |
+
</tr>
|
1821 |
+
<tr>
|
1822 |
+
<td><?php $extra = $show_custom == false ? 'You currently have no custom styles created.' : ''; ?>
|
1823 |
+
<p><?php echo $extra ?></p>
|
1824 |
+
<p><?php printf( __( 'Did you know we have a new editor for building your own custom poll styles? Find out more <a href="%s" target="_blank">here</a>.', 'polldaddy' ), 'http://support.polldaddy.com/custom-poll-styles/' ); ?></p>
|
1825 |
+
</td>
|
1826 |
+
</tr>
|
1827 |
+
</table>
|
1828 |
+
</td>
|
1829 |
+
</tr>
|
1830 |
+
</tbody>
|
1831 |
+
</table>
|
1832 |
+
</div>
|
1833 |
+
<p class="empty-if-js" id="no-js-styleID">
|
1834 |
+
<select id="styleID" name="styleID">
|
1835 |
+
|
1836 |
+
<?php foreach ( $options as $styleID => $label ) :
|
1837 |
+
$selected = $styleID == $style_ID ? ' selected="selected"' : ''; ?>
|
1838 |
+
<option value="<?php echo (int) $styleID; ?>"<?php echo $selected; ?>><?php echo wp_specialchars( $label ); ?></option>
|
1839 |
+
<?php endforeach; ?>
|
1840 |
+
|
1841 |
+
</select>
|
1842 |
+
</p>
|
1843 |
+
</div>
|
1844 |
+
<?php } ?>
|
1845 |
+
<script language="javascript">
|
1846 |
+
current_pos = 0;
|
1847 |
+
pd_build_styles( current_pos );
|
1848 |
+
<?php if( $style_ID > 0 && $style_ID <= 1000 ){ ?>
|
1849 |
+
pd_pick_style( <?php echo $style_ID ?> );
|
1850 |
+
<?php }else{ ?>
|
1851 |
+
pd_change_style( <?php echo $style_ID ?> );
|
1852 |
+
<?php } ?>
|
1853 |
+
</script>
|
1854 |
+
</div>
|
1855 |
+
|
1856 |
+
</div>
|
1857 |
+
|
1858 |
+
</div>
|
1859 |
+
</div></div>
|
1860 |
+
</form>
|
1861 |
+
<br class="clear" />
|
1862 |
+
|
1863 |
+
<?php
|
1864 |
+
}
|
1865 |
+
|
1866 |
+
function poll_results_page( $poll_id ) {
|
1867 |
+
$polldaddy = $this->get_client( WP_POLLDADDY__PARTNERGUID, $this->user_code );
|
1868 |
+
$polldaddy->reset();
|
1869 |
+
|
1870 |
+
$results = $polldaddy->get_poll_results( $poll_id );
|
1871 |
+
?>
|
1872 |
+
|
1873 |
+
<table class="poll-results widefat">
|
1874 |
+
<thead>
|
1875 |
+
<tr>
|
1876 |
+
<th scope="col" class="column-title"><?php _e( 'Answer', 'polldaddy' ); ?></th>
|
1877 |
+
<th scope="col" class="column-vote"><?php _e( 'Votes', 'polldaddy' ); ?></th>
|
1878 |
+
</tr>
|
1879 |
+
</thead>
|
1880 |
+
<tbody>
|
1881 |
+
|
1882 |
+
<?php
|
1883 |
+
$class = '';
|
1884 |
+
foreach ( $results->answers as $answer ) :
|
1885 |
+
$answer->text = trim( strip_tags( $answer->text ) );
|
1886 |
+
if( strlen( $answer->text ) == 0 ){
|
1887 |
+
$answer->text = '-- empty HTML tag --';
|
1888 |
+
}
|
1889 |
+
|
1890 |
+
$class = $class ? '' : ' class="alternate"';
|
1891 |
+
$content = $results->others && 'Other answer...' === $answer->text ? sprintf( __( 'Other (<a href="%s">see below</a>)', 'polldaddy' ), '#other-answers-results' ) : wp_specialchars( $answer->text );
|
1892 |
+
|
1893 |
+
?>
|
1894 |
+
|
1895 |
+
<tr<?php echo $class; ?>>
|
1896 |
+
<th scope="row" class="column-title"><?php echo $content; ?></th>
|
1897 |
+
<td class="column-vote">
|
1898 |
+
<div class="result-holder">
|
1899 |
+
<span class="result-bar" style="width: <?php echo number_format( $answer->_percent, 2 ); ?>%;"> </span>
|
1900 |
+
<span class="result-total alignleft"><?php echo number_format_i18n( $answer->_total ); ?></span>
|
1901 |
+
<span class="result-percent alignright"><?php echo number_format_i18n( $answer->_percent ); ?>%</span>
|
1902 |
+
</div>
|
1903 |
+
</td>
|
1904 |
+
</tr>
|
1905 |
+
<?php
|
1906 |
+
endforeach;
|
1907 |
+
?>
|
1908 |
+
|
1909 |
+
</tbody>
|
1910 |
+
</table>
|
1911 |
+
|
1912 |
+
<?php
|
1913 |
+
|
1914 |
+
if ( !$results->others )
|
1915 |
+
return;
|
1916 |
+
?>
|
1917 |
+
|
1918 |
+
<table id="other-answers-results" class="poll-others widefat">
|
1919 |
+
<thead>
|
1920 |
+
<tr>
|
1921 |
+
<th scope="col" class="column-title"><?php _e( 'Other Answer', 'polldaddy' ); ?></th>
|
1922 |
+
<th scope="col" class="column-vote"><?php _e( 'Votes', 'polldaddy' ); ?></th>
|
1923 |
+
</tr>
|
1924 |
+
</thead>
|
1925 |
+
<tbody>
|
1926 |
+
|
1927 |
+
<?php
|
1928 |
+
$class = '';
|
1929 |
+
$others = array_count_values( $results->others );
|
1930 |
+
arsort( $others );
|
1931 |
+
foreach ( $others as $other => $freq ) :
|
1932 |
+
$class = $class ? '' : ' class="alternate"';
|
1933 |
+
?>
|
1934 |
+
|
1935 |
+
<tr<?php echo $class; ?>>
|
1936 |
+
<th scope="row" class="column-title"><?php echo wp_specialchars( $other ); ?></th>
|
1937 |
+
<td class="column-vote"><?php echo number_format_i18n( $freq ); ?></td>
|
1938 |
+
</tr>
|
1939 |
+
<?php
|
1940 |
+
endforeach;
|
1941 |
+
?>
|
1942 |
+
|
1943 |
+
</tbody>
|
1944 |
+
</table>
|
1945 |
+
|
1946 |
+
<?php
|
1947 |
+
}
|
1948 |
+
|
1949 |
+
function styles_table() {
|
1950 |
+
$polldaddy = $this->get_client( WP_POLLDADDY__PARTNERGUID, $this->user_code );
|
1951 |
+
$polldaddy->reset();
|
1952 |
+
|
1953 |
+
$styles_object = $polldaddy->get_styles();
|
1954 |
+
|
1955 |
+
$this->parse_errors( $polldaddy );
|
1956 |
+
$this->print_errors();
|
1957 |
+
$styles = & $styles_object->style;
|
1958 |
+
$class = '';
|
1959 |
+
$styles_exist = false;
|
1960 |
+
|
1961 |
+
foreach ( (array)$styles as $style ) :
|
1962 |
+
if( (int) $style->_type == 1 ):
|
1963 |
+
$styles_exist = true;
|
1964 |
+
break;
|
1965 |
+
endif;
|
1966 |
+
endforeach;
|
1967 |
+
?>
|
1968 |
+
|
1969 |
+
<form method="post" action="">
|
1970 |
+
<div class="tablenav">
|
1971 |
+
<div class="alignleft">
|
1972 |
+
<select name="action">
|
1973 |
+
<option selected="selected" value=""><?php _e( 'Actions', 'polldaddy' ); ?></option>
|
1974 |
+
<option value="delete-style"><?php _e( 'Delete', 'polldaddy' ); ?></option>
|
1975 |
+
</select>
|
1976 |
+
<input class="button-secondary action" type="submit" name="doaction" value="<?php _e( 'Apply', 'polldaddy' ); ?>" />
|
1977 |
+
<?php wp_nonce_field( 'action-style_bulk' ); ?>
|
1978 |
+
</div>
|
1979 |
+
<div class="tablenav-pages"></div>
|
1980 |
+
</div>
|
1981 |
+
<br class="clear" />
|
1982 |
+
<table class="widefat">
|
1983 |
+
<thead>
|
1984 |
+
<tr>
|
1985 |
+
<th id="cb" class="manage-column column-cb check-column" scope="col" /><input type="checkbox" /></th>
|
1986 |
+
<th id="title" class="manage-column column-title" scope="col"><?php _e( 'Style', 'polldaddy' ); ?></th>
|
1987 |
+
<th id="date" class="manage-column column-date" scope="col"><?php _e( 'Last Modified', 'polldaddy' ); ?></th>
|
1988 |
+
</tr>
|
1989 |
+
</thead>
|
1990 |
+
<tbody>
|
1991 |
+
|
1992 |
+
<?php
|
1993 |
+
if ( $styles_exist ) :
|
1994 |
+
foreach ( $styles as $style ) :
|
1995 |
+
if( (int) $style->_type == 1 ):
|
1996 |
+
$style_id = (int) $style->_id;
|
1997 |
+
|
1998 |
+
$class = $class ? '' : ' class="alternate"';
|
1999 |
+
$edit_link = clean_url( add_query_arg( array( 'action' => 'edit-style', 'style' => $style_id, 'message' => false ) ) );
|
2000 |
+
$delete_link = clean_url( wp_nonce_url( add_query_arg( array( 'action' => 'delete-style', 'style' => $style_id, 'message' => false ) ), "delete-style_$style_id" ) );
|
2001 |
+
list($style_time) = explode( '.', $style->date );
|
2002 |
+
$style_time = strtotime( $style_time );
|
2003 |
+
?>
|
2004 |
+
|
2005 |
+
<tr<?php echo $class; ?>>
|
2006 |
+
<th class="check-column" scope="row"><input type="checkbox" value="<?php echo (int) $style_id; ?>" name="style[]" /></th>
|
2007 |
+
<td class="post-title column-title">
|
2008 |
+
<?php if ( $edit_link ) : ?>
|
2009 |
+
<strong><a class="row-title" href="<?php echo $edit_link; ?>"><?php echo wp_specialchars( $style->title ); ?></a></strong>
|
2010 |
+
<span class="edit"><a href="<?php echo $edit_link; ?>"><?php _e( 'Edit', 'polldaddy' ); ?></a> | </span>
|
2011 |
+
<?php else : ?>
|
2012 |
+
<strong><?php echo wp_specialchars( $style->title ); ?></strong>
|
2013 |
+
<?php endif; ?>
|
2014 |
+
|
2015 |
+
<span class="delete"><a class="delete-poll delete" href="<?php echo $delete_link; ?>"><?php _e( 'Delete', 'polldaddy' ); ?></a></span>
|
2016 |
+
</td>
|
2017 |
+
<td class="date column-date"><abbr title="<?php echo date( __('Y/m/d g:i:s A', 'polldaddy'), $style_time ); ?>"><?php echo date( __('Y/m/d', 'polldaddy'), $style_time ); ?></abbr></td>
|
2018 |
+
</tr>
|
2019 |
+
|
2020 |
+
<?php
|
2021 |
+
endif;
|
2022 |
+
endforeach;
|
2023 |
+
else : // $styles
|
2024 |
+
?>
|
2025 |
+
|
2026 |
+
<tr>
|
2027 |
+
<td colspan="4"><?php printf( __( 'No custom styles yet. <a href="%s">Create one</a>', 'polldaddy' ), clean_url( add_query_arg( array( 'action' => 'create-style' ) ) ) ); ?></td>
|
2028 |
+
</tr>
|
2029 |
+
<?php endif; // $styles ?>
|
2030 |
+
|
2031 |
+
</tbody>
|
2032 |
+
</table>
|
2033 |
+
</form>
|
2034 |
+
<div class="tablenav">
|
2035 |
+
<div class="tablenav-pages"></div>
|
2036 |
+
</div>
|
2037 |
+
<br class="clear" />
|
2038 |
+
|
2039 |
+
<?php
|
2040 |
+
}
|
2041 |
+
|
2042 |
+
function style_edit_form( $style_id = 105 ) {
|
2043 |
+
$style_id = (int) $style_id;
|
2044 |
+
|
2045 |
+
$polldaddy = $this->get_client( WP_POLLDADDY__PARTNERGUID, $this->user_code );
|
2046 |
+
$polldaddy->reset();
|
2047 |
+
|
2048 |
+
$is_POST = 'post' == strtolower( $_SERVER['REQUEST_METHOD'] );
|
2049 |
+
|
2050 |
+
if ( $style_id ) {
|
2051 |
+
$style = $polldaddy->get_style( $style_id );
|
2052 |
+
$this->parse_errors( $polldaddy );
|
2053 |
+
} else {
|
2054 |
+
$style = polldaddy_style( array(), null, false );
|
2055 |
+
}
|
2056 |
+
|
2057 |
+
$style->css = trim( urldecode( $style->css ) );
|
2058 |
+
|
2059 |
+
if ( $start = stripos( $style->css, '<data>' ) )
|
2060 |
+
$style->css = substr( $style->css, $start );
|
2061 |
+
|
2062 |
+
$style->css = addslashes( $style->css );
|
2063 |
+
|
2064 |
+
$preload_style_id = 0;
|
2065 |
+
$preload_style = null;
|
2066 |
+
|
2067 |
+
if ( isset ( $_REQUEST['preload'] ) )
|
2068 |
+
{
|
2069 |
+
$preload_style_id = (int) $_REQUEST['preload'];
|
2070 |
+
|
2071 |
+
if ( $preload_style_id > 1000 || $preload_style_id < 100 )
|
2072 |
+
$preload_style_id = 0;
|
2073 |
+
|
2074 |
+
if ( $preload_style_id > 0 ) {
|
2075 |
+
$polldaddy->reset();
|
2076 |
+
$preload_style = $polldaddy->get_style( $preload_style_id );
|
2077 |
+
$this->parse_errors( $polldaddy );
|
2078 |
+
}
|
2079 |
+
|
2080 |
+
$preload_style->css = trim( urldecode( $preload_style->css ) );
|
2081 |
+
|
2082 |
+
if ( $start = stripos( $preload_style->css, '<data>' ) )
|
2083 |
+
$preload_style->css = substr( $preload_style->css, $start );
|
2084 |
+
|
2085 |
+
$style->css = addslashes( $preload_style->css );
|
2086 |
+
}
|
2087 |
+
|
2088 |
+
$this->print_errors();
|
2089 |
+
|
2090 |
+
echo '<script language="javascript">var CSSXMLString = "' . $style->css .'";</script>';
|
2091 |
+
?>
|
2092 |
+
|
2093 |
+
<form action="" method="post">
|
2094 |
+
<div id="poststuff">
|
2095 |
+
<div id="post-body">
|
2096 |
+
<br/>
|
2097 |
+
<table width="100%">
|
2098 |
+
<tr>
|
2099 |
+
<td colspan="2">
|
2100 |
+
<table width="100%">
|
2101 |
+
<tr>
|
2102 |
+
<td valign="middle" width="8%">
|
2103 |
+
<label class="CSSE_title_label"><?php _e( 'Style Name', 'polldaddy' ); ?></label>
|
2104 |
+
</td>
|
2105 |
+
<td>
|
2106 |
+
<div id="titlediv" style="margin:0px;">
|
2107 |
+
<div id="titlewrap">
|
2108 |
+
<input type="text" autocomplete="off" id="title" value="<?php echo $style_id > 1000 ? $style->title : ''; ?>" tabindex="1" size="30" name="style-title"></input>
|
2109 |
+
</div>
|
2110 |
+
</div>
|
2111 |
+
</td>
|
2112 |
+
</tr>
|
2113 |
+
</table>
|
2114 |
+
</td>
|
2115 |
+
</tr>
|
2116 |
+
<tr>
|
2117 |
+
<td width="13%">
|
2118 |
+
<label class="CSSE_title_label"><?php _e( 'Preload Basic Style', 'polldaddy' ); ?></label>
|
2119 |
+
</td>
|
2120 |
+
<td>
|
2121 |
+
<div class="CSSE_preload">
|
2122 |
+
<select id="preload_value">
|
2123 |
+
<option value="0"></option>
|
2124 |
+
<option value="102">Aluminum</option>
|
2125 |
+
<option value="105">Plain White</option>
|
2126 |
+
<option value="108">Plain Black</option>
|
2127 |
+
<option value="111">Paper</option>
|
2128 |
+
<option value="114">Skull Dark</option>
|
2129 |
+
<option value="117">Skull Light</option>
|
2130 |
+
<option value="157">Micro</option>
|
2131 |
+
</select>
|
2132 |
+
<a tabindex="4" id="style-preload" href="javascript:preload_pd_style();" class="button"><?php echo attribute_escape( __( 'Load Style', 'polldaddy' ) ); ?></a>
|
2133 |
+
</div>
|
2134 |
+
</td>
|
2135 |
+
</tr>
|
2136 |
+
<tr>
|
2137 |
+
<td width="13%">
|
2138 |
+
<p>Choose a part to edit...</p>
|
2139 |
+
</td>
|
2140 |
+
<td>
|
2141 |
+
<select id="styleName" onchange="renderStyleEdit(this.value);">
|
2142 |
+
<option value="pds-box" selected="selected">Poll Box</option>
|
2143 |
+
<option value="pds-question-top">Question</option>
|
2144 |
+
<option value="pds-answer-group">Answer Group</option>
|
2145 |
+
<option value="pds-answer-input">Answer Check</option>
|
2146 |
+
<option value="pds-answer">Answers</option>
|
2147 |
+
<option value="pds-textfield">Other Input</option>
|
2148 |
+
<option value="pds-vote-button">Vote Button</option>
|
2149 |
+
<option value="pds-link">Links</option>
|
2150 |
+
<option value="pds-answer-feedback">Result Background</option>
|
2151 |
+
<option value="pds-answer-feedback-bar">Result Bar</option>
|
2152 |
+
<option value="pds-totalvotes-inner">Total Votes</option>
|
2153 |
+
</select>
|
2154 |
+
</td>
|
2155 |
+
</tr>
|
2156 |
+
</table>
|
2157 |
+
<table width="100%">
|
2158 |
+
<tr>
|
2159 |
+
<td valign="top">
|
2160 |
+
<table class="CSSE_main">
|
2161 |
+
<tr>
|
2162 |
+
<td class="CSSE_main_l" valign="top">
|
2163 |
+
<div class="off" id="D_Font">
|
2164 |
+
<a href="javascript:CSSE_changeView('Font');" id="A_Font" class="Aoff">Font</a>
|
2165 |
+
</div>
|
2166 |
+
<div class="on" id="D_Background">
|
2167 |
+
<a href="javascript:CSSE_changeView('Background');" id="A_Background" class="Aon">Background</a>
|
2168 |
+
</div>
|
2169 |
+
<div class="off" id="D_Border">
|
2170 |
+
<a href="javascript:CSSE_changeView('Border');" id="A_Border" class="Aoff">Border</a>
|
2171 |
+
</div>
|
2172 |
+
<div class="off" id="D_Margin">
|
2173 |
+
<a href="javascript:CSSE_changeView('Margin');" id="A_Margin" class="Aoff">Margin</a>
|
2174 |
+
</div>
|
2175 |
+
<div class="off" id="D_Padding">
|
2176 |
+
<a href="javascript:CSSE_changeView('Padding');" id="A_Padding" class="Aoff">Padding</a>
|
2177 |
+
</div>
|
2178 |
+
<div class="off" id="D_Scale">
|
2179 |
+
<a href="javascript:CSSE_changeView('Scale');" id="A_Scale" class="Aoff">Width</a>
|
2180 |
+
</div>
|
2181 |
+
<div class="off" id="D_Height">
|
2182 |
+
<a href="javascript:CSSE_changeView('Height');" id="A_Height" class="Aoff">Height</a>
|
2183 |
+
</div>
|
2184 |
+
</td>
|
2185 |
+
<td class="CSSE_main_r" valign="top">
|
2186 |
+
<table class="CSSE_sub">
|
2187 |
+
<tr>
|
2188 |
+
<td class="top"/>
|
2189 |
+
</tr>
|
2190 |
+
<tr>
|
2191 |
+
<td class="mid">
|
2192 |
+
<!-- Font Table -->
|
2193 |
+
<table class="CSSE_edit" id="editFont" style="display:none;">
|
2194 |
+
<tr>
|
2195 |
+
<td width="85">Font Size:</td>
|
2196 |
+
<td>
|
2197 |
+
<select id="font-size" onchange="bind(this);">
|
2198 |
+
<option value="6px">6px</option>
|
2199 |
+
<option value="8px">8px</option>
|
2200 |
+
<option value="9px">9px</option>
|
2201 |
+
<option value="10px">10px</option>
|
2202 |
+
<option value="11px">11px</option>
|
2203 |
+
<option value="12px">12px</option>
|
2204 |
+
<option value="13px">13px</option>
|
2205 |
+
<option value="14px">14px</option>
|
2206 |
+
<option value="15px">15px</option>
|
2207 |
+
<option value="16px">16px</option>
|
2208 |
+
<option value="18px">18px</option>
|
2209 |
+
<option value="20px">20px</option>
|
2210 |
+
<option value="24px">24px</option>
|
2211 |
+
<option value="30px">30px</option>
|
2212 |
+
<option value="36px">36px</option>
|
2213 |
+
</select>
|
2214 |
+
</td>
|
2215 |
+
</tr>
|
2216 |
+
<tr>
|
2217 |
+
<td>Font Size</td>
|
2218 |
+
<td>
|
2219 |
+
<select id="font-family" onchange="bind(this);">
|
2220 |
+
<option value="Arial">Arial</option>
|
2221 |
+
<option value="Comic Sans MS">Comic Sans MS</option>
|
2222 |
+
<option value="Courier">Courier</option>
|
2223 |
+
<option value="Georgia">Georgia</option>
|
2224 |
+
<option value="Lucida Grande">Lucida Grande</option>
|
2225 |
+
<option value="Trebuchet MS">Trebuchet MS</option>
|
2226 |
+
<option value="Times">Times</option>
|
2227 |
+
<option value="Verdana">Verdana</option>
|
2228 |
+
</select>
|
2229 |
+
</td>
|
2230 |
+
</tr>
|
2231 |
+
<tr>
|
2232 |
+
<td>Color (#hex):</td>
|
2233 |
+
<td>
|
2234 |
+
<input type="text" maxlength="11" id="color" class="elmColor jscolor-picker" onblur="bind(this);" style="float:left;"/>
|
2235 |
+
</td>
|
2236 |
+
</tr>
|
2237 |
+
<tr>
|
2238 |
+
<td>Bold:</td>
|
2239 |
+
<td>
|
2240 |
+
<input type="checkbox" id="font-weight" value="bold" onclick="bind(this);"/>
|
2241 |
+
</td>
|
2242 |
+
</tr>
|
2243 |
+
<tr>
|
2244 |
+
<td>Italic:</td>
|
2245 |
+
<td>
|
2246 |
+
<input type="checkbox" id="font-style" value="italic" onclick="bind(this);"/>
|
2247 |
+
</td>
|
2248 |
+
</tr>
|
2249 |
+
<tr>
|
2250 |
+
<td>Underline:</td>
|
2251 |
+
<td>
|
2252 |
+
<input type="checkbox" id="text-decoration" value="underline" onclick="bind(this);"/>
|
2253 |
+
</td>
|
2254 |
+
</tr>
|
2255 |
+
<tr>
|
2256 |
+
<td>Line Height:</td>
|
2257 |
+
<td>
|
2258 |
+
<select id="line-height" onchange="bind(this);">
|
2259 |
+
<option value="6px">6px</option>
|
2260 |
+
<option value="8px">8px</option>
|
2261 |
+
<option value="9px">9px</option>
|
2262 |
+
<option value="10px">10px</option>
|
2263 |
+
<option value="11px">11px</option>
|
2264 |
+
<option value="12px">12px</option>
|
2265 |
+
<option value="13px">13px</option>
|
2266 |
+
<option value="14px">14px</option>
|
2267 |
+
<option value="15px">15px</option>
|
2268 |
+
<option value="16px">16px</option>
|
2269 |
+
<option value="18px">18px</option>
|
2270 |
+
<option value="20px">20px</option>
|
2271 |
+
<option value="24px">24px</option>
|
2272 |
+
<option value="30px">30px</option>
|
2273 |
+
<option value="36px">36px</option>
|
2274 |
+
</select>
|
2275 |
+
</td>
|
2276 |
+
</tr>
|
2277 |
+
<tr>
|
2278 |
+
<td>Align:</td>
|
2279 |
+
<td>
|
2280 |
+
<select id="text-align" onchange="bind(this);">
|
2281 |
+
<option value="left">Left</option>
|
2282 |
+
<option value="center">Center</option>
|
2283 |
+
<option value="right">Right</option>
|
2284 |
+
</select>
|
2285 |
+
</td>
|
2286 |
+
</tr>
|
2287 |
+
</table>
|
2288 |
+
<!-- Background Table -->
|
2289 |
+
<table class="CSSE_edit" id="editBackground" style="display:none;">
|
2290 |
+
<tr>
|
2291 |
+
<td width="85">Color (#hex):</td>
|
2292 |
+
<td>
|
2293 |
+
<input type="text" maxlength="11" id="background-color" class="elmColor jscolor-picker" onblur="bind(this);"/>
|
2294 |
+
</td>
|
2295 |
+
</tr>
|
2296 |
+
<tr>
|
2297 |
+
<td>Image URL: <a class="noteLink" title="Click here for more information" onclick="showNote('noteImageURL',this, 'Image URL');">(?)</a></td>
|
2298 |
+
<td>
|
2299 |
+
<input type="text" id="background-image" onblur="bind(this);"/>
|
2300 |
+
</td>
|
2301 |
+
</tr>
|
2302 |
+
<tr>
|
2303 |
+
<td>Image Repeat:</td>
|
2304 |
+
<td>
|
2305 |
+
<select id="background-repeat" onchange="bind(this);">
|
2306 |
+
<option value="repeat">repeat</option>
|
2307 |
+
<option value="no-repeat">no-repeat</option>
|
2308 |
+
<option value="repeat-x">repeat-x</option>
|
2309 |
+
<option value="repeat-y">repeat-y</option>
|
2310 |
+
</select>
|
2311 |
+
</td>
|
2312 |
+
</tr>
|
2313 |
+
<tr>
|
2314 |
+
<td>Image Position:</td>
|
2315 |
+
<td>
|
2316 |
+
<select id="background-position" onchange="bind(this);">
|
2317 |
+
<option value="left top">left top</option>
|
2318 |
+
<option value="left center">left center</option>
|
2319 |
+
<option value="left bottom">left bottom</option>
|
2320 |
+
<option value="center top">center top</option>
|
2321 |
+
<option value="center center">center center</option>
|
2322 |
+
<option value="center bottom">center bottom</option>
|
2323 |
+
<option value="right top">right top</option>
|
2324 |
+
<option value="right center">right center</option>
|
2325 |
+
<option value="right bottom">right bottom</option>
|
2326 |
+
</select>
|
2327 |
+
</td>
|
2328 |
+
</tr>
|
2329 |
+
</table>
|
2330 |
+
<!-- Border Table -->
|
2331 |
+
<table class="CSSE_edit" id="editBorder" style="display:none;">
|
2332 |
+
<tr>
|
2333 |
+
<td width="85">Width:</td>
|
2334 |
+
<td>
|
2335 |
+
<select id="border-width" onchange="bind(this);">
|
2336 |
+
<option value="0px">0px</option>
|
2337 |
+
<option value="1px">1px</option>
|
2338 |
+
<option value="2px">2px</option>
|
2339 |
+
<option value="3px">3px</option>
|
2340 |
+
<option value="4px">4px</option>
|
2341 |
+
<option value="5px">5px</option>
|
2342 |
+
<option value="6px">6px</option>
|
2343 |
+
<option value="7px">7px</option>
|
2344 |
+
<option value="8px">8px</option>
|
2345 |
+
<option value="9px">9px</option>
|
2346 |
+
<option value="10px">10px</option>
|
2347 |
+
<option value="11px">11px</option>
|
2348 |
+
<option value="12px">12px</option>
|
2349 |
+
<option value="13px">13px</option>
|
2350 |
+
<option value="14px">14px</option>
|
2351 |
+
<option value="15px">15px</option>
|
2352 |
+
<option value="16px">16px</option>
|
2353 |
+
<option value="17px">17px</option>
|
2354 |
+
<option value="18px">18px</option>
|
2355 |
+
<option value="19px">19px</option>
|
2356 |
+
<option value="20px">20px</option>
|
2357 |
+
<option value="21px">21px</option>
|
2358 |
+
<option value="22px">22px</option>
|
2359 |
+
<option value="23px">23px</option>
|
2360 |
+
<option value="24px">24px</option>
|
2361 |
+
<option value="25px">25px</option>
|
2362 |
+
<option value="26px">26px</option>
|
2363 |
+
<option value="27px">27px</option>
|
2364 |
+
<option value="28px">28px</option>
|
2365 |
+
<option value="29px">29px</option>
|
2366 |
+
<option value="30px">30px</option>
|
2367 |
+
</select>
|
2368 |
+
</td>
|
2369 |
+
</tr>
|
2370 |
+
<tr>
|
2371 |
+
<td>Style:</td>
|
2372 |
+
<td>
|
2373 |
+
<select id="border-style" onchange="bind(this);">
|
2374 |
+
<option value="none">none</option>
|
2375 |
+
<option value="solid">solid</option>
|
2376 |
+
<option value="dotted">dotted</option>
|
2377 |
+
<option value="dashed">dashed</option>
|
2378 |
+
<option value="double">double</option>
|
2379 |
+
<option value="groove">groove</option>
|
2380 |
+
<option value="inset">inset</option>
|
2381 |
+
<option value="outset">outset</option>
|
2382 |
+
<option value="ridge">ridge</option>
|
2383 |
+
<option value="hidden">hidden</option>
|
2384 |
+
</select>
|
2385 |
+
</td>
|
2386 |
+
</tr>
|
2387 |
+
<tr>
|
2388 |
+
<td>Color (#hex):</td>
|
2389 |
+
<td>
|
2390 |
+
<input type="text" maxlength="11" class="elmColor jscolor-picker" id="border-color" onblur="bind(this);"/>
|
2391 |
+
</td>
|
2392 |
+
</tr>
|
2393 |
+
<tr>
|
2394 |
+
<td width="85">Rounded Corners:</td>
|
2395 |
+
<td>
|
2396 |
+
<select id="border-radius" onchange="bind(this);">
|
2397 |
+
<option value="0px">0px</option>
|
2398 |
+
<option value="1px">1px</option>
|
2399 |
+
<option value="2px">2px</option>
|
2400 |
+
<option value="3px">3px</option>
|
2401 |
+
<option value="4px">4px</option>
|
2402 |
+
<option value="5px">5px</option>
|
2403 |
+
<option value="6px">6px</option>
|
2404 |
+
<option value="7px">7px</option>
|
2405 |
+
<option value="8px">8px</option>
|
2406 |
+
<option value="9px">9px</option>
|
2407 |
+
<option value="10px">10px</option>
|
2408 |
+
<option value="11px">11px</option>
|
2409 |
+
<option value="12px">12px</option>
|
2410 |
+
<option value="13px">13px</option>
|
2411 |
+
<option value="14px">14px</option>
|
2412 |
+
<option value="15px">15px</option>
|
2413 |
+
<option value="16px">16px</option>
|
2414 |
+
<option value="17px">17px</option>
|
2415 |
+
<option value="18px">18px</option>
|
2416 |
+
<option value="19px">19px</option>
|
2417 |
+
<option value="20px">20px</option>
|
2418 |
+
<option value="21px">21px</option>
|
2419 |
+
<option value="22px">22px</option>
|
2420 |
+
<option value="23px">23px</option>
|
2421 |
+
<option value="24px">24px</option>
|
2422 |
+
<option value="25px">25px</option>
|
2423 |
+
<option value="26px">26px</option>
|
2424 |
+
<option value="27px">27px</option>
|
2425 |
+
<option value="28px">28px</option>
|
2426 |
+
<option value="29px">29px</option>
|
2427 |
+
<option value="30px">30px</option>
|
2428 |
+
</select>
|
2429 |
+
<br/>
|
2430 |
+
Not supported in Internet Explorer.
|
2431 |
+
</td>
|
2432 |
+
</tr>
|
2433 |
+
</table>
|
2434 |
+
<!-- Margin Table -->
|
2435 |
+
<table class="CSSE_edit" id="editMargin" style="display:none;">
|
2436 |
+
<tr>
|
2437 |
+
<td width="85">Top: </td>
|
2438 |
+
<td>
|
2439 |
+
<select id="margin-top" onchange="bind(this);">
|
2440 |
+
<option value="0px">0px</option>
|
2441 |
+
<option value="1px">1px</option>
|
2442 |
+
<option value="2px">2px</option>
|
2443 |
+
<option value="3px">3px</option>
|
2444 |
+
<option value="4px">4px</option>
|
2445 |
+
<option value="5px">5px</option>
|
2446 |
+
<option value="6px">6px</option>
|
2447 |
+
<option value="7px">7px</option>
|
2448 |
+
<option value="8px">8px</option>
|
2449 |
+
<option value="9px">9px</option>
|
2450 |
+
<option value="10px">10px</option>
|
2451 |
+
<option value="11px">11px</option>
|
2452 |
+
<option value="12px">12px</option>
|
2453 |
+
<option value="13px">13px</option>
|
2454 |
+
<option value="14px">14px</option>
|
2455 |
+
<option value="15px">15px</option>
|
2456 |
+
<option value="16px">16px</option>
|
2457 |
+
<option value="17px">17px</option>
|
2458 |
+
<option value="18px">18px</option>
|
2459 |
+
<option value="19px">19px</option>
|
2460 |
+
<option value="20px">20px</option>
|
2461 |
+
<option value="21px">21px</option>
|
2462 |
+
<option value="22px">22px</option>
|
2463 |
+
<option value="23px">23px</option>
|
2464 |
+
<option value="24px">24px</option>
|
2465 |
+
<option value="25px">25px</option>
|
2466 |
+
<option value="26px">26px</option>
|
2467 |
+
<option value="27px">27px</option>
|
2468 |
+
<option value="28px">28px</option>
|
2469 |
+
<option value="29px">29px</option>
|
2470 |
+
<option value="30px">30px</option>
|
2471 |
+
</select>
|
2472 |
+
</td>
|
2473 |
+
</tr>
|
2474 |
+
<tr>
|
2475 |
+
<td>Right:</td>
|
2476 |
+
<td>
|
2477 |
+
<select id="margin-right" onchange="bind(this);">
|
2478 |
+
<option value="0px">0px</option>
|
2479 |
+
<option value="1px">1px</option>
|
2480 |
+
<option value="2px">2px</option>
|
2481 |
+
<option value="3px">3px</option>
|
2482 |
+
<option value="4px">4px</option>
|
2483 |
+
<option value="5px">5px</option>
|
2484 |
+
<option value="6px">6px</option>
|
2485 |
+
<option value="7px">7px</option>
|
2486 |
+
<option value="8px">8px</option>
|
2487 |
+
<option value="9px">9px</option>
|
2488 |
+
<option value="10px">10px</option>
|
2489 |
+
<option value="11px">11px</option>
|
2490 |
+
<option value="12px">12px</option>
|
2491 |
+
<option value="13px">13px</option>
|
2492 |
+
<option value="14px">14px</option>
|
2493 |
+
<option value="15px">15px</option>
|
2494 |
+
<option value="16px">16px</option>
|
2495 |
+
<option value="17px">17px</option>
|
2496 |
+
<option value="18px">18px</option>
|
2497 |
+
<option value="19px">19px</option>
|
2498 |
+
<option value="20px">20px</option>
|
2499 |
+
<option value="21px">21px</option>
|
2500 |
+
<option value="22px">22px</option>
|
2501 |
+
<option value="23px">23px</option>
|
2502 |
+
<option value="24px">24px</option>
|
2503 |
+
<option value="25px">25px</option>
|
2504 |
+
<option value="26px">26px</option>
|
2505 |
+
<option value="27px">27px</option>
|
2506 |
+
<option value="28px">28px</option>
|
2507 |
+
<option value="29px">29px</option>
|
2508 |
+
<option value="30px">30px</option>
|
2509 |
+
</select>
|
2510 |
+
</td>
|
2511 |
+
</tr>
|
2512 |
+
<tr>
|
2513 |
+
<td>Bottom:</td>
|
2514 |
+
<td>
|
2515 |
+
<select id="margin-bottom" onchange="bind(this);">
|
2516 |
+
<option value="0px">0px</option>
|
2517 |
+
<option value="1px">1px</option>
|
2518 |
+
<option value="2px">2px</option>
|
2519 |
+
<option value="3px">3px</option>
|
2520 |
+
<option value="4px">4px</option>
|
2521 |
+
<option value="5px">5px</option>
|
2522 |
+
<option value="6px">6px</option>
|
2523 |
+
<option value="7px">7px</option>
|
2524 |
+
<option value="8px">8px</option>
|
2525 |
+
<option value="9px">9px</option>
|
2526 |
+
<option value="10px">10px</option>
|
2527 |
+
<option value="11px">11px</option>
|
2528 |
+
<option value="12px">12px</option>
|
2529 |
+
<option value="13px">13px</option>
|
2530 |
+
<option value="14px">14px</option>
|
2531 |
+
<option value="15px">15px</option>
|
2532 |
+
<option value="16px">16px</option>
|
2533 |
+
<option value="17px">17px</option>
|
2534 |
+
<option value="18px">18px</option>
|
2535 |
+
<option value="19px">19px</option>
|
2536 |
+
<option value="20px">20px</option>
|
2537 |
+
<option value="21px">21px</option>
|
2538 |
+
<option value="22px">22px</option>
|
2539 |
+
<option value="23px">23px</option>
|
2540 |
+
<option value="24px">24px</option>
|
2541 |
+
<option value="25px">25px</option>
|
2542 |
+
<option value="26px">26px</option>
|
2543 |
+
<option value="27px">27px</option>
|
2544 |
+
<option value="28px">28px</option>
|
2545 |
+
<option value="29px">29px</option>
|
2546 |
+
<option value="30px">30px</option>
|
2547 |
+
</select>
|
2548 |
+
</td>
|
2549 |
+
</tr>
|
2550 |
+
<tr>
|
2551 |
+
<td>Left:</td>
|
2552 |
+
<td>
|
2553 |
+
<select id="margin-left" onchange="bind(this);">
|
2554 |
+
<option value="0px">0px</option>
|
2555 |
+
<option value="1px">1px</option>
|
2556 |
+
<option value="2px">2px</option>
|
2557 |
+
<option value="3px">3px</option>
|
2558 |
+
<option value="4px">4px</option>
|
2559 |
+
<option value="5px">5px</option>
|
2560 |
+
<option value="6px">6px</option>
|
2561 |
+
<option value="7px">7px</option>
|
2562 |
+
<option value="8px">8px</option>
|
2563 |
+
<option value="9px">9px</option>
|
2564 |
+
<option value="10px">10px</option>
|
2565 |
+
<option value="11px">11px</option>
|
2566 |
+
<option value="12px">12px</option>
|
2567 |
+
<option value="13px">13px</option>
|
2568 |
+
<option value="14px">14px</option>
|
2569 |
+
<option value="15px">15px</option>
|
2570 |
+
<option value="16px">16px</option>
|
2571 |
+
<option value="17px">17px</option>
|
2572 |
+
<option value="18px">18px</option>
|
2573 |
+
<option value="19px">19px</option>
|
2574 |
+
<option value="20px">20px</option>
|
2575 |
+
<option value="21px">21px</option>
|
2576 |
+
<option value="22px">22px</option>
|
2577 |
+
<option value="23px">23px</option>
|
2578 |
+
<option value="24px">24px</option>
|
2579 |
+
<option value="25px">25px</option>
|
2580 |
+
<option value="26px">26px</option>
|
2581 |
+
<option value="27px">27px</option>
|
2582 |
+
<option value="28px">28px</option>
|
2583 |
+
<option value="29px">29px</option>
|
2584 |
+
<option value="30px">30px</option>
|
2585 |
+
</select>
|
2586 |
+
</td>
|
2587 |
+
</tr>
|
2588 |
+
</table>
|
2589 |
+
<!-- Padding Table -->
|
2590 |
+
<table class="CSSE_edit" id="editPadding" style="display:none;">
|
2591 |
+
<tr>
|
2592 |
+
<td width="85">Top:</td>
|
2593 |
+
<td>
|
2594 |
+
<select id="padding-top" onchange="bind(this);">
|
2595 |
+
<option value="0px">0px</option>
|
2596 |
+
<option value="1px">1px</option>
|
2597 |
+
<option value="2px">2px</option>
|
2598 |
+
<option value="3px">3px</option>
|
2599 |
+
<option value="4px">4px</option>
|
2600 |
+
<option value="5px">5px</option>
|
2601 |
+
<option value="6px">6px</option>
|
2602 |
+
<option value="7px">7px</option>
|
2603 |
+
<option value="8px">8px</option>
|
2604 |
+
<option value="9px">9px</option>
|
2605 |
+
<option value="10px">10px</option>
|
2606 |
+
<option value="11px">11px</option>
|
2607 |
+
<option value="12px">12px</option>
|
2608 |
+
<option value="13px">13px</option>
|
2609 |
+
<option value="14px">14px</option>
|
2610 |
+
<option value="15px">15px</option>
|
2611 |
+
<option value="16px">16px</option>
|
2612 |
+
<option value="17px">17px</option>
|
2613 |
+
<option value="18px">18px</option>
|
2614 |
+
<option value="19px">19px</option>
|
2615 |
+
<option value="20px">20px</option>
|
2616 |
+
<option value="21px">21px</option>
|
2617 |
+
<option value="22px">22px</option>
|
2618 |
+
<option value="23px">23px</option>
|
2619 |
+
<option value="24px">24px</option>
|
2620 |
+
<option value="25px">25px</option>
|
2621 |
+
<option value="26px">26px</option>
|
2622 |
+
<option value="27px">27px</option>
|
2623 |
+
<option value="28px">28px</option>
|
2624 |
+
<option value="29px">29px</option>
|
2625 |
+
<option value="30px">30px</option>
|
2626 |
+
</select>
|
2627 |
+
</td>
|
2628 |
+
</tr>
|
2629 |
+
<tr>
|
2630 |
+
<td>Right:</td>
|
2631 |
+
<td>
|
2632 |
+
<select id="padding-right" onchange="bind(this);">
|
2633 |
+
<option value="0px">0px</option>
|
2634 |
+
<option value="1px">1px</option>
|
2635 |
+
<option value="2px">2px</option>
|
2636 |
+
<option value="3px">3px</option>
|
2637 |
+
<option value="4px">4px</option>
|
2638 |
+
<option value="5px">5px</option>
|
2639 |
+
<option value="6px">6px</option>
|
2640 |
+
<option value="7px">7px</option>
|
2641 |
+
<option value="8px">8px</option>
|
2642 |
+
<option value="9px">9px</option>
|
2643 |
+
<option value="10px">10px</option>
|
2644 |
+
<option value="11px">11px</option>
|
2645 |
+
<option value="12px">12px</option>
|
2646 |
+
<option value="13px">13px</option>
|
2647 |
+
<option value="14px">14px</option>
|
2648 |
+
<option value="15px">15px</option>
|
2649 |
+
<option value="16px">16px</option>
|
2650 |
+
<option value="17px">17px</option>
|
2651 |
+
<option value="18px">18px</option>
|
2652 |
+
<option value="19px">19px</option>
|
2653 |
+
<option value="20px">20px</option>
|
2654 |
+
<option value="21px">21px</option>
|
2655 |
+
<option value="22px">22px</option>
|
2656 |
+
<option value="23px">23px</option>
|
2657 |
+
<option value="24px">24px</option>
|
2658 |
+
<option value="25px">25px</option>
|
2659 |
+
<option value="26px">26px</option>
|
2660 |
+
<option value="27px">27px</option>
|
2661 |
+
<option value="28px">28px</option>
|
2662 |
+
<option value="29px">29px</option>
|
2663 |
+
<option value="30px">30px</option>
|
2664 |
+
</select>
|
2665 |
+
</td>
|
2666 |
+
</tr>
|
2667 |
+
<tr>
|
2668 |
+
<td>Bottom:</td>
|
2669 |
+
<td>
|
2670 |
+
<select id="padding-bottom" onchange="bind(this);">
|
2671 |
+
<option value="0px">0px</option>
|
2672 |
+
<option value="1px">1px</option>
|
2673 |
+
<option value="2px">2px</option>
|
2674 |
+
<option value="3px">3px</option>
|
2675 |
+
<option value="4px">4px</option>
|
2676 |
+
<option value="5px">5px</option>
|
2677 |
+
<option value="6px">6px</option>
|
2678 |
+
<option value="7px">7px</option>
|
2679 |
+
<option value="8px">8px</option>
|
2680 |
+
<option value="9px">9px</option>
|
2681 |
+
<option value="10px">10px</option>
|
2682 |
+
<option value="11px">11px</option>
|
2683 |
+
<option value="12px">12px</option>
|
2684 |
+
<option value="13px">13px</option>
|
2685 |
+
<option value="14px">14px</option>
|
2686 |
+
<option value="15px">15px</option>
|
2687 |
+
<option value="16px">16px</option>
|
2688 |
+
<option value="17px">17px</option>
|
2689 |
+
<option value="18px">18px</option>
|
2690 |
+
<option value="19px">19px</option>
|
2691 |
+
<option value="20px">20px</option>
|
2692 |
+
<option value="21px">21px</option>
|
2693 |
+
<option value="22px">22px</option>
|
2694 |
+
<option value="23px">23px</option>
|
2695 |
+
<option value="24px">24px</option>
|
2696 |
+
<option value="25px">25px</option>
|
2697 |
+
<option value="26px">26px</option>
|
2698 |
+
<option value="27px">27px</option>
|
2699 |
+
<option value="28px">28px</option>
|
2700 |
+
<option value="29px">29px</option>
|
2701 |
+
<option value="30px">30px</option>
|
2702 |
+
</select>
|
2703 |
+
</td>
|
2704 |
+
</tr>
|
2705 |
+
<tr>
|
2706 |
+
<td>Left:</td>
|
2707 |
+
<td>
|
2708 |
+
<select id="padding-left" onchange="bind(this);">
|
2709 |
+
<option value="0px">0px</option>
|
2710 |
+
<option value="1px">1px</option>
|
2711 |
+
<option value="2px">2px</option>
|
2712 |
+
<option value="3px">3px</option>
|
2713 |
+
<option value="4px">4px</option>
|
2714 |
+
<option value="5px">5px</option>
|
2715 |
+
<option value="6px">6px</option>
|
2716 |
+
<option value="7px">7px</option>
|
2717 |
+
<option value="8px">8px</option>
|
2718 |
+
<option value="9px">9px</option>
|
2719 |
+
<option value="10px">10px</option>
|
2720 |
+
<option value="11px">11px</option>
|
2721 |
+
<option value="12px">12px</option>
|
2722 |
+
<option value="13px">13px</option>
|
2723 |
+
<option value="14px">14px</option>
|
2724 |
+
<option value="15px">15px</option>
|
2725 |
+
<option value="16px">16px</option>
|
2726 |
+
<option value="17px">17px</option>
|
2727 |
+
<option value="18px">18px</option>
|
2728 |
+
<option value="19px">19px</option>
|
2729 |
+
<option value="20px">20px</option>
|
2730 |
+
<option value="21px">21px</option>
|
2731 |
+
<option value="22px">22px</option>
|
2732 |
+
<option value="23px">23px</option>
|
2733 |
+
<option value="24px">24px</option>
|
2734 |
+
<option value="25px">25px</option>
|
2735 |
+
<option value="26px">26px</option>
|
2736 |
+
<option value="27px">27px</option>
|
2737 |
+
<option value="28px">28px</option>
|
2738 |
+
<option value="29px">29px</option>
|
2739 |
+
<option value="30px">30px</option>
|
2740 |
+
</select>
|
2741 |
+
</td>
|
2742 |
+
</tr>
|
2743 |
+
</table>
|
2744 |
+
<!-- Scale Table -->
|
2745 |
+
<table class="CSSE_edit" id="editScale" style="display:none;">
|
2746 |
+
<tr>
|
2747 |
+
<td width="85">Width (px): <a class="noteLink" title="Click here for more information" onclick="showNote('noteWidth',this, 'Width');">(?)</a></td>
|
2748 |
+
<td>
|
2749 |
+
<input type="text" maxlength="4" class="elmColor" id="width" onblur="bind(this);"/>
|
2750 |
+
</td>
|
2751 |
+
</tr>
|
2752 |
+
<tr>
|
2753 |
+
<td width="85"></td>
|
2754 |
+
<td>
|
2755 |
+
If you change the width of the<br/> poll you may also need to change<br/> the width of your answers.
|
2756 |
+
</td>
|
2757 |
+
</tr>
|
2758 |
+
</table>
|
2759 |
+
|
2760 |
+
<!-- Height Table -->
|
2761 |
+
<table class="CSSE_edit" id="editHeight" style="display:none;">
|
2762 |
+
<tr>
|
2763 |
+
<td width="85">Height (px):</td>
|
2764 |
+
<td>
|
2765 |
+
<input type="text" maxlength="4" class="elmColor" id="height" onblur="bind(this);"/>
|
2766 |
+
</td>
|
2767 |
+
</tr>
|
2768 |
+
</table>
|
2769 |
+
</td>
|
2770 |
+
</tr>
|
2771 |
+
<tr>
|
2772 |
+
<td class="btm"/>
|
2773 |
+
</tr>
|
2774 |
+
</table>
|
2775 |
+
</td>
|
2776 |
+
</tr>
|
2777 |
+
</table>
|
2778 |
+
</td>
|
2779 |
+
<td width="10"> </td>
|
2780 |
+
<td valign="top">
|
2781 |
+
<div style="overflow-x:auto;width:633px;">
|
2782 |
+
<!-- POLL XHTML START -->
|
2783 |
+
<div class="pds-box" id="pds-box">
|
2784 |
+
<div class="pds-box-outer">
|
2785 |
+
<div class="pds-box-inner">
|
2786 |
+
<div class="pds-box-top">
|
2787 |
+
<div class="pds-question">
|
2788 |
+
<div class="pds-question-outer">
|
2789 |
+
<div class="pds-question-inner">
|
2790 |
+
<div class="pds-question-top" id="pds-question-top">Do you mostly use the internet at work, in school or at home?</div>
|
2791 |
+
</div>
|
2792 |
+
</div>
|
2793 |
+
</div>
|
2794 |
+
<div>
|
2795 |
+
<!-- divAnswers -->
|
2796 |
+
<div id="divAnswers">
|
2797 |
+
<span id="pds-answer143974">
|
2798 |
+
|
2799 |
+
<span class="pds-answer-group" id="pds-answer-group">
|
2800 |
+
<span class="pds-answer-input" id="pds-answer-input">
|
2801 |
+
<input type="radio" name="PDI_answer" value="1" id="p1" class="pds-checkbox"/>
|
2802 |
+
</span>
|
2803 |
+
<label for="p1" class="pds-answer" id="pds-answer"><span class="pds-answer-span">I use it in school.</span></label>
|
2804 |
+
<span class="pds-clear"></span>
|
2805 |
+
</span>
|
2806 |
+
|
2807 |
+
<span class="pds-answer-group" id="pds-answer-group1">
|
2808 |
+
<span class="pds-answer-input" id="pds-answer-input1">
|
2809 |
+
<input type="radio" name="PDI_answer" value="2" id="p2" class="pds-checkbox"/>
|
2810 |
+
</span>
|
2811 |
+
<label for="p2" class="pds-answer" id="pds-answer1"><span class="pds-answer-span">I use it at home.</span></label>
|
2812 |
+
<span class="pds-clear"></span>
|
2813 |
+
</span>
|
2814 |
+
|
2815 |
+
<span class="pds-answer-group" id="pds-answer-group2">
|
2816 |
+
<span class="pds-answer-input" id="pds-answer-input2">
|
2817 |
+
<input type="radio" name="PDI_answer" value="3" id="p3" class="pds-checkbox"/>
|
2818 |
+
</span>
|
2819 |
+
<label for="p3" class="pds-answer" id="pds-answer2"><span class="pds-answer-span">I use it every where I go, at work and home and anywhere else that I can!</span></label>
|
2820 |
+
<span class="pds-clear"></span>
|
2821 |
+
</span>
|
2822 |
+
|
2823 |
+
<span class="pds-answer-group" id="pds-answer-group3">
|
2824 |
+
<span class="pds-answer-input" id="pds-answer-input3">
|
2825 |
+
<input type="radio" name="PDI_answer" value="4" id="p4" class="pds-checkbox"/>
|
2826 |
+
</span>
|
2827 |
+
<label for="p4" class="pds-answer" id="pds-answer3"><span class="pds-answer-span">Other:</span></label>
|
2828 |
+
<span class="pds-clear"></span>
|
2829 |
+
<span class="pds-answer-other">
|
2830 |
+
<input type="text" name="PDI_OtherText1761982" id="pds-textfield" maxlength="80" class="pds-textfield"/>
|
2831 |
+
</span>
|
2832 |
+
<span class="pds-clear"></span>
|
2833 |
+
</span>
|
2834 |
+
|
2835 |
+
</span>
|
2836 |
+
<br/>
|
2837 |
+
<div class="pds-vote" id="pds-links">
|
2838 |
+
<div class="pds-votebutton-outer">
|
2839 |
+
<a href="javascript:renderStyleEdit('pds-answer-feedback');" id="pds-vote-button" style="display:block;float:left;" class="pds-vote-button"><span>Vote</span></a>
|
2840 |
+
<span class="pds-links">
|
2841 |
+
<div style="padding: 0px 0px 0px 15px; float:left;"><a href="javascript:renderStyleEdit('pds-answer-feedback');" class="pds-link" id="pds-link">View Results</a></div>
|
2842 |
+
<span class="pds-clear"></span>
|
2843 |
+
</span>
|
2844 |
+
<span class="pds-clear"></span>
|
2845 |
+
</div>
|
2846 |
+
</div>
|
2847 |
+
|
2848 |
+
</div>
|
2849 |
+
<!-- End divAnswers -->
|
2850 |
+
<!-- divResults -->
|
2851 |
+
<div id="divResults">
|
2852 |
+
|
2853 |
+
<div class="pds-answer-group" id="pds-answer-group4">
|
2854 |
+
<label for="PDI_feedback1" class="pds-answer" id="pds-answer4"><span class="pds-answer-text">I use it in school!</span><xsl:text> </xsl:text><span class="pds-feedback-per"><strong>46%</strong></span><xsl:text> </xsl:text><span class="pds-feedback-votes">(620 votes)</span></label>
|
2855 |
+
<span class="pds-clear"></span>
|
2856 |
+
<div id="pds-answer-feedback">
|
2857 |
+
<div style="width:46%;" id="pds-answer-feedback-bar" class="pds-answer-feedback-bar"></div>
|
2858 |
+
</div>
|
2859 |
+
<span class="pds-clear"></span>
|
2860 |
+
</div>
|
2861 |
+
|
2862 |
+
<div class="pds-answer-group" id="pds-answer-group5">
|
2863 |
+
<label for="PDI_feedback2" class="pds-answer" id="pds-answer5"><span class="pds-answer-text">I use it at home.</span><xsl:text> </xsl:text><span class="pds-feedback-per"><strong>30%</strong></span><xsl:text> </xsl:text><span class="pds-feedback-votes">(400 votes)</span></label>
|
2864 |
+
<span class="pds-clear"></span>
|
2865 |
+
<div id="pds-answer-feedback2">
|
2866 |
+
<div style="width:46%;" id="pds-answer-feedback-bar2" class="pds-answer-feedback-bar"></div>
|
2867 |
+
</div>
|
2868 |
+
<span class="pds-clear"></span>
|
2869 |
+
</div>
|
2870 |
+
|
2871 |
+
<div class="pds-answer-group" id="pds-answer-group6">
|
2872 |
+
<label for="PDI_feedback3" class="pds-answer" id="pds-answer6"><span class="pds-answer-text">I use it every where I go, at work and home and anywhere else that I can!</span><xsl:text> </xsl:text><span class="pds-feedback-per"><strong>16%</strong></span><xsl:text> </xsl:text><span class="pds-feedback-votes">(220 votes)</span></label>
|
2873 |
+
<span class="pds-clear"></span>
|
2874 |
+
<div id="pds-answer-feedback3">
|
2875 |
+
<div style="width:16%;" id="pds-answer-feedback-bar3" class="pds-answer-feedback-bar"></div>
|
2876 |
+
</div>
|
2877 |
+
<span class="pds-clear"></span>
|
2878 |
+
</div>
|
2879 |
+
|
2880 |
+
<div class="pds-answer-group" id="pds-answer-group7">
|
2881 |
+
<label for="PDI_feedback4" class="pds-answer" id="pds-answer7"><span class="pds-answer-text">Other</span><xsl:text> </xsl:text><span class="pds-feedback-per"><strong>8%</strong></span><xsl:text> </xsl:text><span class="pds-feedback-votes">(110 votes)</span></label>
|
2882 |
+
<span class="pds-clear"></span>
|
2883 |
+
<div id="pds-answer-feedback4">
|
2884 |
+
<div style="width:8%;" id="pds-answer-feedback-bar4" class="pds-answer-feedback-bar"></div>
|
2885 |
+
</div>
|
2886 |
+
<span class="pds-clear"></span>
|
2887 |
+
</div>
|
2888 |
+
|
2889 |
+
</div>
|
2890 |
+
<!-- End divResults -->
|
2891 |
+
<span class="pds-clear"></span>
|
2892 |
+
<div style="height: 10px;"></div>
|
2893 |
+
<div id="pds-totalvotes-inner">Total Votes: <strong>1,350</strong></div>
|
2894 |
+
</div>
|
2895 |
+
<div class="pds-vote" id="pds-links-back">
|
2896 |
+
<div class="pds-totalvotes-outer">
|
2897 |
+
<span class="pds-links-back">
|
2898 |
+
<br/>
|
2899 |
+
<a href="javascript:" class="pds-link" id="pds-link1">Comments <strong>(19)</strong></a>
|
2900 |
+
<xsl:text> </xsl:text>
|
2901 |
+
<a href="javascript:renderStyleEdit('pds-box');" class="pds-link" id="pds-link2">Return To Poll</a>
|
2902 |
+
<span class="pds-clear"></span>
|
2903 |
+
</span>
|
2904 |
+
<span class="pds-clear"></span>
|
2905 |
+
</div>
|
2906 |
+
</div>
|
2907 |
+
</div>
|
2908 |
+
</div>
|
2909 |
+
</div>
|
2910 |
+
</div>
|
2911 |
+
<!-- POLL XHTML END -->
|
2912 |
+
</div>
|
2913 |
+
</td>
|
2914 |
+
</tr>
|
2915 |
+
</table>
|
2916 |
+
<div id="editBox"></div>
|
2917 |
+
<p class="pds-clear"></p>
|
2918 |
+
<?php wp_nonce_field( $style_id > 1000 ? "edit-style$style_id" : 'create-style' ); ?>
|
2919 |
+
<input type="hidden" name="action" value="<?php echo $style_id > 1000 ? 'edit-style' : 'create-style'; ?>" />
|
2920 |
+
<input type="hidden" class="polldaddy-style-id" name="style" value="<?php echo $style_id; ?>" />
|
2921 |
+
<input type="submit" class="button-primary" value="<?php echo attribute_escape( __( 'Save Style', 'polldaddy' ) ); ?>" />
|
2922 |
+
</div>
|
2923 |
+
</div>
|
2924 |
+
<textarea id="S_www" name="CSSXML" style="display:none;width: 1000px; height: 500px;" rows="10" cols="10"> </textarea>
|
2925 |
+
</form>
|
2926 |
+
<script type="text/javascript" language="javascript">window.onload = function() {
|
2927 |
+
var CSSXML;
|
2928 |
+
loadStyle();
|
2929 |
+
showResults( false );
|
2930 |
+
renderStyleEdit( _$('styleName').value );
|
2931 |
+
}</script>
|
2932 |
+
<br class="clear" />
|
2933 |
+
|
2934 |
+
<?php
|
2935 |
+
}
|
2936 |
+
|
2937 |
+
function rating_settings(){
|
2938 |
+
global $action, $rating;
|
2939 |
+
$show_posts = $show_posts_index = $show_pages = $show_comments = $pos_posts = $pos_posts_index = $pos_pages = $pos_comments = 0;
|
2940 |
+
$show_settings = $rating_updated = ( $action == 'update-rating' ? true : false );
|
2941 |
+
$error = false;
|
2942 |
+
|
2943 |
+
$settings_style = 'display: none;';
|
2944 |
+
if( $show_settings )
|
2945 |
+
$settings_style = 'display: block;';
|
2946 |
+
|
2947 |
+
if ( isset( $_POST[ 'pd_rating_action_type' ] ) ){
|
2948 |
+
switch ( $_POST[ 'pd_rating_action_type' ] ) :
|
2949 |
+
|
2950 |
+
case 'posts' :
|
2951 |
+
if ( isset( $_POST[ 'pd_show_posts' ] ) && (int) $_POST[ 'pd_show_posts' ] == 1 )
|
2952 |
+
$show_posts = get_option( 'pd-rating-posts-id' );
|
2953 |
+
|
2954 |
+
update_option( 'pd-rating-posts', $show_posts );
|
2955 |
+
|
2956 |
+
if ( isset( $_POST[ 'pd_show_posts_index' ] ) && (int) $_POST[ 'pd_show_posts_index' ] == 1 )
|
2957 |
+
$show_posts_index = get_option( 'pd-rating-posts-id' );
|
2958 |
+
|
2959 |
+
update_option( 'pd-rating-posts-index', $show_posts_index );
|
2960 |
+
|
2961 |
+
if ( isset( $_POST[ 'posts_pos' ] ) && (int) $_POST[ 'posts_pos' ] == 1 )
|
2962 |
+
$pos_posts = 1;
|
2963 |
+
|
2964 |
+
update_option( 'pd-rating-posts-pos', $pos_posts );
|
2965 |
+
|
2966 |
+
if ( isset( $_POST[ 'posts_index_pos' ] ) && (int) $_POST[ 'posts_index_pos' ] == 1 )
|
2967 |
+
$pos_posts_index = 1;
|
2968 |
+
|
2969 |
+
update_option( 'pd-rating-posts-index-pos', $pos_posts_index );
|
2970 |
+
$rating_updated = true;
|
2971 |
+
break;
|
2972 |
+
|
2973 |
+
case 'pages';
|
2974 |
+
if ( isset( $_POST[ 'pd_show_pages' ] ) && (int) $_POST[ 'pd_show_pages' ] == 1 )
|
2975 |
+
$show_pages = get_option( 'pd-rating-pages-id' );
|
2976 |
+
|
2977 |
+
update_option( 'pd-rating-pages', $show_pages );
|
2978 |
+
|
2979 |
+
if ( isset( $_POST[ 'pages_pos' ] ) && (int) $_POST[ 'pages_pos' ] == 1 )
|
2980 |
+
$pos_pages = 1;
|
2981 |
+
|
2982 |
+
update_option( 'pd-rating-pages-pos', $pos_pages );
|
2983 |
+
$rating_updated = true;
|
2984 |
+
break;
|
2985 |
+
|
2986 |
+
case 'comments':
|
2987 |
+
if ( isset( $_POST[ 'pd_show_comments' ] ) && (int) $_POST[ 'pd_show_comments' ] == 1 )
|
2988 |
+
$show_comments = get_option( 'pd-rating-comments-id' );
|
2989 |
+
|
2990 |
+
update_option( 'pd-rating-comments', $show_comments );
|
2991 |
+
if ( isset( $_POST[ 'comments_pos' ] ) && (int) $_POST[ 'comments_pos' ] == 1 )
|
2992 |
+
$pos_comments = 1;
|
2993 |
+
|
2994 |
+
update_option( 'pd-rating-comments-pos', $pos_comments );
|
2995 |
+
|
2996 |
+
$rating_updated = true;
|
2997 |
+
break;
|
2998 |
+
endswitch;
|
2999 |
+
}
|
3000 |
+
|
3001 |
+
$show_posts = (int) get_option( 'pd-rating-posts' );
|
3002 |
+
$show_pages = (int) get_option( 'pd-rating-pages' );
|
3003 |
+
$show_comments = (int) get_option( 'pd-rating-comments' );
|
3004 |
+
$show_posts_index = (int) get_option( 'pd-rating-posts-index' );
|
3005 |
+
|
3006 |
+
$pos_posts = (int) get_option( 'pd-rating-posts-pos' );
|
3007 |
+
$pos_pages = (int) get_option( 'pd-rating-pages-pos' );
|
3008 |
+
$pos_comments = (int) get_option( 'pd-rating-comments-pos' );
|
3009 |
+
$pos_posts_index = (int) get_option( 'pd-rating-posts-index-pos' );
|
3010 |
+
|
3011 |
+
$rating_id = get_option( 'pd-rating-posts-id' );
|
3012 |
+
$report_type = 'posts';
|
3013 |
+
$updated = false;
|
3014 |
+
|
3015 |
+
if ( isset( $rating ) ) {
|
3016 |
+
switch ( $rating ) :
|
3017 |
+
case 'pages':
|
3018 |
+
$report_type = 'pages';
|
3019 |
+
$rating_id = get_option( 'pd-rating-pages-id' );
|
3020 |
+
break;
|
3021 |
+
|
3022 |
+
case 'comments':
|
3023 |
+
$report_type = 'comments';
|
3024 |
+
$rating_id = get_option( 'pd-rating-comments-id' );
|
3025 |
+
break;
|
3026 |
+
|
3027 |
+
case 'posts':
|
3028 |
+
$report_type = 'posts';
|
3029 |
+
$rating_id = get_option( 'pd-rating-posts-id' );
|
3030 |
+
break;
|
3031 |
+
endswitch;
|
3032 |
+
}
|
3033 |
+
|
3034 |
+
$polldaddy = $this->get_client( WP_POLLDADDY__PARTNERGUID, $this->rating_user_code );
|
3035 |
+
$polldaddy->reset();
|
3036 |
+
|
3037 |
+
$response = $polldaddy->get_rating( $rating_id );
|
3038 |
+
|
3039 |
+
if ( empty( $response ) || (int) $response->_id == 0 ) {
|
3040 |
+
$polldaddy->reset();
|
3041 |
+
$new_type = 0;
|
3042 |
+
if ( $report_type == 'comments' )
|
3043 |
+
$new_type = 1;
|
3044 |
+
|
3045 |
+
$blog_name = get_option( 'blogname' );
|
3046 |
+
|
3047 |
+
if ( empty( $blog_name ) )
|
3048 |
+
$blog_name = 'WPORG Blog';
|
3049 |
+
|
3050 |
+
$blog_name .= ' - ' . $report_type;
|
3051 |
+
|
3052 |
+
$response = $polldaddy->create_rating( $blog_name , $new_type );
|
3053 |
+
if( empty( $response ) ) {
|
3054 |
+
echo '<div class="error"><p>'.sprintf(__('Sorry! There was an error creating your rating widget. Please contact <a href="%1$s" %2$s>PollDaddy support</a> to fix this.', 'polldaddy'), 'http://polldaddy.com/feedback/', 'target="_blank"') . '</p></div>';
|
3055 |
+
$error = true;
|
3056 |
+
} else {
|
3057 |
+
$rating_id = (int) $response->_id;
|
3058 |
+
update_option ( 'pd-rating-' . $report_type . '-id', $rating_id );
|
3059 |
+
update_option ( 'pd-rating-' . $report_type, 0 );
|
3060 |
+
|
3061 |
+
switch ( $report_type ) :
|
3062 |
+
case 'posts':
|
3063 |
+
$show_posts = 0;
|
3064 |
+
break;
|
3065 |
+
|
3066 |
+
case 'pages':
|
3067 |
+
$show_pages = 0;
|
3068 |
+
break;
|
3069 |
+
|
3070 |
+
case 'comments':
|
3071 |
+
$show_comments = 0;
|
3072 |
+
break;
|
3073 |
+
endswitch;
|
3074 |
+
}
|
3075 |
+
$polldaddy->reset();
|
3076 |
+
$response = $polldaddy->get_rating( $rating_id );
|
3077 |
+
}
|
3078 |
+
|
3079 |
+
if ( !empty( $response ) ) {
|
3080 |
+
$settings_text = $response->settings;
|
3081 |
+
$settings = json_decode( $settings_text );
|
3082 |
+
$rating_type = 0;
|
3083 |
+
|
3084 |
+
if( $settings->type == 'stars' )
|
3085 |
+
$rating_type = 0;
|
3086 |
+
else
|
3087 |
+
$rating_type = 1;
|
3088 |
+
|
3089 |
+
if( empty( $settings->font_color ) )
|
3090 |
+
$settings->font_color = '#000000';
|
3091 |
+
}?>
|
3092 |
+
<div class="wrap">
|
3093 |
+
<h2><?php _e('Rating Settings', 'polldaddy'); ?></h2><?php
|
3094 |
+
if ( $rating_updated )
|
3095 |
+
echo( '<div class="updated"><p>'.__('Rating updated', 'polldaddy').'</p></div>' );
|
3096 |
+
|
3097 |
+
if ( !$error ) { ?>
|
3098 |
+
<div id="side-sortables">
|
3099 |
+
<div id="categorydiv">
|
3100 |
+
<ul id="category-tabs"><?php
|
3101 |
+
$this_class = '';
|
3102 |
+
$posts_link = clean_url( add_query_arg( array( 'rating' => 'posts', 'message' => false ) ) );
|
3103 |
+
$pages_link = clean_url( add_query_arg( array( 'rating' => 'pages', 'message' => false ) ) );
|
3104 |
+
$comments_link = clean_url( add_query_arg( array( 'rating' => 'comments', 'message' => false ) ) );
|
3105 |
+
if ( $report_type == 'posts' )
|
3106 |
+
$this_class = ' class="tabs"';?>
|
3107 |
+
<li <?php echo( $this_class ); ?>><a tabindex="3" href="<?php echo $posts_link; ?>"><?php _e('Posts', 'polldaddy');?></a></li><?php
|
3108 |
+
$this_class = '';
|
3109 |
+
if ( $report_type == 'pages' )
|
3110 |
+
$this_class = ' class="tabs"'; ?>
|
3111 |
+
<li <?php echo( $this_class ); ?>><a tabindex="3" href="<?php echo $pages_link; ?>"><?php _e('Pages', 'polldaddy');?></a></li><?php
|
3112 |
+
$this_class = '';
|
3113 |
+
if ( $report_type == 'comments' )
|
3114 |
+
$this_class = ' class="tabs"'; ?>
|
3115 |
+
<li <?php echo( $this_class ); ?>><a href="<?php echo $comments_link; ?>"><?php _e('Comments', 'polldaddy');?></a></li>
|
3116 |
+
</ul>
|
3117 |
+
<div class="tabs-panel" id="categories-all" style="background: #FFFFFF;height: auto; overflow: visible;">
|
3118 |
+
<form action="" method="post">
|
3119 |
+
<input type="hidden" name="pd_rating_action_type" value="<?php echo ( $report_type ); ?>" />
|
3120 |
+
<table class="form-table" style="width: normal;">
|
3121 |
+
<tbody><?php
|
3122 |
+
if ( $report_type == 'posts' ) { ?>
|
3123 |
+
<tr valign="top">
|
3124 |
+
<td style="padding-left: 0px; padding-right: 0px; padding-top: 7px;">
|
3125 |
+
<label for="pd_show_posts">
|
3126 |
+
<input type="checkbox" name="pd_show_posts" id="pd_show_posts" <?php if( $show_posts > 0 ) echo( ' checked="checked" ' ); ?> value="1" /> <?php _e('Enable for blog posts', 'polldaddy');?>
|
3127 |
+
</label>
|
3128 |
+
<span id="span_posts">
|
3129 |
+
<select name="posts_pos"><?php
|
3130 |
+
$select = array( __('Above each blog post', 'polldaddy') => '0', __('Below each blog post', 'polldaddy') => '1' );
|
3131 |
+
foreach( $select as $option => $value ) :
|
3132 |
+
$selected = '';
|
3133 |
+
if ( $value == $pos_posts )
|
3134 |
+
$selected = ' selected="selected"';
|
3135 |
+
echo ( '<option value="' . $value . '" ' . $selected . '>' . $option . '</option>' );
|
3136 |
+
endforeach;?>
|
3137 |
+
</select>
|
3138 |
+
</span>
|
3139 |
+
</td>
|
3140 |
+
</tr>
|
3141 |
+
<tr valign="top">
|
3142 |
+
<td style="padding-left: 0px; padding-right: 0px; padding-top: 7px;">
|
3143 |
+
<label for="pd_show_posts_index">
|
3144 |
+
<input type="checkbox" name="pd_show_posts_index" id="pd_show_posts_index" <?php if( $show_posts_index > 0 ) echo( ' checked="checked" ' ); ?> value="1" /> <?php _e('Enable for front page', 'polldaddy');?>
|
3145 |
+
</label>
|
3146 |
+
<span id="span_posts">
|
3147 |
+
<select name="posts_index_pos"><?php
|
3148 |
+
$select = array( __('Above each blog post', 'polldaddy') => '0', __('Below each blog post', 'polldaddy') => '1' );
|
3149 |
+
foreach( $select as $option => $value ) :
|
3150 |
+
$selected = '';
|
3151 |
+
if ( $value == $pos_posts_index )
|
3152 |
+
$selected = ' selected="selected"';
|
3153 |
+
echo ( '<option value="' . $value . '" ' . $selected . '>' . $option . '</option>' );
|
3154 |
+
endforeach;?>
|
3155 |
+
</select>
|
3156 |
+
</span>
|
3157 |
+
</td>
|
3158 |
+
</tr><?php
|
3159 |
+
}
|
3160 |
+
if ( $report_type == 'pages' ) {?>
|
3161 |
+
<tr valign="top">
|
3162 |
+
<td style="padding-left: 0px; padding-right: 0px; padding-top: 7px;">
|
3163 |
+
<label for="pd_show_pages">
|
3164 |
+
<input type="checkbox" name="pd_show_pages" id="pd_show_pages" <?php if( $show_pages > 0 ) echo( ' checked="checked" ' ); ?> value="1" /> <?php _e('Enable for pages', 'polldaddy');?>
|
3165 |
+
</label>
|
3166 |
+
<span id="span_pages">
|
3167 |
+
<select name="pages_pos"><?php
|
3168 |
+
$select = array( __('Above each page', 'polldaddy') => '0', __('Below each page', 'polldaddy') => '1' );
|
3169 |
+
foreach( $select as $option => $value ) :
|
3170 |
+
$selected = '';
|
3171 |
+
if ( $value == $pos_pages )
|
3172 |
+
$selected = ' selected="selected"';
|
3173 |
+
echo ( '<option value="' . $value . '" ' . $selected . '>' . $option . '</option>' );
|
3174 |
+
endforeach; ?>
|
3175 |
+
</select>
|
3176 |
+
</span>
|
3177 |
+
</td>
|
3178 |
+
</tr><?php
|
3179 |
+
}
|
3180 |
+
if ( $report_type == 'comments' ) {?>
|
3181 |
+
<tr valign="top">
|
3182 |
+
<td style="padding-left: 0px; padding-right: 0px; padding-top: 7px;">
|
3183 |
+
<label for="pd_show_comments">
|
3184 |
+
<input type="checkbox" name="pd_show_comments" id="pd_show_comments" <?php if( $show_comments > 0 ) echo( ' checked="checked" ' ); ?> value="1" /> <?php _e('Enable for comments', 'polldaddy');?>
|
3185 |
+
</label>
|
3186 |
+
<span id="span_comments">
|
3187 |
+
<select name="comments_pos"><?php
|
3188 |
+
$select = array( __('Above each comment', 'polldaddy') => '0', __('Below each comment', 'polldaddy') => '1' );
|
3189 |
+
foreach( $select as $option => $value ) :
|
3190 |
+
$selected = '';
|
3191 |
+
if ( $value == $pos_comments )
|
3192 |
+
$selected = ' selected="selected"';
|
3193 |
+
echo ( '<option value="' . $value . '" ' . $selected . '>' . $option . '</option>' );
|
3194 |
+
endforeach; ?>
|
3195 |
+
</select>
|
3196 |
+
</span>
|
3197 |
+
</td>
|
3198 |
+
</tr><?php
|
3199 |
+
} ?>
|
3200 |
+
</tbody>
|
3201 |
+
</table>
|
3202 |
+
<p class="submit">
|
3203 |
+
<input class="button-primary" type="submit" value="<?php esc_attr_e('Save Changes', 'polldaddy');?>" name="Submit" />
|
3204 |
+
</p><?php
|
3205 |
+
if ( $report_type == 'posts' ) {
|
3206 |
+
if( $show_posts > 0 || $show_posts_index > 0 )
|
3207 |
+
$show_settings = true;
|
3208 |
+
}
|
3209 |
+
if ( $report_type == 'pages' && $show_pages > 0 )
|
3210 |
+
$show_settings = true;
|
3211 |
+
if ( $report_type == 'comments' && $show_comments > 0 )
|
3212 |
+
$show_settings = true;
|
3213 |
+
if ( $show_settings == true )
|
3214 |
+
echo ( '<a href="javascript:" onclick="show_settings();">'.__('Advanced Settings', 'polldaddy').'</a>' );?>
|
3215 |
+
</form>
|
3216 |
+
</div>
|
3217 |
+
</div>
|
3218 |
+
</div>
|
3219 |
+
|
3220 |
+
<?php if ( $show_settings == true ){ ?>
|
3221 |
+
<br />
|
3222 |
+
<form method="post" action="">
|
3223 |
+
<div id="poststuff" style="<?php echo( $settings_style ); ?>">
|
3224 |
+
<div class="has-sidebar has-right-sidebar">
|
3225 |
+
<div class="inner-sidebar-ratings">
|
3226 |
+
<div class="postbox" id="submitdiv">
|
3227 |
+
<h3><?php _e('Save', 'polldaddy');?></h3>
|
3228 |
+
<div class="inside">
|
3229 |
+
<div id="major-publishing-actions">
|
3230 |
+
<input type="hidden" name="type" value="<?php echo( $report_type ); ?>" />
|
3231 |
+
<input type="hidden" name="rating_id" value="<?php echo( $rating_id ); ?>" />
|
3232 |
+
<input type="hidden" name="action" value="update-rating" />
|
3233 |
+
<p id="publishing-action">
|
3234 |
+
<input type="submit" value="<?php _e('Save Changes', 'polldaddy');?>" class="button-primary"/>
|
3235 |
+
</p>
|
3236 |
+
<br class="clear"/>
|
3237 |
+
</div>
|
3238 |
+
</div>
|
3239 |
+
</div>
|
3240 |
+
<div class="postbox">
|
3241 |
+
<h3><?php _e('Preview', 'polldaddy');?></h3>
|
3242 |
+
<div class="inside">
|
3243 |
+
<p><?php _e('This is a demo of what your rating widget will look like', 'polldaddy'); ?>.</p>
|
3244 |
+
<p>
|
3245 |
+
<div id="pd_rating_holder_1"></div>
|
3246 |
+
</p>
|
3247 |
+
</div>
|
3248 |
+
</div>
|
3249 |
+
<div class="postbox">
|
3250 |
+
<h3><?php _e('Customize Labels', 'polldaddy');?></h3>
|
3251 |
+
<div class="inside">
|
3252 |
+
<table>
|
3253 |
+
<tr>
|
3254 |
+
<td width="100" height="30"><?php _e('votes', 'polldaddy');?></td>
|
3255 |
+
<td><input onblur="pd_bind(this);" type="text" name="text_votes" id="text_votes" value="<?php echo( wp_specialchars( $settings->text_votes ) ); ?>" maxlength="20" />
|
3256 |
+
</tr>
|
3257 |
+
<tr>
|
3258 |
+
<td height="30"><?php _e('rate this', 'polldaddy');?></td>
|
3259 |
+
<td><input onblur="pd_bind(this);" type="text" name="text_rate_this" id="text_rate_this" value="<?php echo( wp_specialchars( $settings->text_rate_this ) ); ?>" maxlength="20" />
|
3260 |
+
</tr>
|
3261 |
+
<tr>
|
3262 |
+
<td height="30"><?php printf(__( '%d star', 'polldaddy' ), 1);?></td>
|
3263 |
+
<td><input onblur="pd_bind(this);" type="text" name="text_1_star" id="text_1_star" value="<?php echo( wp_specialchars( $settings->text_1_star ) ); ?>" maxlength="20" />
|
3264 |
+
</tr>
|
3265 |
+
<tr>
|
3266 |
+
<td height="30"><?php printf(__( '%d stars', 'polldaddy' ), 2);?></td>
|
3267 |
+
<td><input onblur="pd_bind(this);" type="text" name="text_2_star" id="text_2_star" value="<?php echo( wp_specialchars( $settings->text_2_star ) ); ?>" maxlength="20" />
|
3268 |
+
</tr>
|
3269 |
+
<tr>
|
3270 |
+
<td height="30"><?php printf(__( '%d stars', 'polldaddy' ), 3);?></td>
|
3271 |
+
<td><input onblur="pd_bind(this);" type="text" name="text_3_star" id="text_3_star" value="<?php echo( wp_specialchars( $settings->text_3_star ) ); ?>" maxlength="20" />
|
3272 |
+
</tr>
|
3273 |
+
<tr>
|
3274 |
+
<td height="30"><?php printf(__( '%d stars', 'polldaddy' ), 4);?></td>
|
3275 |
+
<td><input onblur="pd_bind(this);" type="text" name="text_4_star" id="text_4_star" value="<?php echo( wp_specialchars( $settings->text_4_star ) ); ?>" maxlength="20" />
|
3276 |
+
</tr>
|
3277 |
+
<tr>
|
3278 |
+
<td height="30"><?php printf(__( '%d stars', 'polldaddy' ), 5);?></td>
|
3279 |
+
<td><input onblur="pd_bind(this);" type="text" name="text_5_star" id="text_5_star" value="<?php echo( wp_specialchars( $settings->text_5_star ) ); ?>" maxlength="20" />
|
3280 |
+
</tr>
|
3281 |
+
<tr>
|
3282 |
+
<td height="30"><?php _e('Thank You', 'polldaddy');?></td>
|
3283 |
+
<td><input onblur="pd_bind(this);" type="text" name="text_thank_you" id="text_thank_you" value="<?php echo( wp_specialchars( $settings->text_thank_you ) ); ?>" maxlength="20" />
|
3284 |
+
</tr>
|
3285 |
+
<tr>
|
3286 |
+
<td height="30"><?php _e('Rate Up', 'polldaddy');?></td>
|
3287 |
+
<td><input onblur="pd_bind(this);" type="text" name="text_rate_up" id="text_rate_up" value="<?php echo( wp_specialchars( $settings->text_rate_up ) ); ?>" maxlength="20" />
|
3288 |
+
</tr>
|
3289 |
+
<tr>
|
3290 |
+
<td height="30"><?php _e('Rate Down', 'polldaddy');?></td>
|
3291 |
+
<td><input onblur="pd_bind(this);" type="text" name="text_rate_down" id="text_rate_down" value="<?php echo( wp_specialchars( $settings->text_rate_down ) ); ?>" maxlength="20" />
|
3292 |
+
</tr>
|
3293 |
+
</table>
|
3294 |
+
</div>
|
3295 |
+
</div>
|
3296 |
+
</div>
|
3297 |
+
<div id="post-body-content" class="has-sidebar-content">
|
3298 |
+
<div class="postbox">
|
3299 |
+
<h3><?php _e('Rating Type', 'polldaddy');?></h3>
|
3300 |
+
<div class="inside">
|
3301 |
+
<p><?php _e('Here you can choose how you want your rating to display. The 5 star rating is the most commonly used. The Nero rating is useful for keeping it simple.', 'polldaddy'); ?></p>
|
3302 |
+
<ul>
|
3303 |
+
<li style="display: inline;margin-right: 10px;">
|
3304 |
+
<label for="stars"><?php
|
3305 |
+
$checked = '';
|
3306 |
+
if ( $settings->type == 'stars' )
|
3307 |
+
$checked = ' checked="checked"';?>
|
3308 |
+
<input type="radio" onchange="pd_change_type( 0 );" <?php echo ( $checked ); ?> value="stars" id="stars" name="rating_type" />
|
3309 |
+
<?php printf(__( '%d Star Rating', 'polldaddy' ), 5);?>
|
3310 |
+
</label>
|
3311 |
+
</li>
|
3312 |
+
<li style="display: inline;">
|
3313 |
+
<label><?php
|
3314 |
+
$checked = '';
|
3315 |
+
if ( $settings->type == 'nero' )
|
3316 |
+
$checked = ' checked="checked"';?>
|
3317 |
+
<input type="radio" onchange="pd_change_type( 1 );" <?php echo( $checked ); ?> value="nero" id="nero" name="rating_type" />
|
3318 |
+
<?php _e('Nero Rating', 'polldaddy' );?>
|
3319 |
+
</label>
|
3320 |
+
</li>
|
3321 |
+
</ul>
|
3322 |
+
</div>
|
3323 |
+
</div>
|
3324 |
+
<div class="postbox">
|
3325 |
+
<h3><?php _e('Rating Style', 'polldaddy');?></h3>
|
3326 |
+
<div class="inside">
|
3327 |
+
<table>
|
3328 |
+
<tr>
|
3329 |
+
<td height="30" width="100" id="editor_star_size_text"><?php _e('Star Size', 'polldaddy');?></td>
|
3330 |
+
<td>
|
3331 |
+
<select name="size" id="size" onchange="pd_bind(this);"><?php
|
3332 |
+
$select = array( __('Small', 'polldaddy')." (16px)" => "sml", __('Medium', 'polldaddy')." (20px)" => "med", __('Large', 'polldaddy')." (24px)" => "lrg" );
|
3333 |
+
foreach ( $select as $option => $value ) :
|
3334 |
+
$selected = '';
|
3335 |
+
if ( $settings->size == $value )
|
3336 |
+
$selected = ' selected="selected"';
|
3337 |
+
echo ( '<option value="' . $value . '" ' . $selected . '>' . $option . '</option>' . "\n" );
|
3338 |
+
endforeach;?>
|
3339 |
+
</select>
|
3340 |
+
</td>
|
3341 |
+
</tr>
|
3342 |
+
<tr>
|
3343 |
+
<td height="30" id="editor_star_color_text"><?php echo 'bubu'; _e('Star Color', 'polldaddy');?></td>
|
3344 |
+
<td>
|
3345 |
+
<select name="star_color" id="star_color" onchange="pd_bind(this);" style="display: none;"><?php
|
3346 |
+
$select = array( __('Yellow', 'polldaddy') => "yellow", __('Red', 'polldaddy') => "red", __('Blue', 'polldaddy') => "blue", __('Green', 'polldaddy') => "green", __('Grey', 'polldaddy') => "grey" );
|
3347 |
+
foreach ( $select as $option => $value ) :
|
3348 |
+
$selected = '';
|
3349 |
+
if ( $settings->star_color == $value )
|
3350 |
+
$selected = ' selected="selected"';
|
3351 |
+
echo ( '<option value="' . $value . '" ' . $selected . '>' . $option . '</option>' . "\n" );
|
3352 |
+
endforeach;?>
|
3353 |
+
</select>
|
3354 |
+
<select name="nero_style" id="nero_style" onchange="pd_bind(this);" style="display: none;"><?php
|
3355 |
+
$select = array( __('Hand', 'polldaddy') => "hand" );
|
3356 |
+
foreach ( $select as $option => $value ) :
|
3357 |
+
$selected = '';
|
3358 |
+
if ( $settings->star_color == $value )
|
3359 |
+
$selected = ' selected="selected"';
|
3360 |
+
echo ( '<option value="' . $value . '" ' . $selected . '>' . $option . '</option>' . "\n" );
|
3361 |
+
endforeach;?>
|
3362 |
+
</select>
|
3363 |
+
</td>
|
3364 |
+
</tr>
|
3365 |
+
<tr>
|
3366 |
+
<td height="30"><?php _e('Custom Image', 'polldaddy');?></td>
|
3367 |
+
<td><input type="text" onblur="pd_bind(this);" name="custom_star" id="custom_star" value="<?php echo( clean_url( $settings->custom_star ) ); ?>" maxlength="200" />
|
3368 |
+
</tr>
|
3369 |
+
</table>
|
3370 |
+
</div>
|
3371 |
+
</div>
|
3372 |
+
<div class="postbox">
|
3373 |
+
<h3><?php _e('Text Layout & Font', 'polldaddy');?></h3>
|
3374 |
+
<div class="inside">
|
3375 |
+
<table>
|
3376 |
+
<tr>
|
3377 |
+
<td width="100" height="30"><?php _e('Align', 'polldaddy');?></td>
|
3378 |
+
<td>
|
3379 |
+
<select id="font_align" onchange="pd_bind(this);" name="font_align"><?php
|
3380 |
+
$select = array( __('Left', 'polldaddy') => "left", __('Center', 'polldaddy') => "center", __('Right', 'polldaddy') => "right" );
|
3381 |
+
foreach( $select as $option => $value ):
|
3382 |
+
$selected = '';
|
3383 |
+
if ( $settings->font_align == $value )
|
3384 |
+
$selected = ' selected="selected"';
|
3385 |
+
echo ( '<option value="' . $value . '" ' . $selected . '>' . $option . '</option>');
|
3386 |
+
endforeach;?>
|
3387 |
+
</select>
|
3388 |
+
</td>
|
3389 |
+
</tr>
|
3390 |
+
<tr>
|
3391 |
+
<td height="30"><?php _e('Position', 'polldaddy');?></td>
|
3392 |
+
<td>
|
3393 |
+
<select name="font_position" onchange="pd_bind(this);" id="font_position"><?php
|
3394 |
+
$select = array( __('Top', 'polldaddy') => "top", __('Right', 'polldaddy') => "right", __('Bottom', 'polldaddy') => "bottom" );
|
3395 |
+
foreach( $select as $option => $value ) :
|
3396 |
+
$selected = '';
|
3397 |
+
if ( $settings->font_position == $value )
|
3398 |
+
$selected = ' selected="selected"';
|
3399 |
+
echo ( '<option value="' . $value . '" ' . $selected . '>' . $option . '</option>');
|
3400 |
+
endforeach;?>
|
3401 |
+
</select>
|
3402 |
+
</td>
|
3403 |
+
</tr>
|
3404 |
+
<tr>
|
3405 |
+
<td height="30"><?php _e('Font', 'polldaddy');?></td>
|
3406 |
+
<td>
|
3407 |
+
<select name="font_family" id="font_family" onchange="pd_bind(this);"><?php
|
3408 |
+
$select = array( __('Inherit', 'polldaddy') => "", "Arial" => "arial", "Comic Sans MS" => "comic sans ms", "Courier" => "courier", "Georgia" => "georgia", "Lucida Grande" => "lucida grande", "Tahoma" => "tahoma", "Times" => "times", "Trebuchet MS" => "trebuchet ms", "Verdana" => "verdana" );
|
3409 |
+
foreach( $select as $option => $value ) :
|
3410 |
+
$selected = '';
|
3411 |
+
if ( $settings->font_family == $value )
|
3412 |
+
$selected = ' selected="selected"';
|
3413 |
+
echo ( '<option value="' . $value . '" ' . $selected . '>' . $option . '</option>' );
|
3414 |
+
endforeach;?>
|
3415 |
+
</select>
|
3416 |
+
</td>
|
3417 |
+
</tr>
|
3418 |
+
<tr>
|
3419 |
+
<td height="30"><?php _e('Color', 'polldaddy');?></td>
|
3420 |
+
<td><input type="text" onblur="pd_bind(this);" class="elmColor jscolor-picker" name="font_color" id="font_color" value="<?php echo( wp_specialchars( $settings->font_color ) ); ?>" maxlength="11" autocomplete="off"/>
|
3421 |
+
</td>
|
3422 |
+
</tr>
|
3423 |
+
<tr>
|
3424 |
+
<td><?php _e('Size', 'polldaddy');?></td>
|
3425 |
+
<td>
|
3426 |
+
<select name="font_size" id="font_size" onchange="pd_bind(this);"><?php
|
3427 |
+
$select = array( __('Inherit', 'polldaddy') => "", "6px" => "6px", "8px" => "8px", "9px" => "9px", "10px" => "10px", "11px" => "11px", "12px" => "12px", "14px" => "14px", "16px" => "16px", "18px" => "18px", "20px" => "20px", "24px" => "24px", "30px" => "30px", "36px" => "36px", );
|
3428 |
+
foreach ( $select as $option => $value ) :
|
3429 |
+
$selected = '';
|
3430 |
+
if ( $settings->font_size == $value )
|
3431 |
+
$selected = ' selected="selected"';
|
3432 |
+
echo ( '<option value="' . $value . '" ' . $selected . '>' . $option . '</option>' . "\n" );
|
3433 |
+
endforeach;?>
|
3434 |
+
</select>
|
3435 |
+
</td>
|
3436 |
+
</tr>
|
3437 |
+
<tr>
|
3438 |
+
<td height="30"><?php _e('Line Height', 'polldaddy');?></td>
|
3439 |
+
<td>
|
3440 |
+
<select name="font_line_height" id="font_line_height" onchange="pd_bind(this);"><?php
|
3441 |
+
$select = array( __('Inherit', 'polldaddy') => "", "6px" => "6px", "8px" => "8px", "9px" => "9px", "10px" => "10px", "11px" => "11px", "12px" => "12px", "14px" => "14px", "16px" => "16px", "18px" => "18px", "20px" => "20px", "24px" => "24px", "30px" => "30px", "36px" => "36px", );
|
3442 |
+
foreach ( $select as $option => $value ) :
|
3443 |
+
$selected = '';
|
3444 |
+
if ( $settings->font_line_height == $value )
|
3445 |
+
$selected = ' selected="selected"';
|
3446 |
+
echo ( '<option value="' . $value . '" ' . $selected . '>' . $option . '</option>' . "\n" );
|
3447 |
+
endforeach; ?>
|
3448 |
+
</select>
|
3449 |
+
</td>
|
3450 |
+
</tr>
|
3451 |
+
<tr>
|
3452 |
+
<td height="30"><?php _e('Bold', 'polldaddy');?></td>
|
3453 |
+
<td><?php
|
3454 |
+
$checked = '';
|
3455 |
+
if ( $settings->font_bold == 'bold' )
|
3456 |
+
$checked = ' checked="checked"';?>
|
3457 |
+
<input type="checkbox" name="font_bold" onclick="pd_bind(this);" id="font_bold" value="bold" <?php echo( $checked ); ?> />
|
3458 |
+
</td>
|
3459 |
+
</tr>
|
3460 |
+
<tr>
|
3461 |
+
<td height="30"><?php _e('Italic', 'polldaddy');?></td><?php
|
3462 |
+
$checked = '';
|
3463 |
+
if( $settings->font_italic == 'italic' )
|
3464 |
+
$checked = ' checked="checked"';?>
|
3465 |
+
<td><input type="checkbox" name="font_italic" onclick="pd_bind(this);" id="font_italic" value="italic" <?php echo( $checked ); ?>/></td>
|
3466 |
+
</tr>
|
3467 |
+
</table>
|
3468 |
+
</div>
|
3469 |
+
</div>
|
3470 |
+
</div>
|
3471 |
+
</div>
|
3472 |
+
</form>
|
3473 |
+
<script type="text/javascript">
|
3474 |
+
PDRTJS_settings = <?php echo ( $settings_text ); ?>;
|
3475 |
+
PDRTJS_settings.id = "1";
|
3476 |
+
PDRTJS_settings.unique_id = "xxx";
|
3477 |
+
PDRTJS_settings.title = "";
|
3478 |
+
PDRTJS_settings.override = "<?php echo( $rating_id ); ?>";
|
3479 |
+
PDRTJS_settings.permalink = "";
|
3480 |
+
PDRTJS_1 = new PDRTJS_RATING( PDRTJS_settings );
|
3481 |
+
pd_change_type( <?php echo ( $rating_type ) ?> );
|
3482 |
+
</script><?php
|
3483 |
+
} ?>
|
3484 |
+
</div><?php
|
3485 |
+
} // from if !error ?>
|
3486 |
+
</div><?php
|
3487 |
+
}
|
3488 |
+
|
3489 |
+
function update_rating(){
|
3490 |
+
$rating_type = 0;
|
3491 |
+
$rating_id = 0;
|
3492 |
+
$set = null;
|
3493 |
+
|
3494 |
+
if( isset( $_REQUEST['rating_id'] ) )
|
3495 |
+
$rating_id = (int) $_REQUEST['rating_id'];
|
3496 |
+
|
3497 |
+
if( isset( $_REQUEST['rating_type'] ) && $_REQUEST['rating_type'] == 'stars' ) {
|
3498 |
+
$set->type = 'stars';
|
3499 |
+
$rating_type = 0;
|
3500 |
+
if( isset( $_REQUEST['star_color'] ) )
|
3501 |
+
$set->star_color = attribute_escape( $_REQUEST['star_color'] );
|
3502 |
+
} else {
|
3503 |
+
$set->type = 'nero';
|
3504 |
+
$rating_type = 1;
|
3505 |
+
if( isset( $_REQUEST['nero_style'] ) )
|
3506 |
+
$set->star_color = attribute_escape( $_REQUEST['nero_style'] );
|
3507 |
+
}
|
3508 |
+
|
3509 |
+
$set->size = wp_specialchars( $_REQUEST['size'], 1 );
|
3510 |
+
$set->custom_star = wp_specialchars( clean_url( $_REQUEST['custom_star'] ) , 1 );
|
3511 |
+
$set->font_align = wp_specialchars( $_REQUEST['font_align'], 1 );
|
3512 |
+
$set->font_position = wp_specialchars( $_REQUEST['font_position'], 1 );
|
3513 |
+
$set->font_family = wp_specialchars( $_REQUEST['font_family'], 1);
|
3514 |
+
$set->font_size = wp_specialchars( $_REQUEST['font_size'], 1 );
|
3515 |
+
$set->font_line_height = wp_specialchars( $_REQUEST['font_line_height'], 1 );
|
3516 |
+
|
3517 |
+
if ( isset( $_REQUEST['font_bold'] ) && $_REQUEST['font_bold'] == 'bold' )
|
3518 |
+
$set->font_bold = 'bold';
|
3519 |
+
else
|
3520 |
+
$set->font_bold = 'normal';
|
3521 |
+
|
3522 |
+
if ( isset( $_REQUEST['font_italic'] ) && $_REQUEST['font_italic'] == 'italic' )
|
3523 |
+
$set->font_italic = 'italic';
|
3524 |
+
else
|
3525 |
+
$set->font_italic = 'normal';
|
3526 |
+
|
3527 |
+
$set->text_votes = wp_specialchars( $_REQUEST['text_votes'], 1 );
|
3528 |
+
$set->text_rate_this = wp_specialchars( $_REQUEST['text_rate_this'], 1 );
|
3529 |
+
$set->text_1_star = wp_specialchars( $_REQUEST['text_1_star'], 1 );
|
3530 |
+
$set->text_2_star = wp_specialchars( $_REQUEST['text_2_star'], 1 );
|
3531 |
+
$set->text_3_star = wp_specialchars( $_REQUEST['text_3_star'], 1 );
|
3532 |
+
$set->text_4_star = wp_specialchars( $_REQUEST['text_4_star'], 1 );
|
3533 |
+
$set->text_5_star = wp_specialchars( $_REQUEST['text_5_star'], 1 );
|
3534 |
+
$set->text_thank_you = wp_specialchars( $_REQUEST['text_thank_you'], 1 );
|
3535 |
+
$set->text_rate_up = wp_specialchars( $_REQUEST['text_rate_up'], 1 );
|
3536 |
+
$set->text_rate_down = wp_specialchars( $_REQUEST['text_rate_down'], 1 );
|
3537 |
+
$set->font_color = wp_specialchars( $_REQUEST['font_color'], 1 );
|
3538 |
+
|
3539 |
+
$settings_text = json_encode( $set );
|
3540 |
+
|
3541 |
+
$polldaddy = $this->get_client( WP_POLLDADDY__PARTNERGUID, $this->rating_user_code );
|
3542 |
+
$polldaddy->reset();
|
3543 |
+
$response = $polldaddy->update_rating( $rating_id, $settings_text, $rating_type );
|
3544 |
+
}
|
3545 |
+
function rating_reports() {
|
3546 |
+
$polldaddy = $this->get_client( WP_POLLDADDY__PARTNERGUID, $this->rating_user_code );
|
3547 |
+
$rating_id = get_option( 'pd-rating-posts-id' );
|
3548 |
+
|
3549 |
+
$report_type = 'posts';
|
3550 |
+
$period = '7';
|
3551 |
+
$show_rating = 0;
|
3552 |
+
|
3553 |
+
if ( isset( $_REQUEST['rating'] ) ){
|
3554 |
+
switch ( $_REQUEST['rating'] ) :
|
3555 |
+
case 'pages':
|
3556 |
+
$report_type = 'pages';
|
3557 |
+
$rating_id = (int) get_option( 'pd-rating-pages-id' );
|
3558 |
+
break;
|
3559 |
+
|
3560 |
+
case 'comments':
|
3561 |
+
$report_type = 'comments';
|
3562 |
+
$rating_id = get_option( 'pd-rating-comments-id' );
|
3563 |
+
break;
|
3564 |
+
|
3565 |
+
case 'posts':
|
3566 |
+
$report_type = 'posts';
|
3567 |
+
$rating_id = get_option( 'pd-rating-posts-id' );
|
3568 |
+
break;
|
3569 |
+
endswitch;
|
3570 |
+
}
|
3571 |
+
|
3572 |
+
if ( isset( $_REQUEST['filter'] ) && $_REQUEST['filter'] ){
|
3573 |
+
switch ( $_REQUEST['filter'] ) :
|
3574 |
+
case '1':
|
3575 |
+
$period = '1';
|
3576 |
+
break;
|
3577 |
+
|
3578 |
+
case '7':
|
3579 |
+
$period = '7';
|
3580 |
+
break;
|
3581 |
+
|
3582 |
+
case '31':
|
3583 |
+
$period = '31';
|
3584 |
+
break;
|
3585 |
+
|
3586 |
+
case '90':
|
3587 |
+
$period = '90';
|
3588 |
+
break;
|
3589 |
+
|
3590 |
+
case '365':
|
3591 |
+
$period = '365';
|
3592 |
+
break;
|
3593 |
+
|
3594 |
+
case 'all':
|
3595 |
+
$period = 'all';
|
3596 |
+
break;
|
3597 |
+
endswitch;
|
3598 |
+
}
|
3599 |
+
|
3600 |
+
$page_size = 15;
|
3601 |
+
$current_page = 1;
|
3602 |
+
|
3603 |
+
if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'change-report' ){
|
3604 |
+
$current_page = 1;
|
3605 |
+
} else {
|
3606 |
+
if ( isset( $_REQUEST['paged'] ) ) {
|
3607 |
+
$current_page = (int) $_REQUEST['paged'];
|
3608 |
+
if ( $current_page == 0 )
|
3609 |
+
$current_page = 1;
|
3610 |
+
}
|
3611 |
+
}
|
3612 |
+
|
3613 |
+
$start = ( $current_page * $page_size ) - $page_size;
|
3614 |
+
$end = $page_size;
|
3615 |
+
|
3616 |
+
$response = $polldaddy->get_rating_results( $rating_id, $period, $start, $end );
|
3617 |
+
|
3618 |
+
$total = $total_pages = 0;
|
3619 |
+
$ratings = null;
|
3620 |
+
|
3621 |
+
if( !empty($response) ){
|
3622 |
+
$ratings = $response->rating;
|
3623 |
+
$total = (int) $response->_total;
|
3624 |
+
$total_pages = ceil( $total / $page_size );
|
3625 |
+
}
|
3626 |
+
|
3627 |
+
$page_links = paginate_links( array(
|
3628 |
+
'base' => add_query_arg( array ('paged' => '%#%', 'rating' => $report_type, 'filter' => $period ) ),
|
3629 |
+
'format' => '',
|
3630 |
+
'prev_text' => __('«', 'polldaddy'),
|
3631 |
+
'next_text' => __('»', 'polldaddy'),
|
3632 |
+
'total' => $total_pages,
|
3633 |
+
'current' => $current_page
|
3634 |
+
));
|
3635 |
+
?>
|
3636 |
+
<div class="wrap">
|
3637 |
+
<h2><?php _e('Rating Reports', 'polldaddy');?> <span style="font-size: 16px;">(<?php echo ( $report_type ); ?>)</span></h2>
|
3638 |
+
<div class="clear"></div>
|
3639 |
+
<form method="post" action="">
|
3640 |
+
<div class="tablenav">
|
3641 |
+
<div class="alignleft">
|
3642 |
+
<select name="rating"><?php
|
3643 |
+
$select = array( __('Posts', 'polldaddy') => "posts", __('Pages', 'polldaddy') => "pages", __('Comments', 'polldaddy') => "comments" );
|
3644 |
+
foreach ( $select as $option => $value ) :
|
3645 |
+
$selected = '';
|
3646 |
+
if ( $value == $report_type )
|
3647 |
+
$selected = ' selected="selected"';
|
3648 |
+
echo ( '<option value="' . $value . '" ' . $selected . '>' . $option . '</option>' . "\n" );
|
3649 |
+
endforeach; ?>
|
3650 |
+
</select>
|
3651 |
+
<input type="hidden" name="action" value="change-report" />
|
3652 |
+
<input class="button-secondary action" type="submit" value="<?php esc_attr_e('View Report', 'polldaddy');?>" />
|
3653 |
+
<select name="filter"><?php
|
3654 |
+
$select = array( __('Last 24 hours', 'polldaddy') => "1", __('Last 7 days', 'polldaddy') => "7", __('Last 31 days', 'polldaddy') => "31", __('Last 3 months', 'polldaddy') => "90", __('Last 12 months', 'polldaddy') => "365", __('All time', 'polldaddy') => "all" );
|
3655 |
+
foreach ( $select as $option => $value ) :
|
3656 |
+
$selected = '';
|
3657 |
+
if ( $value == $period )
|
3658 |
+
$selected = ' selected="selected"';
|
3659 |
+
echo ( '<option value="' . $value . '" ' . $selected . '>' . $option . '</option>' . "\n" );
|
3660 |
+
endforeach; ?>
|
3661 |
+
</select>
|
3662 |
+
<input class="button-secondary action" type="submit" value="<?php _e('Filter Report', 'polldaddy');?>" />
|
3663 |
+
</div>
|
3664 |
+
<div class="alignright">
|
3665 |
+
<div class="tablenav-pages">
|
3666 |
+
<?php echo( $page_links ); ?>
|
3667 |
+
</div>
|
3668 |
+
</div>
|
3669 |
+
</div>
|
3670 |
+
</form>
|
3671 |
+
|
3672 |
+
<table class="widefat"><?php
|
3673 |
+
if ( count( $ratings ) == 0 ) { ?>
|
3674 |
+
<tbody>
|
3675 |
+
<tr>
|
3676 |
+
<td colspan="4"><?php printf(__('No ratings have been collected for your %s yet.', 'polldaddy'), $report_type); ?></td>
|
3677 |
+
</tr>
|
3678 |
+
</tbody><?php
|
3679 |
+
} else { ?>
|
3680 |
+
<thead>
|
3681 |
+
<tr>
|
3682 |
+
<th><?php _e('Start Date', 'polldaddy');?></th>
|
3683 |
+
<th><?php _e('Title', 'polldaddy');?></th>
|
3684 |
+
<th><?php _e('Votes', 'polldaddy');?></th>
|
3685 |
+
<th style="width: 120px;"><?php _e('Average Rating', 'polldaddy');?></th>
|
3686 |
+
</tr>
|
3687 |
+
</thead><?php
|
3688 |
+
echo ( '<tbody>' );
|
3689 |
+
$alt_counter = 0;
|
3690 |
+
$alt = '';
|
3691 |
+
|
3692 |
+
foreach ( $ratings as $rating ) :
|
3693 |
+
$alt_counter++;
|
3694 |
+
|
3695 |
+
if ( ( $alt_counter % 2 ) == 0 )
|
3696 |
+
$alt = ' class="alternate"';
|
3697 |
+
else
|
3698 |
+
$alt = ''; ?>
|
3699 |
+
<tr <?php echo( $alt ); ?>>
|
3700 |
+
<td>
|
3701 |
+
<?php echo( str_replace( '-', '/', substr( wp_specialchars( $rating->date ), 0, 10 ) ) ); ?><br/>
|
3702 |
+
<?php echo( wp_specialchars( $rating->uid ) ); ?>
|
3703 |
+
</td>
|
3704 |
+
<td>
|
3705 |
+
<?php echo( wp_specialchars( $rating->title ) ); ?>
|
3706 |
+
<br />
|
3707 |
+
<a href="<?php echo( clean_url( $rating->permalink ) ); ?>" target="_blank"><?php echo( clean_url( $rating->permalink ) ); ?></a>
|
3708 |
+
</td>
|
3709 |
+
<td style="padding-top: 10px; font-weight: bold;"><?php echo( number_format( $rating->_votes ) ); ?></td>
|
3710 |
+
<td style="padding-top: 10px;"><?php
|
3711 |
+
if ( $rating->_type == 0 ) {
|
3712 |
+
$avg_rating = $this->round( $rating->average_rating, 0.5 );
|
3713 |
+
|
3714 |
+
echo ( '<div>' );
|
3715 |
+
$image_pos = '';
|
3716 |
+
|
3717 |
+
for ( $c = 1; $c <= 5; $c++ ){
|
3718 |
+
if ( $avg_rating > 0 ){
|
3719 |
+
if ( $avg_rating < $c ){
|
3720 |
+
$image_pos = 'bottom left';
|
3721 |
+
}
|
3722 |
+
if ( $avg_rating == ( $c - 1 + 0.5 ) ){
|
3723 |
+
$image_pos = 'center left';
|
3724 |
+
}
|
3725 |
+
}
|
3726 |
+
echo ('<div style="width: 20px; height: 20px; background: url(http://i.polldaddy.com/ratings/images/star-yellow-med.png) ' . $image_pos . '; float: left;"></div>' );
|
3727 |
+
}
|
3728 |
+
echo ( '<br class="clear" /></div>' );
|
3729 |
+
} else {
|
3730 |
+
echo ( '<div>' );
|
3731 |
+
echo ( '<div style="margin: 0px 0px 0px 20px; background: transparent url(http://i.polldaddy.com/images/rate-graph-up.png); width: 20px; height: 20px; float: left;"></div>' );
|
3732 |
+
echo ( '<div style="float:left; line-height: 20px; padding: 0px 10px 0px 5px;">' . number_format ( $rating->total1 ) . '</div>' );
|
3733 |
+
echo ( '<div style="margin: 0px; background: transparent url(http://i.polldaddy.com/images/rate-graph-dn.png); width: 20px; height: 20px; float: left;"></div>' );
|
3734 |
+
echo ( '<div style="float:left; line-height: 20px; padding: 0px 10px 0px 5px;">' . number_format( $rating->total2 ) . '</div>' );
|
3735 |
+
echo ( '<br class="clear" /></div>' );
|
3736 |
+
} ?>
|
3737 |
+
</td>
|
3738 |
+
</tr><?php
|
3739 |
+
endforeach;
|
3740 |
+
echo ( '</tbody>' );
|
3741 |
+
} ?>
|
3742 |
+
</table>
|
3743 |
+
<div class="tablenav">
|
3744 |
+
<div class="alignright">
|
3745 |
+
<div class="tablenav-pages">
|
3746 |
+
<?php echo( $page_links ); ?>
|
3747 |
+
</div>
|
3748 |
+
</div>
|
3749 |
+
</div>
|
3750 |
+
</div>
|
3751 |
+
<p></p><?php
|
3752 |
+
}
|
3753 |
+
|
3754 |
+
function plugin_options() {
|
3755 |
+
if ( isset( $_POST['polldaddy_email'] ) ){
|
3756 |
+
$account_email = attribute_escape( $_POST['polldaddy_email'] );
|
3757 |
+
}
|
3758 |
+
else{
|
3759 |
+
$polldaddy = $this->get_client( WP_POLLDADDY__PARTNERGUID, $this->user_code );
|
3760 |
+
$account = $polldaddy->get_account();
|
3761 |
+
|
3762 |
+
if( !empty($account) )
|
3763 |
+
$account_email = attribute_escape( $account->email );
|
3764 |
+
|
3765 |
+
$polldaddy->reset();
|
3766 |
+
$poll = $polldaddy->get_poll( 1 );
|
3767 |
+
|
3768 |
+
$options = array(
|
3769 |
+
101 => 'Aluminum Narrow',
|
3770 |
+
102 => 'Aluminum Medium',
|
3771 |
+
103 => 'Aluminum Wide',
|
3772 |
+
104 => 'Plain White Narrow',
|
3773 |
+
105 => 'Plain White Medium',
|
3774 |
+
106 => 'Plain White Wide',
|
3775 |
+
107 => 'Plain Black Narrow',
|
3776 |
+
108 => 'Plain Black Medium',
|
3777 |
+
109 => 'Plain Black Wide',
|
3778 |
+
110 => 'Paper Narrow',
|
3779 |
+
111 => 'Paper Medium',
|
3780 |
+
112 => 'Paper Wide',
|
3781 |
+
113 => 'Skull Dark Narrow',
|
3782 |
+
114 => 'Skull Dark Medium',
|
3783 |
+
115 => 'Skull Dark Wide',
|
3784 |
+
116 => 'Skull Light Narrow',
|
3785 |
+
117 => 'Skull Light Medium',
|
3786 |
+
118 => 'Skull Light Wide',
|
3787 |
+
157 => 'Micro',
|
3788 |
+
119 => 'Plastic White Narrow',
|
3789 |
+
120 => 'Plastic White Medium',
|
3790 |
+
121 => 'Plastic White Wide',
|
3791 |
+
122 => 'Plastic Grey Narrow',
|
3792 |
+
123 => 'Plastic Grey Medium',
|
3793 |
+
124 => 'Plastic Grey Wide',
|
3794 |
+
125 => 'Plastic Black Narrow',
|
3795 |
+
126 => 'Plastic Black Medium',
|
3796 |
+
127 => 'Plastic Black Wide',
|
3797 |
+
128 => 'Manga Narrow',
|
3798 |
+
129 => 'Manga Medium',
|
3799 |
+
130 => 'Manga Wide',
|
3800 |
+
131 => 'Tech Dark Narrow',
|
3801 |
+
132 => 'Tech Dark Medium',
|
3802 |
+
133 => 'Tech Dark Wide',
|
3803 |
+
134 => 'Tech Grey Narrow',
|
3804 |
+
135 => 'Tech Grey Medium',
|
3805 |
+
136 => 'Tech Grey Wide',
|
3806 |
+
137 => 'Tech Light Narrow',
|
3807 |
+
138 => 'Tech Light Medium',
|
3808 |
+
139 => 'Tech Light Wide',
|
3809 |
+
140 => 'Working Male Narrow',
|
3810 |
+
141 => 'Working Male Medium',
|
3811 |
+
142 => 'Working Male Wide',
|
3812 |
+
143 => 'Working Female Narrow',
|
3813 |
+
144 => 'Working Female Medium',
|
3814 |
+
145 => 'Working Female Wide',
|
3815 |
+
146 => 'Thinking Male Narrow',
|
3816 |
+
147 => 'Thinking Male Medium',
|
3817 |
+
148 => 'Thinking Male Wide',
|
3818 |
+
149 => 'Thinking Female Narrow',
|
3819 |
+
150 => 'Thinking Female Medium',
|
3820 |
+
151 => 'Thinking Female Wide',
|
3821 |
+
152 => 'Sunset Narrow',
|
3822 |
+
153 => 'Sunset Medium',
|
3823 |
+
154 => 'Sunset Wide',
|
3824 |
+
155 => 'Music Medium',
|
3825 |
+
156 => 'Music Wide'
|
3826 |
+
);
|
3827 |
+
|
3828 |
+
$polldaddy->reset();
|
3829 |
+
$styles = $polldaddy->get_styles();
|
3830 |
+
|
3831 |
+
if( !empty( $styles ) && !empty( $styles->style ) && count( $styles->style ) > 0 ){
|
3832 |
+
foreach( (array) $styles->style as $style ){
|
3833 |
+
$options[ (int) $style->_id ] = $style->title;
|
3834 |
+
}
|
3835 |
+
}
|
3836 |
+
}
|
3837 |
+
$this->print_errors();
|
3838 |
+
?>
|
3839 |
+
<div id="options-page" class="wrap">
|
3840 |
+
<div class="icon32" id="icon-options-general"><br/></div>
|
3841 |
+
<h2>
|
3842 |
+
<?php _e( 'Options', 'polldaddy' ); ?>
|
3843 |
+
</h2>
|
3844 |
+
<?php if( $this->is_admin || $this->multiple_accounts ) {?>
|
3845 |
+
<h3>
|
3846 |
+
<?php _e( 'PollDaddy Account Info', 'polldaddy' ); ?>
|
3847 |
+
</h3>
|
3848 |
+
<p>
|
3849 |
+
<?php _e( 'This is the PollDadddy account you currently have imported into your WordPress account', 'polldaddy' ); ?>.
|
3850 |
+
</p>
|
3851 |
+
<form action="" method="post">
|
3852 |
+
<table class="form-table">
|
3853 |
+
<tbody>
|
3854 |
+
<tr class="form-field form-required">
|
3855 |
+
<th valign="top" scope="row">
|
3856 |
+
<label for="polldaddy-email">
|
3857 |
+
<?php _e( 'PollDaddy Email Address', 'polldaddy' ); ?>
|
3858 |
+
</label>
|
3859 |
+
</th>
|
3860 |
+
<td>
|
3861 |
+
<input type="text" name="polldaddy_email" id="polldaddy-email" aria-required="true" size="40" value="<?php echo $account_email; ?>" />
|
3862 |
+
</td>
|
3863 |
+
</tr>
|
3864 |
+
<tr class="form-field form-required">
|
3865 |
+
<th valign="top" scope="row">
|
3866 |
+
<label for="polldaddy-password">
|
3867 |
+
<?php _e( 'PollDaddy Password', 'polldaddy' ); ?>
|
3868 |
+
</label>
|
3869 |
+
</th>
|
3870 |
+
<td>
|
3871 |
+
<input type="password" name="polldaddy_password" id="polldaddy-password" aria-required="true" size="40" />
|
3872 |
+
</td>
|
3873 |
+
</tr>
|
3874 |
+
</tbody>
|
3875 |
+
</table>
|
3876 |
+
<p class="submit">
|
3877 |
+
<?php wp_nonce_field( 'polldaddy-account' ); ?>
|
3878 |
+
<input type="hidden" name="action" value="import-account" />
|
3879 |
+
<input type="hidden" name="account" value="import" />
|
3880 |
+
<input type="submit" value="<?php echo attribute_escape( __( 'Import Account', 'polldaddy' ) ); ?>" />
|
3881 |
+
</p>
|
3882 |
+
</form>
|
3883 |
+
<br />
|
3884 |
+
<?php } ?>
|
3885 |
+
<h3>
|
3886 |
+
<?php _e( 'General Settings', 'polldaddy' ); ?>
|
3887 |
+
</h3>
|
3888 |
+
<form action="" method="post">
|
3889 |
+
<table class="form-table">
|
3890 |
+
<tbody>
|
3891 |
+
<tr valign="top">
|
3892 |
+
<th valign="top" scope="row">
|
3893 |
+
<label>
|
3894 |
+
<?php _e( 'Default poll settings', 'polldaddy' ); ?>
|
3895 |
+
</label>
|
3896 |
+
</th>
|
3897 |
+
<td>
|
3898 |
+
<fieldset>
|
3899 |
+
<legend class="screen-reader-text"><span>poll-defaults</span></legend><?php
|
3900 |
+
$selected = '';
|
3901 |
+
if ( $poll->multipleChoice == 'yes' )
|
3902 |
+
$selected = 'checked="checked"';?>
|
3903 |
+
<label for="multipleChoice"><input type="checkbox" <?php echo $selected; ?> value="1" id="multipleChoice" name="multipleChoice"> <?php _e( 'Multiple Choice', 'polldaddy' ); ?></label>
|
3904 |
+
<br /><?php
|
3905 |
+
$selected = '';
|
3906 |
+
if ( $poll->randomiseAnswers == 'yes' )
|
3907 |
+
$selected = 'checked="checked"';?>
|
3908 |
+
<label for="randomiseAnswers"><input type="checkbox" <?php echo $selected; ?> value="1" id="randomiseAnswers" name="randomiseAnswers"> <?php _e( 'Randomise Answers', 'polldaddy' ); ?></label>
|
3909 |
+
<br /><?php
|
3910 |
+
$selected = '';
|
3911 |
+
if ( $poll->otherAnswer == 'yes' )
|
3912 |
+
$selected = 'checked="checked"';?>
|
3913 |
+
<label for="otherAnswer"><input type="checkbox" <?php echo $selected; ?> value="1" id="otherAnswer" name="otherAnswer"> <?php _e( 'Other Answer', 'polldaddy' ); ?></label>
|
3914 |
+
<br /><?php
|
3915 |
+
$selected = '';
|
3916 |
+
if ( $poll->sharing == 'yes' )
|
3917 |
+
$selected = 'checked="checked"';?>
|
3918 |
+
<label for="sharing"><input type="checkbox" <?php echo $selected; ?> value="1" id="sharing" name="sharing"> <?php _e( 'Sharing', 'polldaddy' ); ?></label>
|
3919 |
+
<br />
|
3920 |
+
<label for="resultsType">
|
3921 |
+
<select id="resultsType" name="resultsType">
|
3922 |
+
<option <?php echo $poll->resultsType == 'show' ? 'selected="selected"':''; ?> value="show"><?php _e('Show', 'polldaddy'); ?></option>
|
3923 |
+
<option <?php echo $poll->resultsType == 'hide' ? 'selected="selected"':''; ?> value="hide"><?php _e('Hide', 'polldaddy'); ?></option>
|
3924 |
+
<option <?php echo $poll->resultsType == 'percent' ? 'selected="selected"':''; ?> value="percent"><?php _e('Percentages', 'polldaddy'); ?></option>
|
3925 |
+
</select> <?php _e( 'Poll results', 'polldaddy' ); ?>
|
3926 |
+
</label>
|
3927 |
+
<br />
|
3928 |
+
<label for="styleID">
|
3929 |
+
<select id="styleID" name="styleID"><?php
|
3930 |
+
foreach ( (array) $options as $styleID => $label ) :
|
3931 |
+
$selected = $styleID == $poll->styleID ? ' selected="selected"' : ''; ?>
|
3932 |
+
<option value="<?php echo (int) $styleID; ?>"<?php echo $selected; ?>><?php echo wp_specialchars( $label ); ?></option><?php
|
3933 |
+
endforeach;?>
|
3934 |
+
</select> <?php _e( 'Poll style', 'polldaddy' ); ?>
|
3935 |
+
</label>
|
3936 |
+
<br />
|
3937 |
+
<label for="blockRepeatVotersType">
|
3938 |
+
<select id="poll-block-repeat" name="blockRepeatVotersType">
|
3939 |
+
<option <?php echo $poll->blockRepeatVotersType == 'off' ? 'selected="selected"':''; ?> value="off"><?php _e('Off', 'polldaddy'); ?></option>
|
3940 |
+
<option <?php echo $poll->blockRepeatVotersType == 'cookie' ? 'selected="selected"':''; ?> value="cookie"><?php _e('Cookie', 'polldaddy'); ?></option>
|
3941 |
+
<option <?php echo $poll->blockRepeatVotersType == 'cookieip' ? 'selected="selected"':''; ?> value="cookieip"><?php _e('Cookie & IP address', 'polldaddy'); ?></option>
|
3942 |
+
</select> <?php _e( 'Block repeat voters', 'polldaddy' ); ?>
|
3943 |
+
</label>
|
3944 |
+
<br />
|
3945 |
+
<label for="blockExpiration">
|
3946 |
+
<select id="blockExpiration" name="blockExpiration">
|
3947 |
+
<option value="0" <?php echo $poll->blockExpiration == 0 ? 'selected="selected"':''; ?>><?php _e('Never', 'polldaddy'); ?></option>
|
3948 |
+
<option value="3600" <?php echo $poll->blockExpiration == 3600 ? 'selected="selected"':''; ?>><?php printf( __('%d hour', 'polldaddy'), 1 ); ?></option>
|
3949 |
+
<option value="10800" <?php echo (int) $poll->blockExpiration == 10800 ? 'selected="selected"' : ''; ?>><?php printf( __('%d hours', 'polldaddy'), 3 ); ?></option>
|
3950 |
+
<option value="21600" <?php echo (int) $poll->blockExpiration == 21600 ? 'selected="selected"' : ''; ?>><?php printf( __('%d hours', 'polldaddy'), 6 ); ?></option>
|
3951 |
+
<option value="43200" <?php echo (int) $poll->blockExpiration == 43200 ? 'selected="selected"' : ''; ?>><?php printf( __('%d hours', 'polldaddy'), 12 ); ?></option>
|
3952 |
+
<option value="86400" <?php echo (int) $poll->blockExpiration == 86400 ? 'selected="selected"' : ''; ?>><?php printf( __('%d day', 'polldaddy'), 1 ); ?></option>
|
3953 |
+
<option value="604800" <?php echo (int) $poll->blockExpiration == 604800 ? 'selected="selected"' : ''; ?>><?php printf( __('%d week', 'polldaddy'), 1 ); ?></option>
|
3954 |
+
<option value="2419200" <?php echo (int) $poll->blockExpiration == 2419200 ? 'selected="selected"' : ''; ?>><?php printf( __('%d month', 'polldaddy'), 1 ); ?></option>
|
3955 |
+
</select> <?php _e( 'Block expiration limit', 'polldaddy' ); ?>
|
3956 |
+
</label>
|
3957 |
+
<br />
|
3958 |
+
</fieldset>
|
3959 |
+
</td>
|
3960 |
+
</tr>
|
3961 |
+
<?php $this->plugin_options_add(); ?>
|
3962 |
+
</tbody>
|
3963 |
+
</table>
|
3964 |
+
<p class="submit">
|
3965 |
+
<?php wp_nonce_field( 'polldaddy-account' ); ?>
|
3966 |
+
<input type="hidden" name="action" value="update-options" />
|
3967 |
+
<input type="submit" value="<?php echo attribute_escape( __( 'Save Options', 'polldaddy' ) ); ?>" />
|
3968 |
+
</p>
|
3969 |
+
</form>
|
3970 |
+
</div>
|
3971 |
+
<?php
|
3972 |
+
}
|
3973 |
+
|
3974 |
+
function plugin_options_add(){}
|
3975 |
+
|
3976 |
+
function round($number, $increments) {
|
3977 |
+
$increments = 1 / $increments;
|
3978 |
+
return ( round ( $number * $increments ) / $increments );
|
3979 |
+
}
|
3980 |
+
|
3981 |
+
function signup() {
|
3982 |
+
return $this->api_key_page();
|
3983 |
+
}
|
3984 |
+
|
3985 |
+
function can_edit( &$poll ) {
|
3986 |
+
if ( empty( $poll->_owner ) )
|
3987 |
+
return true;
|
3988 |
+
|
3989 |
+
if ( $this->id == $poll->_owner )
|
3990 |
+
return true;
|
3991 |
+
|
3992 |
+
return (bool) current_user_can( 'edit_others_posts' );
|
3993 |
+
}
|
3994 |
+
}
|
3995 |
+
|
3996 |
+
require 'rating.php';
|
3997 |
+
require 'polldaddy-org.php';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
polldaddy.pot
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
# Translation of the WordPress plugin PollDaddy Polls 1.
|
2 |
# Copyright (C) 2010 Automattic, Inc.
|
3 |
# This file is distributed under the same license as the PollDaddy Polls package.
|
4 |
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
@@ -6,9 +6,9 @@
|
|
6 |
#, fuzzy
|
7 |
msgid ""
|
8 |
msgstr ""
|
9 |
-
"Project-Id-Version: PollDaddy Polls 1.
|
10 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/polldaddy\n"
|
11 |
-
"POT-Creation-Date: 2010-
|
12 |
"PO-Revision-Date: 2010-MO-DA HO:MI+ZONE\n"
|
13 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
14 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
@@ -17,571 +17,614 @@ msgstr ""
|
|
17 |
"Content-Transfer-Encoding: 8bit\n"
|
18 |
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
|
19 |
|
20 |
-
#: polldaddy.php:
|
21 |
-
msgid "
|
22 |
msgstr ""
|
23 |
|
24 |
-
#: polldaddy.php:
|
25 |
-
|
26 |
-
msgid "Polls"
|
27 |
msgstr ""
|
28 |
|
29 |
-
#: polldaddy.php:
|
30 |
-
msgid "
|
31 |
msgstr ""
|
32 |
|
33 |
-
#: polldaddy.php:
|
34 |
-
msgid "
|
35 |
msgstr ""
|
36 |
|
37 |
-
#: polldaddy.php:
|
38 |
-
msgid "
|
|
|
39 |
msgstr ""
|
40 |
|
41 |
-
#: polldaddy.php:
|
42 |
-
msgid "
|
|
|
|
|
43 |
msgstr ""
|
44 |
|
45 |
-
#: polldaddy.php:
|
46 |
-
msgid "
|
|
|
|
|
47 |
msgstr ""
|
48 |
|
49 |
-
#: polldaddy.php:
|
50 |
-
msgid "
|
|
|
51 |
msgstr ""
|
52 |
|
53 |
-
#: polldaddy.php:
|
54 |
-
msgid "
|
55 |
msgstr ""
|
56 |
|
57 |
-
#: polldaddy.php:
|
58 |
-
|
|
|
|
|
|
|
59 |
msgstr ""
|
60 |
|
61 |
-
#: polldaddy.php:
|
62 |
-
msgid "
|
63 |
msgstr ""
|
64 |
|
65 |
-
#: polldaddy.php:
|
66 |
-
msgid "
|
67 |
msgstr ""
|
68 |
|
69 |
-
#: polldaddy.php:
|
70 |
-
msgid "
|
71 |
msgstr ""
|
72 |
|
73 |
-
#: polldaddy.php:
|
74 |
-
msgid "
|
|
|
|
|
75 |
msgstr ""
|
76 |
|
77 |
-
#: polldaddy.php:
|
78 |
-
msgid "
|
79 |
msgstr ""
|
80 |
|
81 |
-
#: polldaddy.php:
|
82 |
-
msgid ""
|
83 |
-
"Account could not be accessed. Are your email address and password correct?"
|
84 |
msgstr ""
|
85 |
|
86 |
-
#: polldaddy.php:
|
87 |
-
|
88 |
-
msgid ""
|
89 |
-
"Obsolete PollDaddy User API Key: <a href=\"%s\">Sign in again to re-"
|
90 |
-
"authenticate</a>"
|
91 |
msgstr ""
|
92 |
|
93 |
-
#: polldaddy.php:
|
94 |
-
msgid "
|
95 |
msgstr ""
|
96 |
|
97 |
-
#: polldaddy.php:
|
98 |
-
|
99 |
-
msgid ""
|
100 |
-
"Before you can use the PollDaddy plugin, you need to enter your <a href=\"%s"
|
101 |
-
"\">PollDaddy.com</a> account details."
|
102 |
msgstr ""
|
103 |
|
104 |
-
#: polldaddy.php:
|
105 |
-
|
|
|
106 |
msgstr ""
|
107 |
|
108 |
-
#: polldaddy.php:
|
109 |
-
msgid "
|
110 |
msgstr ""
|
111 |
|
112 |
-
#: polldaddy.php:
|
113 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
msgstr ""
|
115 |
|
116 |
-
#: polldaddy.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
msgid "Add Poll"
|
118 |
msgstr ""
|
119 |
|
120 |
-
#: polldaddy.php:
|
121 |
msgid "Star Colors"
|
122 |
msgstr ""
|
123 |
|
124 |
-
#: polldaddy.php:
|
125 |
msgid "Star Size"
|
126 |
msgstr ""
|
127 |
|
128 |
-
#: polldaddy.php:
|
129 |
msgid "Nero Type"
|
130 |
msgstr ""
|
131 |
|
132 |
-
#: polldaddy.php:
|
133 |
msgid "Nero Size"
|
134 |
msgstr ""
|
135 |
|
136 |
-
#: polldaddy.php:
|
137 |
msgid "You are not allowed to delete this poll."
|
138 |
msgstr ""
|
139 |
|
140 |
-
#: polldaddy.php:
|
141 |
msgid "Invalid Poll Author"
|
142 |
msgstr ""
|
143 |
|
144 |
-
#: polldaddy.php:
|
145 |
msgid "You are not allowed to open this poll."
|
146 |
msgstr ""
|
147 |
|
148 |
-
#: polldaddy.php:
|
149 |
msgid "You are not allowed to close this poll."
|
150 |
msgstr ""
|
151 |
|
152 |
-
#: polldaddy.php:
|
153 |
msgid "You are not allowed to edit this poll."
|
154 |
msgstr ""
|
155 |
|
156 |
-
#: polldaddy.php:
|
157 |
msgid "Poll not found"
|
158 |
msgstr ""
|
159 |
|
160 |
-
#: polldaddy.php:
|
161 |
msgid "Invalid answers"
|
162 |
msgstr ""
|
163 |
|
164 |
-
#: polldaddy.php:
|
165 |
msgid "You must include at least 2 answers"
|
166 |
msgstr ""
|
167 |
|
168 |
-
#: polldaddy.php:
|
169 |
msgid "Please choose a poll style"
|
170 |
msgstr ""
|
171 |
|
172 |
-
#: polldaddy.php:
|
173 |
msgid "Poll could not be updated"
|
174 |
msgstr ""
|
175 |
|
176 |
-
#: polldaddy.php:
|
177 |
msgid "Poll could not be created"
|
178 |
msgstr ""
|
179 |
|
180 |
-
#: polldaddy.php:
|
181 |
msgid "Style could not be updated"
|
182 |
msgstr ""
|
183 |
|
184 |
-
#: polldaddy.php:
|
185 |
msgid "Style could not be created"
|
186 |
msgstr ""
|
187 |
|
188 |
-
#: polldaddy.php:
|
189 |
msgid ""
|
190 |
"Account could not be imported. Are your email address and password correct?"
|
191 |
msgstr ""
|
192 |
|
193 |
-
#: polldaddy.php:
|
194 |
msgid "Poll deleted."
|
195 |
msgstr ""
|
196 |
|
197 |
-
#: polldaddy.php:
|
198 |
#, php-format
|
199 |
msgid "%s Poll Deleted."
|
200 |
msgid_plural "%s Polls Deleted."
|
201 |
msgstr[0] ""
|
202 |
msgstr[1] ""
|
203 |
|
204 |
-
#: polldaddy.php:
|
205 |
msgid "Poll opened."
|
206 |
msgstr ""
|
207 |
|
208 |
-
#: polldaddy.php:
|
209 |
#, php-format
|
210 |
msgid "%s Poll Opened."
|
211 |
msgid_plural "%s Polls Opened."
|
212 |
msgstr[0] ""
|
213 |
msgstr[1] ""
|
214 |
|
215 |
-
#: polldaddy.php:
|
216 |
msgid "Poll closed."
|
217 |
msgstr ""
|
218 |
|
219 |
-
#: polldaddy.php:
|
220 |
#, php-format
|
221 |
msgid "%s Poll Closed."
|
222 |
msgid_plural "%s Polls Closed."
|
223 |
msgstr[0] ""
|
224 |
msgstr[1] ""
|
225 |
|
226 |
-
#: polldaddy.php:
|
227 |
msgid "Poll updated."
|
228 |
msgstr ""
|
229 |
|
230 |
-
#: polldaddy.php:
|
231 |
msgid "Poll created."
|
232 |
msgstr ""
|
233 |
|
234 |
-
#: polldaddy.php:
|
235 |
msgid "Send to Editor"
|
236 |
msgstr ""
|
237 |
|
238 |
-
#: polldaddy.php:
|
239 |
msgid "Custom Style updated."
|
240 |
msgstr ""
|
241 |
|
242 |
-
#: polldaddy.php:
|
243 |
msgid "Custom Style created."
|
244 |
msgstr ""
|
245 |
|
246 |
-
#: polldaddy.php:
|
247 |
msgid "Custom Style deleted."
|
248 |
msgstr ""
|
249 |
|
250 |
-
#: polldaddy.php:
|
251 |
#, php-format
|
252 |
msgid "%s Style Deleted."
|
253 |
msgid_plural "%s Custom Styles Deleted."
|
254 |
msgstr[0] ""
|
255 |
msgstr[1] ""
|
256 |
|
257 |
-
#: polldaddy.php:
|
258 |
msgid "Account Imported."
|
259 |
msgstr ""
|
260 |
|
261 |
-
#: polldaddy.php:
|
262 |
msgid "Options Updated."
|
263 |
msgstr ""
|
264 |
|
265 |
-
#: polldaddy.php:
|
266 |
msgid "Error: An error has occurred; Poll not created."
|
267 |
msgstr ""
|
268 |
|
269 |
-
#: polldaddy.php:
|
270 |
msgid "Error: An error has occurred; Poll not updated."
|
271 |
msgstr ""
|
272 |
|
273 |
-
#: polldaddy.php:
|
274 |
msgid ""
|
275 |
"Error: An error has occurred; Account could not be imported. Perhaps your "
|
276 |
"email address or password is incorrect?"
|
277 |
msgstr ""
|
278 |
|
279 |
-
#: polldaddy.php:
|
280 |
msgid "Error: An error has occurred; Account could not be created."
|
281 |
msgstr ""
|
282 |
|
283 |
-
#: polldaddy.php:
|
284 |
#, php-format
|
285 |
msgid ""
|
286 |
"Poll Preview (<a href=\"%s\">Edit Poll</a>, <a href=\"%s\">List Polls</a>)"
|
287 |
msgstr ""
|
288 |
|
289 |
-
#: polldaddy.php:
|
290 |
#, php-format
|
291 |
msgid "Poll Preview (<a href=\"%s\">List Polls</a>)"
|
292 |
msgstr ""
|
293 |
|
294 |
-
#: polldaddy.php:
|
295 |
#, php-format
|
296 |
msgid "Poll Results (<a href=\"%s\">Edit Poll</a>)"
|
297 |
msgstr ""
|
298 |
|
299 |
-
#: polldaddy.php:
|
300 |
#, php-format
|
301 |
msgid "Poll Results (<a href=\"%s\">List Polls</a>)"
|
302 |
msgstr ""
|
303 |
|
304 |
-
#: polldaddy.php:
|
305 |
#, php-format
|
306 |
msgid "Edit Poll (<a href=\"%s\">List Polls</a>)"
|
307 |
msgstr ""
|
308 |
|
309 |
-
#: polldaddy.php:
|
310 |
#, php-format
|
311 |
msgid "Create Poll (<a href=\"%s\">List Polls</a>)"
|
312 |
msgstr ""
|
313 |
|
314 |
-
#: polldaddy.php:
|
315 |
#, php-format
|
316 |
msgid "Custom Styles (<a href=\"%s\">Add New</a>)"
|
317 |
msgstr ""
|
318 |
|
319 |
-
#: polldaddy.php:
|
320 |
#, php-format
|
321 |
msgid "Edit Style (<a href=\"%s\">List Styles</a>)"
|
322 |
msgstr ""
|
323 |
|
324 |
-
#: polldaddy.php:
|
325 |
#, php-format
|
326 |
msgid "Create Style (<a href=\"%s\">List Styles</a>)"
|
327 |
msgstr ""
|
328 |
|
329 |
-
#: polldaddy.php:
|
330 |
#, php-format
|
331 |
msgid "Polls (<a href=\"%s\">Add New</a>)"
|
332 |
msgstr ""
|
333 |
|
334 |
-
#: polldaddy.php:
|
335 |
msgid "All Blog's Polls"
|
336 |
msgstr ""
|
337 |
|
338 |
-
#: polldaddy.php:
|
339 |
msgid "All My Polls"
|
340 |
msgstr ""
|
341 |
|
342 |
-
#: polldaddy.php:
|
343 |
msgid "Actions"
|
344 |
msgstr ""
|
345 |
|
346 |
-
#: polldaddy.php:
|
347 |
msgid "Delete"
|
348 |
msgstr ""
|
349 |
|
350 |
-
#: polldaddy.php:
|
351 |
msgid "Close"
|
352 |
msgstr ""
|
353 |
|
354 |
-
#: polldaddy.php:
|
355 |
msgid "Open"
|
356 |
msgstr ""
|
357 |
|
358 |
-
#: polldaddy.php:
|
359 |
msgid "Apply"
|
360 |
msgstr ""
|
361 |
|
362 |
-
#: polldaddy.php:
|
363 |
msgid "Results"
|
364 |
msgstr ""
|
365 |
|
366 |
-
#: polldaddy.php:
|
367 |
msgid "Preview"
|
368 |
msgstr ""
|
369 |
|
370 |
-
#: polldaddy.php:
|
371 |
msgid "Send to editor"
|
372 |
msgstr ""
|
373 |
|
374 |
-
#: polldaddy.php:
|
375 |
msgid "HTML code"
|
376 |
msgstr ""
|
377 |
|
378 |
-
#: polldaddy.php:
|
379 |
msgid "Y/m/d g:i:s A"
|
380 |
msgstr ""
|
381 |
|
382 |
-
#: polldaddy.php:
|
383 |
msgid "Y/m/d"
|
384 |
msgstr ""
|
385 |
|
386 |
-
#: polldaddy.php:
|
387 |
msgid "Shortcode"
|
388 |
msgstr ""
|
389 |
|
390 |
-
#: polldaddy.php:
|
391 |
msgid "JavaScript"
|
392 |
msgstr ""
|
393 |
|
394 |
-
#: polldaddy.php:
|
395 |
#, php-format
|
396 |
msgid "What are you doing here? <a href=\"%s\">Go back</a>."
|
397 |
msgstr ""
|
398 |
|
399 |
-
#: polldaddy.php:
|
400 |
#, php-format
|
401 |
msgid "No polls yet. <a href=\"%s\">Create one</a>"
|
402 |
msgstr ""
|
403 |
|
404 |
-
#: polldaddy.php:
|
405 |
msgid "No polls yet."
|
406 |
msgstr ""
|
407 |
|
408 |
-
#: polldaddy.php:
|
409 |
msgid "Publish"
|
410 |
msgstr ""
|
411 |
|
412 |
-
#: polldaddy.php:
|
413 |
msgid "Save Poll"
|
414 |
msgstr ""
|
415 |
|
416 |
-
#: polldaddy.php:
|
417 |
msgid "Poll results"
|
418 |
msgstr ""
|
419 |
|
420 |
-
#: polldaddy.php:
|
421 |
msgid "Show results to voters"
|
422 |
msgstr ""
|
423 |
|
424 |
-
#: polldaddy.php:
|
425 |
msgid "Only show percentages"
|
426 |
msgstr ""
|
427 |
|
428 |
-
#: polldaddy.php:
|
429 |
msgid "Hide all results"
|
430 |
msgstr ""
|
431 |
|
432 |
-
#: polldaddy.php:
|
433 |
msgid "Block repeat voters"
|
434 |
msgstr ""
|
435 |
|
436 |
-
#: polldaddy.php:
|
437 |
msgid "Don't block repeat voters"
|
438 |
msgstr ""
|
439 |
|
440 |
-
#: polldaddy.php:
|
441 |
msgid "Block by cookie (recommended)"
|
442 |
msgstr ""
|
443 |
|
444 |
-
#: polldaddy.php:
|
445 |
msgid "Block by cookie and by IP address"
|
446 |
msgstr ""
|
447 |
|
448 |
-
#: polldaddy.php:
|
449 |
msgid "Expires: "
|
450 |
msgstr ""
|
451 |
|
452 |
-
#: polldaddy.php:
|
453 |
msgid "Never"
|
454 |
msgstr ""
|
455 |
|
456 |
-
#: polldaddy.php:
|
457 |
#, php-format
|
458 |
msgid "%d hour"
|
459 |
msgstr ""
|
460 |
|
461 |
-
#: polldaddy.php:
|
462 |
-
#: polldaddy.php:
|
463 |
#, php-format
|
464 |
msgid "%d hours"
|
465 |
msgstr ""
|
466 |
|
467 |
-
#: polldaddy.php:
|
468 |
#, php-format
|
469 |
msgid "%d day"
|
470 |
msgstr ""
|
471 |
|
472 |
-
#: polldaddy.php:
|
473 |
#, php-format
|
474 |
msgid "%d week"
|
475 |
msgstr ""
|
476 |
|
477 |
-
#: polldaddy.php:
|
478 |
#, php-format
|
479 |
msgid "%d month"
|
480 |
msgstr ""
|
481 |
|
482 |
-
#: polldaddy.php:
|
483 |
msgid ""
|
484 |
"Note: Blocking by cookie and IP address can be problematic for some voters."
|
485 |
msgstr ""
|
486 |
|
487 |
-
#: polldaddy.php:
|
488 |
msgid "Answers"
|
489 |
msgstr ""
|
490 |
|
491 |
-
#: polldaddy.php:
|
492 |
msgid "Add another"
|
493 |
msgstr ""
|
494 |
|
495 |
-
#: polldaddy.php:
|
496 |
msgid "Multiple choice"
|
497 |
msgstr ""
|
498 |
|
499 |
-
#: polldaddy.php:
|
500 |
msgid "Randomize answer order"
|
501 |
msgstr ""
|
502 |
|
503 |
-
#: polldaddy.php:
|
504 |
msgid "Allow other answers"
|
505 |
msgstr ""
|
506 |
|
507 |
-
#: polldaddy.php:
|
508 |
msgid "'Share This' link"
|
509 |
msgstr ""
|
510 |
|
511 |
-
#: polldaddy.php:
|
512 |
msgid "Design"
|
513 |
msgstr ""
|
514 |
|
515 |
-
#: polldaddy.php:
|
516 |
msgid "Custom Style"
|
517 |
msgstr ""
|
518 |
|
519 |
-
#: polldaddy.php:
|
520 |
msgid "Please choose a custom style..."
|
521 |
msgstr ""
|
522 |
|
523 |
-
#: polldaddy.php:
|
524 |
msgid "Please choose a style."
|
525 |
msgstr ""
|
526 |
|
527 |
-
#: polldaddy.php:
|
528 |
#, php-format
|
529 |
msgid ""
|
530 |
"Did you know we have a new editor for building your own custom poll styles? "
|
531 |
"Find out more <a href=\"%s\" target=\"_blank\">here</a>."
|
532 |
msgstr ""
|
533 |
|
534 |
-
#: polldaddy.php:
|
535 |
msgid "PollDaddy Style"
|
536 |
msgstr ""
|
537 |
|
538 |
-
#: polldaddy.php:
|
539 |
msgid "Answer"
|
540 |
msgstr ""
|
541 |
|
542 |
-
#: polldaddy.php:
|
543 |
msgid "Votes"
|
544 |
msgstr ""
|
545 |
|
546 |
-
#: polldaddy.php:
|
547 |
#, php-format
|
548 |
msgid "Other (<a href=\"%s\">see below</a>)"
|
549 |
msgstr ""
|
550 |
|
551 |
-
#: polldaddy.php:
|
552 |
msgid "Other Answer"
|
553 |
msgstr ""
|
554 |
|
555 |
-
#: polldaddy.php:
|
556 |
msgid "Style"
|
557 |
msgstr ""
|
558 |
|
559 |
-
#: polldaddy.php:
|
560 |
msgid "Last Modified"
|
561 |
msgstr ""
|
562 |
|
563 |
-
#: polldaddy.php:
|
564 |
#, php-format
|
565 |
msgid "No custom styles yet. <a href=\"%s\">Create one</a>"
|
566 |
msgstr ""
|
567 |
|
568 |
-
#: polldaddy.php:
|
569 |
msgid "Style Name"
|
570 |
msgstr ""
|
571 |
|
572 |
-
#: polldaddy.php:
|
573 |
msgid "Preload Basic Style"
|
574 |
msgstr ""
|
575 |
|
576 |
-
#: polldaddy.php:
|
577 |
msgid "Load Style"
|
578 |
msgstr ""
|
579 |
|
580 |
-
#: polldaddy.php:
|
581 |
msgid "Save Style"
|
582 |
msgstr ""
|
583 |
|
584 |
-
#: polldaddy.php:
|
585 |
#, php-format
|
586 |
msgid ""
|
587 |
"Sorry! There was an error creating your rating widget. Please contact <a "
|
@@ -592,363 +635,367 @@ msgstr ""
|
|
592 |
msgid "Rating Settings"
|
593 |
msgstr ""
|
594 |
|
595 |
-
#: polldaddy.php:
|
596 |
msgid "Rating updated"
|
597 |
msgstr ""
|
598 |
|
599 |
-
#: polldaddy.php:
|
600 |
msgid "Posts"
|
601 |
msgstr ""
|
602 |
|
603 |
-
#: polldaddy.php:
|
604 |
msgid "Pages"
|
605 |
msgstr ""
|
606 |
|
607 |
-
#: polldaddy.php:
|
608 |
msgid "Comments"
|
609 |
msgstr ""
|
610 |
|
611 |
-
#: polldaddy.php:
|
612 |
msgid "Enable for blog posts"
|
613 |
msgstr ""
|
614 |
|
615 |
-
#: polldaddy.php:
|
616 |
msgid "Above each blog post"
|
617 |
msgstr ""
|
618 |
|
619 |
-
#: polldaddy.php:
|
620 |
msgid "Below each blog post"
|
621 |
msgstr ""
|
622 |
|
623 |
-
#: polldaddy.php:
|
|
|
|
|
|
|
|
|
624 |
msgid "Enable for pages"
|
625 |
msgstr ""
|
626 |
|
627 |
-
#: polldaddy.php:
|
628 |
msgid "Above each page"
|
629 |
msgstr ""
|
630 |
|
631 |
-
#: polldaddy.php:
|
632 |
msgid "Below each page"
|
633 |
msgstr ""
|
634 |
|
635 |
-
#: polldaddy.php:
|
636 |
msgid "Enable for comments"
|
637 |
msgstr ""
|
638 |
|
639 |
-
#: polldaddy.php:
|
640 |
msgid "Above each comment"
|
641 |
msgstr ""
|
642 |
|
643 |
-
#: polldaddy.php:
|
644 |
msgid "Below each comment"
|
645 |
msgstr ""
|
646 |
|
647 |
-
#: polldaddy.php:
|
648 |
msgid "Save Changes"
|
649 |
msgstr ""
|
650 |
|
651 |
-
#: polldaddy.php:
|
652 |
msgid "Advanced Settings"
|
653 |
msgstr ""
|
654 |
|
655 |
-
#: polldaddy.php:
|
656 |
msgid "Save"
|
657 |
msgstr ""
|
658 |
|
659 |
-
#: polldaddy.php:
|
660 |
msgid "This is a demo of what your rating widget will look like"
|
661 |
msgstr ""
|
662 |
|
663 |
-
#: polldaddy.php:
|
664 |
msgid "Customize Labels"
|
665 |
msgstr ""
|
666 |
|
667 |
-
#: polldaddy.php:
|
668 |
msgid "votes"
|
669 |
msgstr ""
|
670 |
|
671 |
-
#: polldaddy.php:
|
672 |
msgid "rate this"
|
673 |
msgstr ""
|
674 |
|
675 |
-
#: polldaddy.php:
|
676 |
#, php-format
|
677 |
msgid "%d star"
|
678 |
msgstr ""
|
679 |
|
680 |
-
#: polldaddy.php:
|
681 |
#, php-format
|
682 |
msgid "%d stars"
|
683 |
msgstr ""
|
684 |
|
685 |
-
#: polldaddy.php:
|
686 |
msgid "Thank You"
|
687 |
msgstr ""
|
688 |
|
689 |
-
#: polldaddy.php:
|
690 |
msgid "Rate Up"
|
691 |
msgstr ""
|
692 |
|
693 |
-
#: polldaddy.php:
|
694 |
msgid "Rate Down"
|
695 |
msgstr ""
|
696 |
|
697 |
-
#: polldaddy.php:
|
698 |
msgid "Rating Type"
|
699 |
msgstr ""
|
700 |
|
701 |
-
#: polldaddy.php:
|
702 |
msgid ""
|
703 |
"Here you can choose how you want your rating to display. The 5 star rating "
|
704 |
"is the most commonly used. The Nero rating is useful for keeping it simple."
|
705 |
msgstr ""
|
706 |
|
707 |
-
#: polldaddy.php:
|
708 |
#, php-format
|
709 |
msgid "%d Star Rating"
|
710 |
msgstr ""
|
711 |
|
712 |
-
#: polldaddy.php:
|
713 |
msgid "Nero Rating"
|
714 |
msgstr ""
|
715 |
|
716 |
-
#: polldaddy.php:
|
717 |
msgid "Rating Style"
|
718 |
msgstr ""
|
719 |
|
720 |
-
#: polldaddy.php:
|
721 |
msgid "Small"
|
722 |
msgstr ""
|
723 |
|
724 |
-
#: polldaddy.php:
|
725 |
msgid "Medium"
|
726 |
msgstr ""
|
727 |
|
728 |
-
#: polldaddy.php:
|
729 |
msgid "Large"
|
730 |
msgstr ""
|
731 |
|
732 |
-
#: polldaddy.php:
|
733 |
msgid "Star Color"
|
734 |
msgstr ""
|
735 |
|
736 |
-
#: polldaddy.php:
|
737 |
msgid "Yellow"
|
738 |
msgstr ""
|
739 |
|
740 |
-
#: polldaddy.php:
|
741 |
msgid "Red"
|
742 |
msgstr ""
|
743 |
|
744 |
-
#: polldaddy.php:
|
745 |
msgid "Blue"
|
746 |
msgstr ""
|
747 |
|
748 |
-
#: polldaddy.php:
|
749 |
msgid "Green"
|
750 |
msgstr ""
|
751 |
|
752 |
-
#: polldaddy.php:
|
753 |
msgid "Grey"
|
754 |
msgstr ""
|
755 |
|
756 |
-
#: polldaddy.php:
|
757 |
msgid "Hand"
|
758 |
msgstr ""
|
759 |
|
760 |
-
#: polldaddy.php:
|
761 |
msgid "Custom Image"
|
762 |
msgstr ""
|
763 |
|
764 |
-
#: polldaddy.php:
|
765 |
msgid "Text Layout & Font"
|
766 |
msgstr ""
|
767 |
|
768 |
-
#: polldaddy.php:
|
769 |
msgid "Align"
|
770 |
msgstr ""
|
771 |
|
772 |
-
#: polldaddy.php:
|
773 |
msgid "Left"
|
774 |
msgstr ""
|
775 |
|
776 |
-
#: polldaddy.php:
|
777 |
msgid "Center"
|
778 |
msgstr ""
|
779 |
|
780 |
-
#: polldaddy.php:
|
781 |
msgid "Right"
|
782 |
msgstr ""
|
783 |
|
784 |
-
#: polldaddy.php:
|
785 |
msgid "Position"
|
786 |
msgstr ""
|
787 |
|
788 |
-
#: polldaddy.php:
|
789 |
msgid "Top"
|
790 |
msgstr ""
|
791 |
|
792 |
-
#: polldaddy.php:
|
793 |
msgid "Bottom"
|
794 |
msgstr ""
|
795 |
|
796 |
-
#: polldaddy.php:
|
797 |
msgid "Font"
|
798 |
msgstr ""
|
799 |
|
800 |
-
#: polldaddy.php:
|
801 |
-
msgid "
|
802 |
msgstr ""
|
803 |
|
804 |
-
#: polldaddy.php:
|
805 |
-
msgid "
|
806 |
msgstr ""
|
807 |
|
808 |
-
#: polldaddy.php:
|
809 |
-
msgid "
|
810 |
msgstr ""
|
811 |
|
812 |
-
#: polldaddy.php:
|
813 |
msgid "Line Height"
|
814 |
msgstr ""
|
815 |
|
816 |
-
#: polldaddy.php:
|
817 |
msgid "Bold"
|
818 |
msgstr ""
|
819 |
|
820 |
-
#: polldaddy.php:
|
821 |
msgid "Italic"
|
822 |
msgstr ""
|
823 |
|
824 |
-
#: polldaddy.php:
|
825 |
msgid "«"
|
826 |
msgstr ""
|
827 |
|
828 |
-
#: polldaddy.php:
|
829 |
msgid "»"
|
830 |
msgstr ""
|
831 |
|
832 |
-
#: polldaddy.php:
|
833 |
msgid "Rating Reports"
|
834 |
msgstr ""
|
835 |
|
836 |
-
#: polldaddy.php:
|
837 |
msgid "View Report"
|
838 |
msgstr ""
|
839 |
|
840 |
-
#: polldaddy.php:
|
841 |
msgid "Last 24 hours"
|
842 |
msgstr ""
|
843 |
|
844 |
-
#: polldaddy.php:
|
845 |
msgid "Last 7 days"
|
846 |
msgstr ""
|
847 |
|
848 |
-
#: polldaddy.php:
|
849 |
msgid "Last 31 days"
|
850 |
msgstr ""
|
851 |
|
852 |
-
#: polldaddy.php:
|
853 |
msgid "Last 3 months"
|
854 |
msgstr ""
|
855 |
|
856 |
-
#: polldaddy.php:
|
857 |
msgid "Last 12 months"
|
858 |
msgstr ""
|
859 |
|
860 |
-
#: polldaddy.php:
|
861 |
msgid "All time"
|
862 |
msgstr ""
|
863 |
|
864 |
-
#: polldaddy.php:
|
865 |
msgid "Filter Report"
|
866 |
msgstr ""
|
867 |
|
868 |
-
#: polldaddy.php:
|
869 |
#, php-format
|
870 |
msgid "No ratings have been collected for your %s yet."
|
871 |
msgstr ""
|
872 |
|
873 |
-
#: polldaddy.php:
|
874 |
msgid "Start Date"
|
875 |
msgstr ""
|
876 |
|
877 |
-
#: polldaddy.php:
|
878 |
msgid "Title"
|
879 |
msgstr ""
|
880 |
|
881 |
-
#: polldaddy.php:
|
882 |
msgid "Average Rating"
|
883 |
msgstr ""
|
884 |
|
885 |
-
#: polldaddy.php:
|
886 |
msgid "PollDaddy Account Info"
|
887 |
msgstr ""
|
888 |
|
889 |
-
#: polldaddy.php:
|
890 |
msgid ""
|
891 |
"This is the PollDadddy account you currently have imported into your "
|
892 |
"WordPress account"
|
893 |
msgstr ""
|
894 |
|
895 |
-
#: polldaddy.php:
|
896 |
msgid "Import Account"
|
897 |
msgstr ""
|
898 |
|
899 |
-
#: polldaddy.php:
|
900 |
msgid "General Settings"
|
901 |
msgstr ""
|
902 |
|
903 |
-
#: polldaddy.php:
|
904 |
msgid "Default poll settings"
|
905 |
msgstr ""
|
906 |
|
907 |
-
#: polldaddy.php:
|
908 |
msgid "Multiple Choice"
|
909 |
msgstr ""
|
910 |
|
911 |
-
#: polldaddy.php:
|
912 |
msgid "Randomise Answers"
|
913 |
msgstr ""
|
914 |
|
915 |
-
#: polldaddy.php:
|
916 |
msgid "Sharing"
|
917 |
msgstr ""
|
918 |
|
919 |
-
#: polldaddy.php:
|
920 |
msgid "Show"
|
921 |
msgstr ""
|
922 |
|
923 |
-
#: polldaddy.php:
|
924 |
msgid "Hide"
|
925 |
msgstr ""
|
926 |
|
927 |
-
#: polldaddy.php:
|
928 |
msgid "Percentages"
|
929 |
msgstr ""
|
930 |
|
931 |
-
#: polldaddy.php:
|
932 |
msgid "Poll style"
|
933 |
msgstr ""
|
934 |
|
935 |
-
#: polldaddy.php:
|
936 |
msgid "Off"
|
937 |
msgstr ""
|
938 |
|
939 |
-
#: polldaddy.php:
|
940 |
msgid "Cookie"
|
941 |
msgstr ""
|
942 |
|
943 |
-
#: polldaddy.php:
|
944 |
msgid "Cookie & IP address"
|
945 |
msgstr ""
|
946 |
|
947 |
-
#: polldaddy.php:
|
948 |
msgid "Block expiration limit"
|
949 |
msgstr ""
|
950 |
|
951 |
-
#: polldaddy.php:
|
952 |
msgid "Save Options"
|
953 |
msgstr ""
|
954 |
|
1 |
+
# Translation of the WordPress plugin PollDaddy Polls 1.8.0 by Automattic, Inc..
|
2 |
# Copyright (C) 2010 Automattic, Inc.
|
3 |
# This file is distributed under the same license as the PollDaddy Polls package.
|
4 |
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
6 |
#, fuzzy
|
7 |
msgid ""
|
8 |
msgstr ""
|
9 |
+
"Project-Id-Version: PollDaddy Polls 1.8.0\n"
|
10 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/polldaddy\n"
|
11 |
+
"POT-Creation-Date: 2010-02-02 18:21+0000\n"
|
12 |
"PO-Revision-Date: 2010-MO-DA HO:MI+ZONE\n"
|
13 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
14 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
17 |
"Content-Transfer-Encoding: 8bit\n"
|
18 |
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
|
19 |
|
20 |
+
#: polldaddy-org.php:98 polldaddy.php:128 polldaddy.php:892
|
21 |
+
msgid "Email address required"
|
22 |
msgstr ""
|
23 |
|
24 |
+
#: polldaddy-org.php:101 polldaddy.php:131 polldaddy.php:895
|
25 |
+
msgid "Password required"
|
|
|
26 |
msgstr ""
|
27 |
|
28 |
+
#: polldaddy-org.php:133
|
29 |
+
msgid "Could not connect to PollDaddy API Key service"
|
30 |
msgstr ""
|
31 |
|
32 |
+
#: polldaddy-org.php:147 polldaddy.php:161
|
33 |
+
msgid "Can't connect to PollDaddy.com"
|
34 |
msgstr ""
|
35 |
|
36 |
+
#: polldaddy-org.php:177
|
37 |
+
msgid ""
|
38 |
+
"Login to PollDaddy failed. Double check your email address and password."
|
39 |
msgstr ""
|
40 |
|
41 |
+
#: polldaddy-org.php:179
|
42 |
+
msgid ""
|
43 |
+
"If your email address and password are correct, your host may not support "
|
44 |
+
"secure logins."
|
45 |
msgstr ""
|
46 |
|
47 |
+
#: polldaddy-org.php:180
|
48 |
+
msgid ""
|
49 |
+
"In that case, you may be able to log in to PollDaddy by unchecking the \"Use "
|
50 |
+
"SSL to Log in\" checkbox."
|
51 |
msgstr ""
|
52 |
|
53 |
+
#: polldaddy-org.php:191 polldaddy.php:198
|
54 |
+
msgid ""
|
55 |
+
"Account could not be accessed. Are your email address and password correct?"
|
56 |
msgstr ""
|
57 |
|
58 |
+
#: polldaddy-org.php:205 polldaddy.php:249
|
59 |
+
msgid "PollDaddy Account"
|
60 |
msgstr ""
|
61 |
|
62 |
+
#: polldaddy-org.php:207 polldaddy.php:251
|
63 |
+
#, php-format
|
64 |
+
msgid ""
|
65 |
+
"Before you can use the PollDaddy plugin, you need to enter your <a href=\"%s"
|
66 |
+
"\">PollDaddy.com</a> account details."
|
67 |
msgstr ""
|
68 |
|
69 |
+
#: polldaddy-org.php:214 polldaddy.php:258 polldaddy.php:3857
|
70 |
+
msgid "PollDaddy Email Address"
|
71 |
msgstr ""
|
72 |
|
73 |
+
#: polldaddy-org.php:222 polldaddy.php:266 polldaddy.php:3867
|
74 |
+
msgid "PollDaddy Password"
|
75 |
msgstr ""
|
76 |
|
77 |
+
#: polldaddy-org.php:235
|
78 |
+
msgid "Use SSL to Log in"
|
79 |
msgstr ""
|
80 |
|
81 |
+
#: polldaddy-org.php:239
|
82 |
+
msgid ""
|
83 |
+
"This ensures a secure login to your PollDaddy account. Only uncheck if you "
|
84 |
+
"are having problems logging in."
|
85 |
msgstr ""
|
86 |
|
87 |
+
#: polldaddy-org.php:249 polldaddy.php:278
|
88 |
+
msgid "Submit"
|
89 |
msgstr ""
|
90 |
|
91 |
+
#: polldaddy-org.php:265
|
92 |
+
msgid "Multiple PollDaddy Accounts"
|
|
|
93 |
msgstr ""
|
94 |
|
95 |
+
#: polldaddy-org.php:271
|
96 |
+
msgid "This setting will allow each blog user to import a PollDaddy account."
|
|
|
|
|
|
|
97 |
msgstr ""
|
98 |
|
99 |
+
#: polldaddy-org.php:514
|
100 |
+
msgid "How many items would you like to display?"
|
101 |
msgstr ""
|
102 |
|
103 |
+
#: polldaddy.php:68 polldaddy.php:70 polldaddy.php:86 polldaddy.php:88
|
104 |
+
msgid "Ratings"
|
|
|
|
|
|
|
105 |
msgstr ""
|
106 |
|
107 |
+
#: polldaddy.php:75 polldaddy.php:77 polldaddy.php:93 polldaddy.php:95
|
108 |
+
#: polldaddy.php:107 polldaddy.php:1101
|
109 |
+
msgid "Polls"
|
110 |
msgstr ""
|
111 |
|
112 |
+
#: polldaddy.php:100
|
113 |
+
msgid "Ratings – Settings"
|
114 |
msgstr ""
|
115 |
|
116 |
+
#: polldaddy.php:100
|
117 |
+
msgid "Settings"
|
118 |
+
msgstr ""
|
119 |
+
|
120 |
+
#: polldaddy.php:101 polldaddy.php:104
|
121 |
+
msgid "Ratings – Reports"
|
122 |
+
msgstr ""
|
123 |
+
|
124 |
+
#: polldaddy.php:101 polldaddy.php:104
|
125 |
+
msgid "Reports"
|
126 |
+
msgstr ""
|
127 |
+
|
128 |
+
#: polldaddy.php:107 polldaddy.php:1233 polldaddy.php:2010
|
129 |
+
msgid "Edit"
|
130 |
+
msgstr ""
|
131 |
+
|
132 |
+
#: polldaddy.php:110
|
133 |
+
msgid "Add New Poll"
|
134 |
+
msgstr ""
|
135 |
+
|
136 |
+
#: polldaddy.php:110
|
137 |
+
msgid "Add New"
|
138 |
+
msgstr ""
|
139 |
+
|
140 |
+
#: polldaddy.php:111 polldaddy.php:1066 polldaddy.php:1739
|
141 |
+
msgid "Custom Styles"
|
142 |
msgstr ""
|
143 |
|
144 |
+
#: polldaddy.php:112 polldaddy.php:3842
|
145 |
+
msgid "Options"
|
146 |
+
msgstr ""
|
147 |
+
|
148 |
+
#: polldaddy.php:188
|
149 |
+
msgid "Invalid Account"
|
150 |
+
msgstr ""
|
151 |
+
|
152 |
+
#: polldaddy.php:210
|
153 |
+
#, php-format
|
154 |
+
msgid ""
|
155 |
+
"Obsolete PollDaddy User API Key: <a href=\"%s\">Sign in again to re-"
|
156 |
+
"authenticate</a>"
|
157 |
+
msgstr ""
|
158 |
+
|
159 |
+
#: polldaddy.php:287
|
160 |
msgid "Add Poll"
|
161 |
msgstr ""
|
162 |
|
163 |
+
#: polldaddy.php:358
|
164 |
msgid "Star Colors"
|
165 |
msgstr ""
|
166 |
|
167 |
+
#: polldaddy.php:358 polldaddy.php:3329
|
168 |
msgid "Star Size"
|
169 |
msgstr ""
|
170 |
|
171 |
+
#: polldaddy.php:359
|
172 |
msgid "Nero Type"
|
173 |
msgstr ""
|
174 |
|
175 |
+
#: polldaddy.php:359
|
176 |
msgid "Nero Size"
|
177 |
msgstr ""
|
178 |
|
179 |
+
#: polldaddy.php:452
|
180 |
msgid "You are not allowed to delete this poll."
|
181 |
msgstr ""
|
182 |
|
183 |
+
#: polldaddy.php:460 polldaddy.php:496 polldaddy.php:532 polldaddy.php:566
|
184 |
msgid "Invalid Poll Author"
|
185 |
msgstr ""
|
186 |
|
187 |
+
#: polldaddy.php:488
|
188 |
msgid "You are not allowed to open this poll."
|
189 |
msgstr ""
|
190 |
|
191 |
+
#: polldaddy.php:524
|
192 |
msgid "You are not allowed to close this poll."
|
193 |
msgstr ""
|
194 |
|
195 |
+
#: polldaddy.php:557 polldaddy.php:1329
|
196 |
msgid "You are not allowed to edit this poll."
|
197 |
msgstr ""
|
198 |
|
199 |
+
#: polldaddy.php:573
|
200 |
msgid "Poll not found"
|
201 |
msgstr ""
|
202 |
|
203 |
+
#: polldaddy.php:600
|
204 |
msgid "Invalid answers"
|
205 |
msgstr ""
|
206 |
|
207 |
+
#: polldaddy.php:616
|
208 |
msgid "You must include at least 2 answers"
|
209 |
msgstr ""
|
210 |
|
211 |
+
#: polldaddy.php:627 polldaddy.php:704
|
212 |
msgid "Please choose a poll style"
|
213 |
msgstr ""
|
214 |
|
215 |
+
#: polldaddy.php:649
|
216 |
msgid "Poll could not be updated"
|
217 |
msgstr ""
|
218 |
|
219 |
+
#: polldaddy.php:723
|
220 |
msgid "Poll could not be created"
|
221 |
msgstr ""
|
222 |
|
223 |
+
#: polldaddy.php:775
|
224 |
msgid "Style could not be updated"
|
225 |
msgstr ""
|
226 |
|
227 |
+
#: polldaddy.php:805
|
228 |
msgid "Style could not be created"
|
229 |
msgstr ""
|
230 |
|
231 |
+
#: polldaddy.php:904
|
232 |
msgid ""
|
233 |
"Account could not be imported. Are your email address and password correct?"
|
234 |
msgstr ""
|
235 |
|
236 |
+
#: polldaddy.php:922
|
237 |
msgid "Poll deleted."
|
238 |
msgstr ""
|
239 |
|
240 |
+
#: polldaddy.php:924
|
241 |
#, php-format
|
242 |
msgid "%s Poll Deleted."
|
243 |
msgid_plural "%s Polls Deleted."
|
244 |
msgstr[0] ""
|
245 |
msgstr[1] ""
|
246 |
|
247 |
+
#: polldaddy.php:929
|
248 |
msgid "Poll opened."
|
249 |
msgstr ""
|
250 |
|
251 |
+
#: polldaddy.php:931
|
252 |
#, php-format
|
253 |
msgid "%s Poll Opened."
|
254 |
msgid_plural "%s Polls Opened."
|
255 |
msgstr[0] ""
|
256 |
msgstr[1] ""
|
257 |
|
258 |
+
#: polldaddy.php:936
|
259 |
msgid "Poll closed."
|
260 |
msgstr ""
|
261 |
|
262 |
+
#: polldaddy.php:938
|
263 |
#, php-format
|
264 |
msgid "%s Poll Closed."
|
265 |
msgid_plural "%s Polls Closed."
|
266 |
msgstr[0] ""
|
267 |
msgstr[1] ""
|
268 |
|
269 |
+
#: polldaddy.php:941
|
270 |
msgid "Poll updated."
|
271 |
msgstr ""
|
272 |
|
273 |
+
#: polldaddy.php:944
|
274 |
msgid "Poll created."
|
275 |
msgstr ""
|
276 |
|
277 |
+
#: polldaddy.php:946 polldaddy.php:1362
|
278 |
msgid "Send to Editor"
|
279 |
msgstr ""
|
280 |
|
281 |
+
#: polldaddy.php:949
|
282 |
msgid "Custom Style updated."
|
283 |
msgstr ""
|
284 |
|
285 |
+
#: polldaddy.php:952
|
286 |
msgid "Custom Style created."
|
287 |
msgstr ""
|
288 |
|
289 |
+
#: polldaddy.php:957
|
290 |
msgid "Custom Style deleted."
|
291 |
msgstr ""
|
292 |
|
293 |
+
#: polldaddy.php:959
|
294 |
#, php-format
|
295 |
msgid "%s Style Deleted."
|
296 |
msgid_plural "%s Custom Styles Deleted."
|
297 |
msgstr[0] ""
|
298 |
msgstr[1] ""
|
299 |
|
300 |
+
#: polldaddy.php:962
|
301 |
msgid "Account Imported."
|
302 |
msgstr ""
|
303 |
|
304 |
+
#: polldaddy.php:965
|
305 |
msgid "Options Updated."
|
306 |
msgstr ""
|
307 |
|
308 |
+
#: polldaddy.php:974
|
309 |
msgid "Error: An error has occurred; Poll not created."
|
310 |
msgstr ""
|
311 |
|
312 |
+
#: polldaddy.php:977
|
313 |
msgid "Error: An error has occurred; Poll not updated."
|
314 |
msgstr ""
|
315 |
|
316 |
+
#: polldaddy.php:981
|
317 |
msgid ""
|
318 |
"Error: An error has occurred; Account could not be imported. Perhaps your "
|
319 |
"email address or password is incorrect?"
|
320 |
msgstr ""
|
321 |
|
322 |
+
#: polldaddy.php:983
|
323 |
msgid "Error: An error has occurred; Account could not be created."
|
324 |
msgstr ""
|
325 |
|
326 |
+
#: polldaddy.php:1020
|
327 |
#, php-format
|
328 |
msgid ""
|
329 |
"Poll Preview (<a href=\"%s\">Edit Poll</a>, <a href=\"%s\">List Polls</a>)"
|
330 |
msgstr ""
|
331 |
|
332 |
+
#: polldaddy.php:1024
|
333 |
#, php-format
|
334 |
msgid "Poll Preview (<a href=\"%s\">List Polls</a>)"
|
335 |
msgstr ""
|
336 |
|
337 |
+
#: polldaddy.php:1034
|
338 |
#, php-format
|
339 |
msgid "Poll Results (<a href=\"%s\">Edit Poll</a>)"
|
340 |
msgstr ""
|
341 |
|
342 |
+
#: polldaddy.php:1036
|
343 |
#, php-format
|
344 |
msgid "Poll Results (<a href=\"%s\">List Polls</a>)"
|
345 |
msgstr ""
|
346 |
|
347 |
+
#: polldaddy.php:1045
|
348 |
#, php-format
|
349 |
msgid "Edit Poll (<a href=\"%s\">List Polls</a>)"
|
350 |
msgstr ""
|
351 |
|
352 |
+
#: polldaddy.php:1054
|
353 |
#, php-format
|
354 |
msgid "Create Poll (<a href=\"%s\">List Polls</a>)"
|
355 |
msgstr ""
|
356 |
|
357 |
+
#: polldaddy.php:1064
|
358 |
#, php-format
|
359 |
msgid "Custom Styles (<a href=\"%s\">Add New</a>)"
|
360 |
msgstr ""
|
361 |
|
362 |
+
#: polldaddy.php:1074
|
363 |
#, php-format
|
364 |
msgid "Edit Style (<a href=\"%s\">List Styles</a>)"
|
365 |
msgstr ""
|
366 |
|
367 |
+
#: polldaddy.php:1083
|
368 |
#, php-format
|
369 |
msgid "Create Style (<a href=\"%s\">List Styles</a>)"
|
370 |
msgstr ""
|
371 |
|
372 |
+
#: polldaddy.php:1099
|
373 |
#, php-format
|
374 |
msgid "Polls (<a href=\"%s\">Add New</a>)"
|
375 |
msgstr ""
|
376 |
|
377 |
+
#: polldaddy.php:1164
|
378 |
msgid "All Blog's Polls"
|
379 |
msgstr ""
|
380 |
|
381 |
+
#: polldaddy.php:1165
|
382 |
msgid "All My Polls"
|
383 |
msgstr ""
|
384 |
|
385 |
+
#: polldaddy.php:1173 polldaddy.php:1973
|
386 |
msgid "Actions"
|
387 |
msgstr ""
|
388 |
|
389 |
+
#: polldaddy.php:1174 polldaddy.php:1239 polldaddy.php:1974 polldaddy.php:2015
|
390 |
msgid "Delete"
|
391 |
msgstr ""
|
392 |
|
393 |
+
#: polldaddy.php:1175 polldaddy.php:1246
|
394 |
msgid "Close"
|
395 |
msgstr ""
|
396 |
|
397 |
+
#: polldaddy.php:1176 polldaddy.php:1243
|
398 |
msgid "Open"
|
399 |
msgstr ""
|
400 |
|
401 |
+
#: polldaddy.php:1178 polldaddy.php:1976
|
402 |
msgid "Apply"
|
403 |
msgstr ""
|
404 |
|
405 |
+
#: polldaddy.php:1237
|
406 |
msgid "Results"
|
407 |
msgstr ""
|
408 |
|
409 |
+
#: polldaddy.php:1249 polldaddy.php:1255 polldaddy.php:3241
|
410 |
msgid "Preview"
|
411 |
msgstr ""
|
412 |
|
413 |
+
#: polldaddy.php:1251
|
414 |
msgid "Send to editor"
|
415 |
msgstr ""
|
416 |
|
417 |
+
#: polldaddy.php:1257
|
418 |
msgid "HTML code"
|
419 |
msgstr ""
|
420 |
|
421 |
+
#: polldaddy.php:1261 polldaddy.php:2017
|
422 |
msgid "Y/m/d g:i:s A"
|
423 |
msgstr ""
|
424 |
|
425 |
+
#: polldaddy.php:1261 polldaddy.php:2017
|
426 |
msgid "Y/m/d"
|
427 |
msgstr ""
|
428 |
|
429 |
+
#: polldaddy.php:1265
|
430 |
msgid "Shortcode"
|
431 |
msgstr ""
|
432 |
|
433 |
+
#: polldaddy.php:1268
|
434 |
msgid "JavaScript"
|
435 |
msgstr ""
|
436 |
|
437 |
+
#: polldaddy.php:1284
|
438 |
#, php-format
|
439 |
msgid "What are you doing here? <a href=\"%s\">Go back</a>."
|
440 |
msgstr ""
|
441 |
|
442 |
+
#: polldaddy.php:1294
|
443 |
#, php-format
|
444 |
msgid "No polls yet. <a href=\"%s\">Create one</a>"
|
445 |
msgstr ""
|
446 |
|
447 |
+
#: polldaddy.php:1296
|
448 |
msgid "No polls yet."
|
449 |
msgstr ""
|
450 |
|
451 |
+
#: polldaddy.php:1351
|
452 |
msgid "Publish"
|
453 |
msgstr ""
|
454 |
|
455 |
+
#: polldaddy.php:1358
|
456 |
msgid "Save Poll"
|
457 |
msgstr ""
|
458 |
|
459 |
+
#: polldaddy.php:1373 polldaddy.php:3925
|
460 |
msgid "Poll results"
|
461 |
msgstr ""
|
462 |
|
463 |
+
#: polldaddy.php:1378
|
464 |
msgid "Show results to voters"
|
465 |
msgstr ""
|
466 |
|
467 |
+
#: polldaddy.php:1378
|
468 |
msgid "Only show percentages"
|
469 |
msgstr ""
|
470 |
|
471 |
+
#: polldaddy.php:1378
|
472 |
msgid "Hide all results"
|
473 |
msgstr ""
|
474 |
|
475 |
+
#: polldaddy.php:1396 polldaddy.php:3942
|
476 |
msgid "Block repeat voters"
|
477 |
msgstr ""
|
478 |
|
479 |
+
#: polldaddy.php:1401
|
480 |
msgid "Don't block repeat voters"
|
481 |
msgstr ""
|
482 |
|
483 |
+
#: polldaddy.php:1401
|
484 |
msgid "Block by cookie (recommended)"
|
485 |
msgstr ""
|
486 |
|
487 |
+
#: polldaddy.php:1401
|
488 |
msgid "Block by cookie and by IP address"
|
489 |
msgstr ""
|
490 |
|
491 |
+
#: polldaddy.php:1416
|
492 |
msgid "Expires: "
|
493 |
msgstr ""
|
494 |
|
495 |
+
#: polldaddy.php:1418 polldaddy.php:3947
|
496 |
msgid "Never"
|
497 |
msgstr ""
|
498 |
|
499 |
+
#: polldaddy.php:1419 polldaddy.php:3948
|
500 |
#, php-format
|
501 |
msgid "%d hour"
|
502 |
msgstr ""
|
503 |
|
504 |
+
#: polldaddy.php:1420 polldaddy.php:1421 polldaddy.php:1422 polldaddy.php:3949
|
505 |
+
#: polldaddy.php:3950 polldaddy.php:3951
|
506 |
#, php-format
|
507 |
msgid "%d hours"
|
508 |
msgstr ""
|
509 |
|
510 |
+
#: polldaddy.php:1423 polldaddy.php:3952
|
511 |
#, php-format
|
512 |
msgid "%d day"
|
513 |
msgstr ""
|
514 |
|
515 |
+
#: polldaddy.php:1424 polldaddy.php:3953
|
516 |
#, php-format
|
517 |
msgid "%d week"
|
518 |
msgstr ""
|
519 |
|
520 |
+
#: polldaddy.php:1425 polldaddy.php:3954
|
521 |
#, php-format
|
522 |
msgid "%d month"
|
523 |
msgstr ""
|
524 |
|
525 |
+
#: polldaddy.php:1427
|
526 |
msgid ""
|
527 |
"Note: Blocking by cookie and IP address can be problematic for some voters."
|
528 |
msgstr ""
|
529 |
|
530 |
+
#: polldaddy.php:1442
|
531 |
msgid "Answers"
|
532 |
msgstr ""
|
533 |
|
534 |
+
#: polldaddy.php:1488
|
535 |
msgid "Add another"
|
536 |
msgstr ""
|
537 |
|
538 |
+
#: polldaddy.php:1494
|
539 |
msgid "Multiple choice"
|
540 |
msgstr ""
|
541 |
|
542 |
+
#: polldaddy.php:1494
|
543 |
msgid "Randomize answer order"
|
544 |
msgstr ""
|
545 |
|
546 |
+
#: polldaddy.php:1494
|
547 |
msgid "Allow other answers"
|
548 |
msgstr ""
|
549 |
|
550 |
+
#: polldaddy.php:1494
|
551 |
msgid "'Share This' link"
|
552 |
msgstr ""
|
553 |
|
554 |
+
#: polldaddy.php:1623
|
555 |
msgid "Design"
|
556 |
msgstr ""
|
557 |
|
558 |
+
#: polldaddy.php:1704 polldaddy.php:1759
|
559 |
msgid "Custom Style"
|
560 |
msgstr ""
|
561 |
|
562 |
+
#: polldaddy.php:1717 polldaddy.php:1813
|
563 |
msgid "Please choose a custom style..."
|
564 |
msgstr ""
|
565 |
|
566 |
+
#: polldaddy.php:1723 polldaddy.php:1819
|
567 |
msgid "Please choose a style."
|
568 |
msgstr ""
|
569 |
|
570 |
+
#: polldaddy.php:1728 polldaddy.php:1824
|
571 |
#, php-format
|
572 |
msgid ""
|
573 |
"Did you know we have a new editor for building your own custom poll styles? "
|
574 |
"Find out more <a href=\"%s\" target=\"_blank\">here</a>."
|
575 |
msgstr ""
|
576 |
|
577 |
+
#: polldaddy.php:1751
|
578 |
msgid "PollDaddy Style"
|
579 |
msgstr ""
|
580 |
|
581 |
+
#: polldaddy.php:1876
|
582 |
msgid "Answer"
|
583 |
msgstr ""
|
584 |
|
585 |
+
#: polldaddy.php:1877 polldaddy.php:1922 polldaddy.php:3684
|
586 |
msgid "Votes"
|
587 |
msgstr ""
|
588 |
|
589 |
+
#: polldaddy.php:1891
|
590 |
#, php-format
|
591 |
msgid "Other (<a href=\"%s\">see below</a>)"
|
592 |
msgstr ""
|
593 |
|
594 |
+
#: polldaddy.php:1921 polldaddy.php:3913
|
595 |
msgid "Other Answer"
|
596 |
msgstr ""
|
597 |
|
598 |
+
#: polldaddy.php:1986
|
599 |
msgid "Style"
|
600 |
msgstr ""
|
601 |
|
602 |
+
#: polldaddy.php:1987
|
603 |
msgid "Last Modified"
|
604 |
msgstr ""
|
605 |
|
606 |
+
#: polldaddy.php:2027
|
607 |
#, php-format
|
608 |
msgid "No custom styles yet. <a href=\"%s\">Create one</a>"
|
609 |
msgstr ""
|
610 |
|
611 |
+
#: polldaddy.php:2103
|
612 |
msgid "Style Name"
|
613 |
msgstr ""
|
614 |
|
615 |
+
#: polldaddy.php:2118
|
616 |
msgid "Preload Basic Style"
|
617 |
msgstr ""
|
618 |
|
619 |
+
#: polldaddy.php:2132
|
620 |
msgid "Load Style"
|
621 |
msgstr ""
|
622 |
|
623 |
+
#: polldaddy.php:2921
|
624 |
msgid "Save Style"
|
625 |
msgstr ""
|
626 |
|
627 |
+
#: polldaddy.php:3054
|
628 |
#, php-format
|
629 |
msgid ""
|
630 |
"Sorry! There was an error creating your rating widget. Please contact <a "
|
635 |
msgid "Rating Settings"
|
636 |
msgstr ""
|
637 |
|
638 |
+
#: polldaddy.php:3095
|
639 |
msgid "Rating updated"
|
640 |
msgstr ""
|
641 |
|
642 |
+
#: polldaddy.php:3107 polldaddy.php:3643
|
643 |
msgid "Posts"
|
644 |
msgstr ""
|
645 |
|
646 |
+
#: polldaddy.php:3111 polldaddy.php:3643
|
647 |
msgid "Pages"
|
648 |
msgstr ""
|
649 |
|
650 |
+
#: polldaddy.php:3115 polldaddy.php:3643
|
651 |
msgid "Comments"
|
652 |
msgstr ""
|
653 |
|
654 |
+
#: polldaddy.php:3126
|
655 |
msgid "Enable for blog posts"
|
656 |
msgstr ""
|
657 |
|
658 |
+
#: polldaddy.php:3130 polldaddy.php:3148
|
659 |
msgid "Above each blog post"
|
660 |
msgstr ""
|
661 |
|
662 |
+
#: polldaddy.php:3130 polldaddy.php:3148
|
663 |
msgid "Below each blog post"
|
664 |
msgstr ""
|
665 |
|
666 |
+
#: polldaddy.php:3144
|
667 |
+
msgid "Enable for front page"
|
668 |
+
msgstr ""
|
669 |
+
|
670 |
+
#: polldaddy.php:3164
|
671 |
msgid "Enable for pages"
|
672 |
msgstr ""
|
673 |
|
674 |
+
#: polldaddy.php:3168
|
675 |
msgid "Above each page"
|
676 |
msgstr ""
|
677 |
|
678 |
+
#: polldaddy.php:3168
|
679 |
msgid "Below each page"
|
680 |
msgstr ""
|
681 |
|
682 |
+
#: polldaddy.php:3184
|
683 |
msgid "Enable for comments"
|
684 |
msgstr ""
|
685 |
|
686 |
+
#: polldaddy.php:3188
|
687 |
msgid "Above each comment"
|
688 |
msgstr ""
|
689 |
|
690 |
+
#: polldaddy.php:3188
|
691 |
msgid "Below each comment"
|
692 |
msgstr ""
|
693 |
|
694 |
+
#: polldaddy.php:3203 polldaddy.php:3234
|
695 |
msgid "Save Changes"
|
696 |
msgstr ""
|
697 |
|
698 |
+
#: polldaddy.php:3214
|
699 |
msgid "Advanced Settings"
|
700 |
msgstr ""
|
701 |
|
702 |
+
#: polldaddy.php:3227
|
703 |
msgid "Save"
|
704 |
msgstr ""
|
705 |
|
706 |
+
#: polldaddy.php:3243
|
707 |
msgid "This is a demo of what your rating widget will look like"
|
708 |
msgstr ""
|
709 |
|
710 |
+
#: polldaddy.php:3250
|
711 |
msgid "Customize Labels"
|
712 |
msgstr ""
|
713 |
|
714 |
+
#: polldaddy.php:3254
|
715 |
msgid "votes"
|
716 |
msgstr ""
|
717 |
|
718 |
+
#: polldaddy.php:3258
|
719 |
msgid "rate this"
|
720 |
msgstr ""
|
721 |
|
722 |
+
#: polldaddy.php:3262
|
723 |
#, php-format
|
724 |
msgid "%d star"
|
725 |
msgstr ""
|
726 |
|
727 |
+
#: polldaddy.php:3266 polldaddy.php:3270 polldaddy.php:3274 polldaddy.php:3278
|
728 |
#, php-format
|
729 |
msgid "%d stars"
|
730 |
msgstr ""
|
731 |
|
732 |
+
#: polldaddy.php:3282
|
733 |
msgid "Thank You"
|
734 |
msgstr ""
|
735 |
|
736 |
+
#: polldaddy.php:3286
|
737 |
msgid "Rate Up"
|
738 |
msgstr ""
|
739 |
|
740 |
+
#: polldaddy.php:3290
|
741 |
msgid "Rate Down"
|
742 |
msgstr ""
|
743 |
|
744 |
+
#: polldaddy.php:3299
|
745 |
msgid "Rating Type"
|
746 |
msgstr ""
|
747 |
|
748 |
+
#: polldaddy.php:3301
|
749 |
msgid ""
|
750 |
"Here you can choose how you want your rating to display. The 5 star rating "
|
751 |
"is the most commonly used. The Nero rating is useful for keeping it simple."
|
752 |
msgstr ""
|
753 |
|
754 |
+
#: polldaddy.php:3309
|
755 |
#, php-format
|
756 |
msgid "%d Star Rating"
|
757 |
msgstr ""
|
758 |
|
759 |
+
#: polldaddy.php:3318
|
760 |
msgid "Nero Rating"
|
761 |
msgstr ""
|
762 |
|
763 |
+
#: polldaddy.php:3325
|
764 |
msgid "Rating Style"
|
765 |
msgstr ""
|
766 |
|
767 |
+
#: polldaddy.php:3332
|
768 |
msgid "Small"
|
769 |
msgstr ""
|
770 |
|
771 |
+
#: polldaddy.php:3332
|
772 |
msgid "Medium"
|
773 |
msgstr ""
|
774 |
|
775 |
+
#: polldaddy.php:3332
|
776 |
msgid "Large"
|
777 |
msgstr ""
|
778 |
|
779 |
+
#: polldaddy.php:3343
|
780 |
msgid "Star Color"
|
781 |
msgstr ""
|
782 |
|
783 |
+
#: polldaddy.php:3346
|
784 |
msgid "Yellow"
|
785 |
msgstr ""
|
786 |
|
787 |
+
#: polldaddy.php:3346
|
788 |
msgid "Red"
|
789 |
msgstr ""
|
790 |
|
791 |
+
#: polldaddy.php:3346
|
792 |
msgid "Blue"
|
793 |
msgstr ""
|
794 |
|
795 |
+
#: polldaddy.php:3346
|
796 |
msgid "Green"
|
797 |
msgstr ""
|
798 |
|
799 |
+
#: polldaddy.php:3346
|
800 |
msgid "Grey"
|
801 |
msgstr ""
|
802 |
|
803 |
+
#: polldaddy.php:3355
|
804 |
msgid "Hand"
|
805 |
msgstr ""
|
806 |
|
807 |
+
#: polldaddy.php:3366
|
808 |
msgid "Custom Image"
|
809 |
msgstr ""
|
810 |
|
811 |
+
#: polldaddy.php:3373
|
812 |
msgid "Text Layout & Font"
|
813 |
msgstr ""
|
814 |
|
815 |
+
#: polldaddy.php:3377
|
816 |
msgid "Align"
|
817 |
msgstr ""
|
818 |
|
819 |
+
#: polldaddy.php:3380
|
820 |
msgid "Left"
|
821 |
msgstr ""
|
822 |
|
823 |
+
#: polldaddy.php:3380
|
824 |
msgid "Center"
|
825 |
msgstr ""
|
826 |
|
827 |
+
#: polldaddy.php:3380 polldaddy.php:3394
|
828 |
msgid "Right"
|
829 |
msgstr ""
|
830 |
|
831 |
+
#: polldaddy.php:3391
|
832 |
msgid "Position"
|
833 |
msgstr ""
|
834 |
|
835 |
+
#: polldaddy.php:3394
|
836 |
msgid "Top"
|
837 |
msgstr ""
|
838 |
|
839 |
+
#: polldaddy.php:3394
|
840 |
msgid "Bottom"
|
841 |
msgstr ""
|
842 |
|
843 |
+
#: polldaddy.php:3405
|
844 |
msgid "Font"
|
845 |
msgstr ""
|
846 |
|
847 |
+
#: polldaddy.php:3408 polldaddy.php:3427 polldaddy.php:3441
|
848 |
+
msgid "Inherit"
|
849 |
msgstr ""
|
850 |
|
851 |
+
#: polldaddy.php:3419
|
852 |
+
msgid "Color"
|
853 |
msgstr ""
|
854 |
|
855 |
+
#: polldaddy.php:3424
|
856 |
+
msgid "Size"
|
857 |
msgstr ""
|
858 |
|
859 |
+
#: polldaddy.php:3438
|
860 |
msgid "Line Height"
|
861 |
msgstr ""
|
862 |
|
863 |
+
#: polldaddy.php:3452
|
864 |
msgid "Bold"
|
865 |
msgstr ""
|
866 |
|
867 |
+
#: polldaddy.php:3461
|
868 |
msgid "Italic"
|
869 |
msgstr ""
|
870 |
|
871 |
+
#: polldaddy.php:3630
|
872 |
msgid "«"
|
873 |
msgstr ""
|
874 |
|
875 |
+
#: polldaddy.php:3631
|
876 |
msgid "»"
|
877 |
msgstr ""
|
878 |
|
879 |
+
#: polldaddy.php:3637
|
880 |
msgid "Rating Reports"
|
881 |
msgstr ""
|
882 |
|
883 |
+
#: polldaddy.php:3652
|
884 |
msgid "View Report"
|
885 |
msgstr ""
|
886 |
|
887 |
+
#: polldaddy.php:3654
|
888 |
msgid "Last 24 hours"
|
889 |
msgstr ""
|
890 |
|
891 |
+
#: polldaddy.php:3654
|
892 |
msgid "Last 7 days"
|
893 |
msgstr ""
|
894 |
|
895 |
+
#: polldaddy.php:3654
|
896 |
msgid "Last 31 days"
|
897 |
msgstr ""
|
898 |
|
899 |
+
#: polldaddy.php:3654
|
900 |
msgid "Last 3 months"
|
901 |
msgstr ""
|
902 |
|
903 |
+
#: polldaddy.php:3654
|
904 |
msgid "Last 12 months"
|
905 |
msgstr ""
|
906 |
|
907 |
+
#: polldaddy.php:3654
|
908 |
msgid "All time"
|
909 |
msgstr ""
|
910 |
|
911 |
+
#: polldaddy.php:3662
|
912 |
msgid "Filter Report"
|
913 |
msgstr ""
|
914 |
|
915 |
+
#: polldaddy.php:3676
|
916 |
#, php-format
|
917 |
msgid "No ratings have been collected for your %s yet."
|
918 |
msgstr ""
|
919 |
|
920 |
+
#: polldaddy.php:3682
|
921 |
msgid "Start Date"
|
922 |
msgstr ""
|
923 |
|
924 |
+
#: polldaddy.php:3683
|
925 |
msgid "Title"
|
926 |
msgstr ""
|
927 |
|
928 |
+
#: polldaddy.php:3685
|
929 |
msgid "Average Rating"
|
930 |
msgstr ""
|
931 |
|
932 |
+
#: polldaddy.php:3846
|
933 |
msgid "PollDaddy Account Info"
|
934 |
msgstr ""
|
935 |
|
936 |
+
#: polldaddy.php:3849
|
937 |
msgid ""
|
938 |
"This is the PollDadddy account you currently have imported into your "
|
939 |
"WordPress account"
|
940 |
msgstr ""
|
941 |
|
942 |
+
#: polldaddy.php:3880
|
943 |
msgid "Import Account"
|
944 |
msgstr ""
|
945 |
|
946 |
+
#: polldaddy.php:3886
|
947 |
msgid "General Settings"
|
948 |
msgstr ""
|
949 |
|
950 |
+
#: polldaddy.php:3894
|
951 |
msgid "Default poll settings"
|
952 |
msgstr ""
|
953 |
|
954 |
+
#: polldaddy.php:3903
|
955 |
msgid "Multiple Choice"
|
956 |
msgstr ""
|
957 |
|
958 |
+
#: polldaddy.php:3908
|
959 |
msgid "Randomise Answers"
|
960 |
msgstr ""
|
961 |
|
962 |
+
#: polldaddy.php:3918
|
963 |
msgid "Sharing"
|
964 |
msgstr ""
|
965 |
|
966 |
+
#: polldaddy.php:3922
|
967 |
msgid "Show"
|
968 |
msgstr ""
|
969 |
|
970 |
+
#: polldaddy.php:3923
|
971 |
msgid "Hide"
|
972 |
msgstr ""
|
973 |
|
974 |
+
#: polldaddy.php:3924
|
975 |
msgid "Percentages"
|
976 |
msgstr ""
|
977 |
|
978 |
+
#: polldaddy.php:3934
|
979 |
msgid "Poll style"
|
980 |
msgstr ""
|
981 |
|
982 |
+
#: polldaddy.php:3939
|
983 |
msgid "Off"
|
984 |
msgstr ""
|
985 |
|
986 |
+
#: polldaddy.php:3940
|
987 |
msgid "Cookie"
|
988 |
msgstr ""
|
989 |
|
990 |
+
#: polldaddy.php:3941
|
991 |
msgid "Cookie & IP address"
|
992 |
msgstr ""
|
993 |
|
994 |
+
#: polldaddy.php:3955
|
995 |
msgid "Block expiration limit"
|
996 |
msgstr ""
|
997 |
|
998 |
+
#: polldaddy.php:3967
|
999 |
msgid "Save Options"
|
1000 |
msgstr ""
|
1001 |
|
rating.php
CHANGED
@@ -34,7 +34,7 @@ function polldaddy_show_rating_comments( $content ){
|
|
34 |
|
35 |
function polldaddy_show_rating( $content ) {
|
36 |
if ( !is_feed() && !is_attachment() ) {
|
37 |
-
if ( is_single() || is_page() ) {
|
38 |
global $post;
|
39 |
|
40 |
if ( $post->ID > 0 ) {
|
@@ -53,7 +53,14 @@ function polldaddy_show_rating( $content ) {
|
|
53 |
$rating_pos = (int) get_option( 'pd-rating-pages-pos' );
|
54 |
$item_id = '_page_' . $post->ID;
|
55 |
}
|
56 |
-
} else {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
if ( (int) get_option( 'pd-rating-posts' ) > 0 ) {
|
58 |
$rating_id = (int) get_option( 'pd-rating-posts' );
|
59 |
$unique_id = 'wp-post-' . $post->ID;
|
@@ -82,8 +89,7 @@ function polldaddy_show_rating( $content ) {
|
|
82 |
}
|
83 |
|
84 |
function polldaddy_get_rating_code( $rating_id, $unique_id, $title, $permalink, $item_id = '' ) {
|
85 |
-
|
86 |
-
$html = '<p><div class="pd-rating" id="pd_rating_holder_' . $rating_id . $item_id . '"></div></p>
|
87 |
<script type="text/javascript">
|
88 |
PDRTJS_settings_' . (int)$rating_id . $item_id . ' = {
|
89 |
"id" : "' . (int)$rating_id . '",
|
@@ -95,11 +101,22 @@ function polldaddy_get_rating_code( $rating_id, $unique_id, $title, $permalink,
|
|
95 |
|
96 |
$html .= ' "permalink" : "' . urlencode( clean_url( $permalink ) ) . '"';
|
97 |
$html .= "\n }\n";
|
98 |
-
$html .=
|
99 |
|
100 |
return $html;
|
101 |
}
|
102 |
|
103 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
add_filter( 'comment_text', 'polldaddy_show_rating_comments', 50 );
|
105 |
?>
|
34 |
|
35 |
function polldaddy_show_rating( $content ) {
|
36 |
if ( !is_feed() && !is_attachment() ) {
|
37 |
+
if ( is_single() || is_page() || is_home() ) {
|
38 |
global $post;
|
39 |
|
40 |
if ( $post->ID > 0 ) {
|
53 |
$rating_pos = (int) get_option( 'pd-rating-pages-pos' );
|
54 |
$item_id = '_page_' . $post->ID;
|
55 |
}
|
56 |
+
} else if( is_home() ) {
|
57 |
+
if ( (int) get_option( 'pd-rating-posts-index' ) > 0 ) {
|
58 |
+
$rating_id = (int) get_option( 'pd-rating-posts-index' );
|
59 |
+
$unique_id = 'wp-post-' . $post->ID;
|
60 |
+
$rating_pos = (int) get_option( 'pd-rating-posts-index-pos' );
|
61 |
+
$item_id = '_post_' . $post->ID;
|
62 |
+
}
|
63 |
+
} else {
|
64 |
if ( (int) get_option( 'pd-rating-posts' ) > 0 ) {
|
65 |
$rating_id = (int) get_option( 'pd-rating-posts' );
|
66 |
$unique_id = 'wp-post-' . $post->ID;
|
89 |
}
|
90 |
|
91 |
function polldaddy_get_rating_code( $rating_id, $unique_id, $title, $permalink, $item_id = '' ) {
|
92 |
+
$html = "\n".'<p><div class="pd-rating" id="pd_rating_holder_' . $rating_id . $item_id . '"></div></p>
|
|
|
93 |
<script type="text/javascript">
|
94 |
PDRTJS_settings_' . (int)$rating_id . $item_id . ' = {
|
95 |
"id" : "' . (int)$rating_id . '",
|
101 |
|
102 |
$html .= ' "permalink" : "' . urlencode( clean_url( $permalink ) ) . '"';
|
103 |
$html .= "\n }\n";
|
104 |
+
$html .= "</script>\n";
|
105 |
|
106 |
return $html;
|
107 |
}
|
108 |
|
109 |
+
function polldaddy_show_rating_excerpt( $content ) {
|
110 |
+
remove_filter( 'the_content', 'polldaddy_show_rating', 5 );
|
111 |
+
return $content;
|
112 |
+
}
|
113 |
+
|
114 |
+
function polldaddy_show_rating_excerpt_for_real( $content ) {
|
115 |
+
return polldaddy_show_rating( $content );
|
116 |
+
}
|
117 |
+
|
118 |
+
add_filter( 'the_content', 'polldaddy_show_rating', 5 );
|
119 |
+
add_filter( 'get_the_excerpt', 'polldaddy_show_rating_excerpt', 5 );
|
120 |
+
add_filter( 'the_excerpt', 'polldaddy_show_rating_excerpt_for_real' );
|
121 |
add_filter( 'comment_text', 'polldaddy_show_rating_comments', 50 );
|
122 |
?>
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: mdawaffe, eoigal
|
|
3 |
Tags: polls, poll, polldaddy, wppolls, vote, polling, surveys, rate, rating, ratings
|
4 |
Requires at least: 2.6
|
5 |
Tested up to: 2.9.1
|
6 |
-
Stable tag: 1.
|
7 |
|
8 |
Create and manage PollDaddy polls and ratings from within WordPress.
|
9 |
|
@@ -47,8 +47,14 @@ Yes. You'll be able to edit the polls they create from your blog. (You won't be
|
|
47 |
Nope. The permissions are the same as for posts. So Editors and Administrators can edit anyone's polls for that blog. Authors can only edit their own.
|
48 |
|
49 |
== Change Log ==
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
= 1.7.9 =
|
51 |
-
* Bug Fix: Fixed typo in API request URL
|
52 |
|
53 |
= 1.7.8 =
|
54 |
* Added Options menu, that will allow users to set poll defaults settings, import another PollDaddy account and there is also a setting to allow each blog user to import their own PollDaddy account.
|
3 |
Tags: polls, poll, polldaddy, wppolls, vote, polling, surveys, rate, rating, ratings
|
4 |
Requires at least: 2.6
|
5 |
Tested up to: 2.9.1
|
6 |
+
Stable tag: 1.8.0
|
7 |
|
8 |
Create and manage PollDaddy polls and ratings from within WordPress.
|
9 |
|
47 |
Nope. The permissions are the same as for posts. So Editors and Administrators can edit anyone's polls for that blog. Authors can only edit their own.
|
48 |
|
49 |
== Change Log ==
|
50 |
+
= 1.8.0 =
|
51 |
+
* Added option to Rating settings to allow ratings on the front page.
|
52 |
+
* Added more phrases to the pot file.
|
53 |
+
* Added stylesheet for blos that have a right to left language.
|
54 |
+
* Bug Fix: Fixed javascript bug, clash with prototype in P2 theme, use of $ function.
|
55 |
+
|
56 |
= 1.7.9 =
|
57 |
+
* Bug Fix: Fixed typo in API request URL.
|
58 |
|
59 |
= 1.7.8 =
|
60 |
* Added Options menu, that will allow users to set poll defaults settings, import another PollDaddy account and there is also a setting to allow each blog user to import their own PollDaddy account.
|