XmasB Quotes by XmasB'; } function xmasb_quotes_showimage($quoteimg) { $siteurl = get_option("siteurl"); if ($siteurl[strlen($siteurl)-1] != "/") $siteurl .= "/"; ?>
$quote->author
prefix . "xmasb_quotes"; $sql = "SELECT * FROM " . XMASB_QUOTES_TABLE . " where visible = 1 ORDER BY RAND() limit 1"; $quotes = $wpdb->get_results($sql); if ( !empty($quotes) ) { xmasb_print_quote($quotes[0], true); xmasb_quotes_showlink(); } else { echo _e("No quotes found"); } } function xmasb_print_quote ($quote, $showimage = false) { if (is_plugin_page()) { ?>
imgsrc)) { $quoteimg = $imagelocation . $quote->author . '.gif'; if (file_exists($quoteimg)) { xmasb_quotes_showimage($quoteimg); } elseif (!empty($defaultimage)) { ?>imgsrc; if (file_exists($quoteimg)) { xmasb_quotes_showimage($quoteimg); } elseif (!empty($defaultimage)) { ?>visible ) { ?>
quote; ?>
quote; ?>
author) ) { ?>
author; ?>
imgsrc) ) { ?>
imgsrc; ?>
'XmasB Quotes', 'showimages'=>'yes', 'defaultimage'=>'quote.gif', 'showlink'=>'yes'); if ( $_POST['xmasb_quotes-submit'] ) { $options['showimages'] = strip_tags(stripslashes($_POST['xmasb_quotes-showimages'])); $options['defaultimage'] = strip_tags(stripslashes($_POST['xmasb_quotes-defaultimage'])); $options['showlink'] = strip_tags(stripslashes($_POST['xmasb_quotes-showlink'])); update_option('widget_xmasb_quotes', $options); } $showimages = htmlspecialchars($options['showimages'], ENT_QUOTES); $defaultimage = htmlspecialchars($options['defaultimage'], ENT_QUOTES); $showlink = htmlspecialchars($options['showlink'], ENT_QUOTES); ?>

XmasB Quotes

: />
:
: />
query($sql); if ( $sqlresponse == 1 ) { $sql = "select id from " . XMASB_QUOTES_TABLE . " where quote='" . mysql_real_escape_string($quote) . "'" . " and author='" . mysql_real_escape_string($author) . "' and visible='" . mysql_real_escape_string($visible) . "' limit 1"; $quotes = $wpdb->get_results($sql); if ( empty($quotes) || empty($quotes[0]->id) ) { ?>

That didn't go too well, and I really don't know why...

Quote has been added with id id?>.

1 ) { ?>

All hell is lose. quotes added!

get_results($sql); $sql = "SELECT * FROM " . XMASB_QUOTES_TABLE . " order by id"; $quotes = $wpdb->get_results($sql); if ( empty($quotes)) { echo "No quotes found!"; $mode = "new"; } else { ?>

XmasB Quotes

query($sql); if ( $sqlresponse == 1 ) { ?>

Quote has been edited.

Could not edit quote.

Failure: No quote ID given.

query($sql); if ( $sqlresponse == 1 ) { ?>

Quote deleted successfully

Failure: Could not delete quote.

Mode: " . $mode . "

"; } if ( $quoteID !== false ) { if ( intval($quoteID) != $quoteID ) { ?>

WTH?!?

get_results("select * from " . XMASB_QUOTES_TABLE . " where id='" . mysql_real_escape_string($quoteID) . "' limit 1"); if ( empty($quote) ) { ?>

No quote found for id

XmasB Quotes

">
()
()
visible==1 ) echo "checked" ?>/>
visible==0 ) echo "checked" ?>/>

Last 10 quotes added get_results($sql); if ( empty($quotes)) { echo "No quotes found!"; } else { ?>
    "; xmasb_print_quote($quote); echo ""; } ?>
\n"; # JS inclusion echo "\n"; } /* Widget code */ function widget_xmasb_quotes_init() { if ( !function_exists('register_sidebar_widget') ) return; function widget_xmasb_quotes($args) { extract($args); $options = get_option('widget_xmasb_quotes'); $title = $options['title']; echo $before_widget . $before_title . $title . $after_title; if ( !function_exists('xmasb_random_quote') ) { ?>
Cannot find the XmasB quotes plugin. If you have installed it check if you have activated it. If you have not installed it, you can download it from xmasb.com.
'XmasB Quotes', 'showimages'=>'yes', 'defaultimage'=>'quote.gif', 'showlink'=>'yes'); if ( $_POST['xmasb_quotes-submit'] ) { $options['title'] = strip_tags(stripslashes($_POST['xmasb_quotes-title'])); update_option('widget_xmasb_quotes', $options); } $title = htmlspecialchars($options['title'], ENT_QUOTES); ?>