Exemplo n.º 1
0
        $categories['store'] = $_GET['store'];
    }
}
echo '<?xml version="1.0" encoding="UTF-8" ?>

<rss version="2.0">

    <channel>

    <title>' . \query\main::get_option('sitename') . ' Products</title>
    <link>' . $GLOBALS['siteURL'] . '</link>
    <description>List of products</description>
    <language>en-us</language>';
foreach (\query\main::while_products($categories) as $item) {
    echo '
        <item>
            <title>' . $item->title . '</title>
            <image>
              <link>' . $item->link . '</link>
              <title>' . $item->title . '</title>
              <url>' . \query\main::product_avatar($item->image) . '</url>
            </image>
            <link>' . $item->link . '</link>
            <description><![CDATA[' . $item->description . ']]></description>
            <pubDate>' . date('r', strtotime($item->date)) . '</pubDate>
            <guid>' . $item->link . '</guid>
        </item>
      ';
}
echo '</channel>
</rss>';
Exemplo n.º 2
0
function product_avatar($text)
{
    return \query\main::product_avatar($text);
}
Exemplo n.º 3
0
    <select name="action">';
                    foreach (array('publish' => $LANG['publish'], 'unpublish' => $LANG['unpublish']) as $k => $v) {
                        echo '<option value="' . $k . '">' . $v . '</option>';
                    }
                    echo '</select>
    <button class="btn" name="set_action">' . $LANG['set_all'] . '</button>';
                }
                echo '</div>';
            }
            foreach (\query\main::while_products(array_merge(array('orderby' => isset($_GET['orderby']) ? urldecode($_GET['orderby']) : 'date desc'), $options)) as $item) {
                echo '<li>
  <input type="checkbox" name="id[' . $item->ID . ']" />

  <div style="display: table;">

  <img src="' . \query\main::product_avatar($item->image) . '" alt="" style="height: 50px; width: 50px;" />
  <div class="info-div"><h2>' . (!$item->visible ? '<span class="msg-error">' . $LANG['notpublished'] . '</span> ' : '') . ($item->feedID !== 0 ? '<span class="msg-alert" title="' . $LANG['added_through_feed_msg'] . '">' . $LANG['added_through_feed'] . '</span> ' : '') . (!$item->is_expired ? '<span class="msg-success">' . $LANG['active'] . '</span> ' : '<span class="msg-error">' . $LANG['expired'] . '</span> ') . $item->title . '
  <span class="fright date">' . date('Y.m.d, ' . (\query\main::get_option('hour_format') == 12 ? 'g:i A' : 'G:i'), strtotime($item->date)) . '</span></h2>
  <a href="?route=products.php&amp;store=' . $item->storeID . '"">' . $item->store_name . '</a></div>

  </div>

  <div style="clear:both;"></div>

  <div class="options">';
                if ($ab_edt) {
                    echo '<a href="?route=products.php&amp;action=edit&amp;id=' . $item->ID . '">' . $LANG['edit'] . '</a>';
                    echo '<a href="' . \site\utils::update_uri('', array('type' => !$item->visible ? 'publish' : 'unpublish', 'id' => $item->ID, 'token' => $csrf)) . '">' . (!$item->visible ? $LANG['publish'] : $LANG['unpublish']) . '</a>';
                }
                if ($ab_del) {
                    echo '<a href="' . \site\utils::update_uri('', array('action' => 'delete', 'id' => $item->ID, 'token' => $csrf)) . '" data-delete-msg="' . $LANG['delete_msg'] . '">' . $LANG['delete'] . '</a>';