?> ><?php $count = sk_count(SK_SPAM); echo _n("Spam", "Spam", $count, 'sk'); ?> (<span class="spam-count"><?php echo $count; ?> </span>)</a> <img src='../wp-content/plugins/schreikasten/img/spam.png'> |</li> <li class='spam'><a href='edit-comments.php?page=skmanage&filter=black'<?php if ($select == SK_BLACK) { echo " class=\"current\""; } ?> ><?php $count = sk_count(SK_BLACK); echo _n("Rejected", "Rejected", $count, 'sk'); ?> (<span class="spam-count"><?php echo $count; ?> </span>)</a> <img src='../wp-content/plugins/schreikasten/img/black.png'> | </li> <li class='spam'><a href='edit-comments.php?page=skmanage&filter=blocked'<?php if ($select == SK_BLOCKED) { echo " class=\"current\""; } ?> ><?php echo _n('Blocked PC', 'Blocked PC', 2, 'sk'); ?> </a> <img src='../wp-content/plugins/schreikasten/img/blocked.png'></li>
/** * Function to show the shoutbox. Can be used in the template files. * * @access private */ function sk_codeShoutbox($size = false) { global $wpdb, $current_user; $options = get_option('sk_options'); //Size if (!$size) { $size = $options['items']; } if (isset($options['replies'])) { sk_activate(); } if (!is_numeric($size) || $size < 1) { $size = 5; } $sk_size = $size; //Our random number $rand = mt_rand(111111, 999999); $answer = ""; //Create the nonce $nonce = wp_create_nonce('sk' . $rand); //Get current user get_currentuserinfo(); /************** This is huge *******************/ $sk_page = 1; $sk_for = false; $sk_id = $sk_for = false; if (isset($_GET['sk_id'])) { $sk_id = $_GET['sk_id']; } if ($sk_id) { $sk_page = sk_page_by_id($sk_id); } if (isset($_GET['sk_for'])) { $sk_for = $_GET['sk_for']; } if ($sk_for) { $sk_page = sk_page_by_id($sk_for); } $first_comments = sk_show_comments($size, $sk_page, false, $rand); $first_page_selector = sk_page_selector($size, $sk_page, $rand); $options = get_option('sk_options'); $avatar = $options['avatar']; $req = sk_require_name_and_email(); //Get maxchars $maxchars = 255; if (isset($options['maxchars'])) { $maxchars = $options['maxchars']; } //Update blacklist dates sk_blacklist_update(); //Set name and email on cookie name $alias = ""; $email = ""; if ($_COOKIE['comment_author_' . COOKIEHASH]) { $alias = $_COOKIE['comment_author_' . COOKIEHASH]; $email = $_COOKIE['comment_author_email_' . COOKIEHASH]; } $anonymous_avatar = sk_plugin_url('/img/anonymous.jpg'); $uri_sk = sk_plugin_url('/ajax/content.php'); $uri_skadd = sk_plugin_url('/ajax/add_comment.php'); $uri_img = sk_plugin_url('/img/loading.gif'); $uri_out = wp_logout_url(get_permalink()); if (is_home()) { $uri_out = wp_logout_url(get_option('home')); } $time = $options['refresh'] * 1000; $show_timer = ""; if ($options['refresh'] > 0) { $show_timer = "\nsk_timer{$rand}();"; } $ask_email = ""; if ($req) { /*desc: This is a javascript alert message, use \\n for new line and \\' for apostrophe. */ $ask_email = "if(!check_email(email)) {\r\n\t\t\talert('" . __("E-mail is required", "sk") . "');\r\n\t\t\treturn false;\r\n\t\t}"; } $email_in_text = ""; if ($options['alert_about_emails']) { /*desc: This is a javascript alert message, use \\n for new line and \\' for apostrophe. */ $email_in_text = "if(email_intext ( text ) ) {\r\n\t\t\tcheck=confirm('" . __("To prevent identification theft, we recomend\\nthat you do not include e-mail adresses.\\nDo you want to continue?", "sk") . "');\r\n\t\t\tif(!check) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}"; } $message = false; //Do we need moderation? $require_moderation = true; if ($options['moderation'] == SK_MODERATION_CONFIG) { if (!get_option('comment_moderation')) { $require_moderation = false; } } if ($options['moderation'] == SK_MODERATION_NO) { $require_moderation = false; } if (1 == $require_moderation && !current_user_can(SK_CAP)) { /*desc: This is a javascript alert message, use \\n for new line and \\' for apostrophe. */ $message = __('Your message has been sent. Comments have\\nto be approved before posted.', 'sk'); } if (sk_is_blacklisted()) { /*desc: This is a javascript alert message, use \\n for new line and \\' for apostrophe. */ $message = __('Your message has been sent but this PC was blacklisted.\\nComments have to be approved before posted.', 'sk'); } if ($message) { $message = "alert(\"{$message}\");\r\n\t\tthis.disabled=true;"; } $form_button = ""; $form_table = "<a name='sk_top'></a><table border='0' class='sk-table'>\r\n\t<tr><td width='20'></td><td width='100%'></td></tr>"; $sk_count = sk_count(SK_HAM); $hidden = "<input type='hidden' id='sk_timer{$rand}' value=''/><input type='hidden' id='sk_count{$rand}' name='sk_count{$rand}' value='{$sk_count}' /><input type='hidden' id='sk_page{$rand}' name='sk_page{$rand}' value='{$sk_page}' /><input type='hidden' id='sk_size{$rand}' name='sk_size{$rand}' value='{$sk_size}' />"; if (sk_only_registered_users() && $current_user->ID == 0) { $url = !empty($_SERVER['HTTPS']) ? "https://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'] : "http://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']; $form_table .= "<tr>\r\n\t\t\t<td colspan='2' id='skwarning'>\r\n\t\t\t\t{$hidden}" . sprintf(__('You must be <a href="%s">signed in</a> to post a comment', 'sk'), wp_login_url($url)) . "\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t</table>"; } else { if (sk_is_blacklisted()) { if (sk_can_not_accept_more_messages()) { $form_table .= "<tr>\r\n\t\t\t\t\t<td colspan='2'>" . __("This PC was blacklisted. At this time comments cannot be posted.", "sk") . "</td>\r\n\t\t\t\t<tr>"; } } if ($current_user->ID == 0) { $form_table .= "<tr class='sk-rowname'>\r\n\t\t\t\t<td nowrap='nowrap'>" . __('Name', 'sk') . ":</td>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<input class='sk-text' type='text' id='sk_alias{$rand}' name='sk_alias{$rand}' value='{$alias}'/>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr class='sk-rowemail'>\r\n\t\t\t\t<td nowrap='nowrap'>" . __('Email', 'sk') . ":</td>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<input class='sk-text' type='text' id='sk_email{$rand}' name='sk_email{$rand}' value='{$email}'/>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>"; } $form_table .= "<tr class='sk-for-nai' id='sk_for_tr{$rand}'>\r\n\t\t\t<td nowrap='nowrap'>" . __('For', 'sk') . ":</td>\r\n\t\t\t<td><span id='sk_for_name{$rand}'></span> <img src='" . sk_plugin_url('/img/clear.png') . "' align='top' border='0' alt='' onclick='for_delete{$rand}();' /><input id='sk_for_id{$rand}' name='sk_for_id{$rand}' type='hidden' size='5' value='0'/></td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<td colspan='2' align='right'><textarea rows='0' cols='0' class='sk-area' name='sk_text{$rand}' id='sk_text{$rand}' onkeypress='\r\n\t\t\t\tvar key;\r\n\t\t\t\tif(window.event)\r\n\t\t\t\t\tkey = window.event.keyCode; //IE\r\n\t\t\t\telse\r\n\t\t\t\t\tkey = event.keyCode;\r\n\t\t\t\tif(this.value.length>{$maxchars}-1 && !(key==8 || key==37 || key==38 || key==39 || key==40) )\r\n\t\t\t\treturn false;'></textarea></td>\r\n\t\t</tr>\r\n\t\t</table>"; $sk_allowed = sk_allowed_messages(); $submit = __('Submit', 'sk'); $for = __('For', 'sk'); $button = "<div class='sk-box-text'>"; if ($current_user->ID == 0) { $button .= __('Mail will not be published', 'sk') . "<br/>"; if ($req) { $button .= __("(but it's required)", "sk"); } else { if ($avatar) { $button .= __("(but it's used for avatar)", "sk"); } } } else { $button .= sprintf(__('Logged in as %s', 'sk'), $current_user->display_name); $button .= "<br/><a href='{$uri_out}' title='" . __('Log out', 'sk') . "'>" . __('Log out', 'sk') . "</a>\r\n\t\t\t\t<input id='sk_alias{$rand}' name='sk_alias{$rand}' type='hidden' value='{$current_user->display_name}' />\r\n\t\t\t\t<input id='sk_email{$rand}' name='sk_email{$rand}' type='hidden' value='{$current_user->user_email}' />"; } $button .= "</div>"; $form_button = "<table class='sk-table'>\t\t\r\n\t\t\t<tr>\r\n\t\t\t\t<td colspan='2' class='sk-little'>\r\n\t\t\t\t\t<div class='sk-box-message'></div>\r\n\t\t\t\t\t<div class='sk-box-button'>\r\n\t\t\t\t\t\t{$hidden}<input type='button' class='sk-button sk-button-size' value='{$submit}' id='sk_button{$rand}' onclick='\r\n\t\t\t\t\t\tsk_enabled = document.getElementById(\"sk_enabled%rand%\").value;\r\n\t\t\t\t\t\tsk_allowed = document.getElementById(\"sk_allowed%rand%\").value;\r\n\t\t\t\t\t\tif(sk_enabled == 1 ) {\r\n\t\t\t\t\t\t\tthis.disabled = true;\r\n\t\t\t\t\t\t\tsk_pressButton{$rand}();%message%\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\talert(document.getElementById(\"sk_message%rand%\").value);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t'/>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t{$button}\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t</table>"; } $have_for = ""; if ($sk_for) { $have_for = "for_set{$rand}({$sk_for}, '" . sk_name_by_id($sk_for) . "');"; } $lenght = __("The lenght of the message is bigger than the allowed size.", "sk"); $chat = "false"; $qa = "false"; $sk_general = "%form_table%%form_button%<div id='sk_content%rand%'>%first_comments%\t%first_page_selector%</div>"; switch ($options['layout']) { case SK_LAYOUT_CHAT: $sk_general = "<div id='sk_content%rand%'>%first_comments%%first_page_selector%</div>%form_table%%form_button%"; $chat = "true"; break; case SK_LAYOUT_QA: $qa = "true"; break; } /******************* End of the hughe part where we are debuging now *************/ $file = ABSPATH . "wp-content/plugins/schreikasten/templates/sk_widget.php"; if ($fop = @fopen($file, 'r')) { $answer = null; while (!feof($fop)) { $answer .= fread($fop, 1024); } fclose($fop); } $blacklisted_pc = 'false'; if (sk_is_blacklisted()) { $blacklisted_pc = 'true'; } $answer = str_replace('%allowed%', sk_allowed_messages(), $answer); $answer = str_replace('%blocked_pc%', $blacklisted_pc, $answer); $answer = str_replace('%sk_general%', $sk_general, $answer); $answer = str_replace('%nonce%', $nonce, $answer); $answer = str_replace('%chat%', $chat, $answer); $answer = str_replace('%qa%', $qa, $answer); $answer = str_replace('%answer%', __('Answer', 'sk'), $answer); $answer = str_replace('%sk_id%', $sk_id, $answer); $answer = str_replace('%sk_page%', $sk_page, $answer); $answer = str_replace('%sk_for%', $sk_for, $answer); $answer = str_replace('%first_comments%', $first_comments, $answer); $answer = str_replace('%first_page_selector%', $first_page_selector, $answer); $answer = str_replace('%maxchars%', $maxchars, $answer); $answer = str_replace('%alias%', $alias, $answer); $answer = str_replace('%email%', $email, $answer); $answer = str_replace('%uri_sk%', $uri_sk, $answer); $answer = str_replace('%uri_skadd%', $uri_skadd, $answer); $answer = str_replace('%uri_img%', $uri_img, $answer); $answer = str_replace('%time%', $time, $answer); $answer = str_replace('%show_timer%', $show_timer, $answer); $answer = str_replace('%ask_email%', $ask_email, $answer); $answer = str_replace('%email_in_text%', $email_in_text, $answer); $answer = str_replace('%lenght%', $lenght, $answer); $answer = str_replace('%form_table%', $form_table, $answer); $answer = str_replace('%form_button%', $form_button, $answer); $answer = str_replace('%message%', $message, $answer); $answer = str_replace('%submit%', $submit, $answer); $answer = str_replace('%button%', $button, $answer); $answer = str_replace('%have_for%', $have_for, $answer); $answer = str_replace('%for%', $for, $answer); $answer = str_replace('%rand%', $rand, $answer); return $answer; }
'prev_text' => '«', 'next_text' => '»', 'total' => ceil($total/$max), 'current' => $page )); ?> <div class="wrap"> <div id="icon-edit-comments" class="icon32"><br /></div> <h2><?php _e( 'Tracking comment', 'sk' ); ?></h2> <form name="form1" method="post" action="<?php echo add_query_arg(array('mode'=>'', 'text'=>$text)); ?>"> <ul class="subsubsub"> <li class='all'><a href='edit-comments.php?page=skmanage'<?php if($select==SK_NOT_FILTERED) echo " class=\"current\""; ?>><?php $count = sk_count(); echo _n("Comment", "Comments", $count, 'sk'); ?> (<span class="spam-count"><?php echo $count; ?></span>)</a> |</li> <li class='pending'><a href='edit-comments.php?page=skmanage&filter=moot'<?php if($select==SK_MOOT) echo " class=\"current\""; ?>><?php $count = sk_count(SK_MOOT); echo _n("Pending", "Pending", $count, 'sk'); ?> (<span class="spam-count"><?php echo $count; ?></span>)</a><img src='../wp-content/plugins/schreikasten/img/moot.png'> |</li> <li class='approved'><a href='edit-comments.php?page=skmanage&filter=ham'<?php if($select==SK_HAM) echo " class=\"current\""; ?>><?php $count = sk_count(SK_HAM); echo _n("Approved", "Approved", $count, 'sk'); ?> (<span class="spam-count"><?php echo $count; ?></span>)</a><img src='../wp-content/plugins/schreikasten/img/ham.png'> |</li> <li class='spam'><a href='edit-comments.php?page=skmanage&filter=spam'<?php if($select==SK_SPAM) echo " class=\"current\""; ?>><?php $count = sk_count(SK_SPAM); echo _n("Spam", "Spam", $count, 'sk'); ?> (<span class="spam-count"><?php echo $count; ?></span>)</a> <img src='../wp-content/plugins/schreikasten/img/spam.png'> |</li> <li class='spam'><a href='edit-comments.php?page=skmanage&filter=black'<?php if($select==SK_BLACK) echo " class=\"current\""; ?>><?php $count = sk_count(SK_BLACK); echo _n("Rejected", "Rejected", $count, 'sk'); ?> (<span class="spam-count"><?php echo $count; ?></span>)</a> <img src='../wp-content/plugins/schreikasten/img/black.png'> | </li> <li class='spam'><a href='edit-comments.php?page=skmanage&filter=blocked'<?php if($select==SK_BLOCKED) echo " class=\"current\""; ?>><?php echo _n('Blocked PC', 'Blocked PC', 2, 'sk'); ?></a> <img src='../wp-content/plugins/schreikasten/img/blocked.png'></li> </ul> <div class="tablenav"><?php if ( $page_links ) { ?> <div class="tablenav-pages"><?php $page_links_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s–%s of %s', 'sk' ) . '</span>%s', number_format_i18n( $start ), number_format_i18n( $end ), number_format_i18n( $total ), $page_links ); echo $page_links_text; ?> </div><?php }