Example #1
0
			
		<div class="row buttons">
			<input type= "submit" name="import" value="<?php echo _AT('import'); ?>" />
		</div>
	</div>
	</form>
	<br />
<?php endif; 

$sql    = "SELECT * FROM " . TABLE_PREFIX . "themes WHERE type='".DESKTOP_DEVICE."' ORDER BY title ASC";
$result = mysql_query($sql, $db);
print_data_table($result, DESKTOP_DEVICE);
echo '<br /><br />';
$sql    = "SELECT * FROM " . TABLE_PREFIX . "themes WHERE type='".MOBILE_DEVICE."' ORDER BY title ASC";
$result = mysql_query($sql, $db);
print_data_table($result, MOBILE_DEVICE);
?>

<?php function print_data_table($result, $type) {
	if (@mysql_num_rows($result) == 0) return;
?>
<h3><?php if ($type == DESKTOP_DEVICE) echo _AT('themes_for_desktop'); else echo _AT('themes_for_mobile');?></h3><br />
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get" name="form_<?php echo $type; ?>">
<input type="hidden" name="type" value="<?php echo $type; ?>" />
<table class="data" summary="" rules="cols">
<thead>
<tr>
	<th scope="col">&nbsp;</th>
	<th scope="col"><?php echo _AT('title'); ?></th>
	<th scope="col"><?php echo _AT('status'); ?></th>
	<th scope="col"><?php echo _AT('version'); ?></th>
Example #2
0
    echo _AT('import');
    ?>
" />
		</div>
	</div>
	</form>
	<br />
<?php 
}
$sql = "SELECT * FROM %sthemes WHERE type='%s' ORDER BY title ASC";
$rows_desktop = queryDB($sql, array(TABLE_PREFIX, DESKTOP_DEVICE));
print_data_table($rows_desktop, DESKTOP_DEVICE);
echo '<br /><br />';
$sql = "SELECT * FROM %sthemes WHERE type='%s' ORDER BY title ASC";
$rows_mobile = queryDB($sql, array(TABLE_PREFIX, MOBILE_DEVICE));
print_data_table($rows_mobile, MOBILE_DEVICE);
?>

<?php 
function print_data_table($rows_themes, $type)
{
    if (count($rows_themes) == 0) {
        return;
    }
    ?>
<h3><?php 
    if ($type == DESKTOP_DEVICE) {
        echo _AT('themes_for_desktop');
    } else {
        echo _AT('themes_for_mobile');
    }