?>
 /><label for="column-<?php 
    echo $name;
    ?>
" ><?php 
    echo $label;
    ?>
</label></li>
					<?php 
}
?>
					
				</ul>
			</div>
			<?php 
PurchasesIIFExport::settings();
?>
			<br />
			<select name="settings[purchaselog_format]" id="purchaselog-format">
				<?php 
echo menuoptions($exports, $formatPref, true);
?>
			</select></span>
			<button type="submit" id="download-button" name="download" value="export" class="button-secondary"><?php 
_e('Download', 'Shopp');
?>
</button>
		</div>
		<?php 
if ($page_links) {
    echo "<div class='tablenav-pages'>{$page_links}</div>";
Example #2
0
 protected function bottom_tablenav()
 {
     if (!current_user_can('shopp_financials') || !current_user_can('shopp_export_orders')) {
         return;
     }
     $exporturl = add_query_arg(urlencode_deep(array_merge(stripslashes_deep($_GET), array('src' => 'export_purchases'))));
     echo '<div class="alignleft actions">' . '	</form><form action="' . esc_url($exporturl) . '" id="log" method="post">' . '		<button type="button" id="export-settings-button" name="export-settings" class="button-secondary">' . Shopp::__('Export Options') . '</button>' . '	<div id="export-settings" class="hidden">' . '		<div id="export-columns" class="multiple-select">' . '			<ul>';
     $even = true;
     echo '				<li' . ($even ? '' : ' class="odd"') . '><input type="checkbox" name="selectall_columns" id="selectall_columns" /><label for="selectall_columns"><strong>' . Shopp::__('Select All') . '</strong></label></li>';
     $even = !$even;
     echo '				<li' . ($even ? '' : ' class="odd"') . '><input type="hidden" name="settings[purchaselog_headers]" value="off" /><input type="checkbox" name="settings[purchaselog_headers]" id="purchaselog_headers" value="on" /><label for="purchaselog_headers"><strong>' . Shopp::__('Include column headings') . '</strong></label></li>';
     $even = !$even;
     $exportcolumns = array_merge(ShoppPurchase::exportcolumns(), ShoppPurchased::exportcolumns());
     $selected = shopp_setting('purchaselog_columns');
     if (empty($selected)) {
         $selected = array_keys($exportcolumns);
     }
     foreach ($exportcolumns as $name => $label) {
         if ('cb' == $name) {
             continue;
         }
         echo '				<li' . ($even ? '' : ' class="odd"') . '><input type="checkbox" name="settings[purchaselog_columns][]" value="' . esc_attr($name) . '" id="column-' . esc_attr($name) . '" ' . (in_array($name, $selected) ? ' checked="checked"' : '') . ' /><label for="column-' . esc_attr($name) . '">' . esc_html($label) . '</label></li>';
         $even = !$even;
     }
     echo '			</ul>' . '		</div>';
     PurchasesIIFExport::settings();
     $exports = array('tab' => Shopp::__('Tab-separated.txt'), 'csv' => Shopp::__('Comma-separated.csv'), 'iif' => Shopp::__('Intuit&reg; QuickBooks.iif'));
     $format = shopp_setting('purchaselog_format');
     if (!$format) {
         $format = 'tab';
     }
     echo '		<br />' . '		<select name="settings[purchaselog_format]" id="purchaselog-format">' . '			' . menuoptions($exports, $format, true) . '		</select>' . '		</div>' . '	<button type="submit" id="download-button" name="download" value="export" class="button-secondary"' . (count($this->items) < 1 ? ' disabled="disabled"' : '') . '>' . Shopp::__('Download') . '</button>' . '	<div class="clear"></div>' . '	</form>' . '</div>';
 }