Exemple #1
0
    echo $product['latestprice'];
    ?>
 <?php 
    echo $product['arrow'];
    ?>
</td>
				<td><a href="<?php 
    echo $product['longurl'];
    ?>
" target="_blank">Link</a></td>
				<td><?php 
    echo gmtimestamp($product['addedon']);
    ?>
</td>
				<td><?php 
    echo gmtimestamp($product['lastupdate']);
    ?>
</td>
				<td>
					<form method="post" action="">
						<input type="hidden" name="code" value="<?php 
    echo $product['code'];
    ?>
" />
						<div class="btn-group btn-group-xs" role="group" aria-label="...">
							<button type="submit" class="btn btn-primary" name="submit_product_update">Update &#163;</button>
							<button type="submit" class="btn btn-danger" name="submit_product_delete">Delete</button>
						</div>
					</form>
				</td>
			</tr>
Exemple #2
0
<?php

/* SUBMITS
================================= */
// print_r($post);
if (isset($post['submit_db_file'])) {
    if (isset($files) && $files) {
        $tmp_name = $files["db_file"]["tmp_name"];
        $db_file = "DB_DIR" . gmtimestamp(timestamp()) . "_db.sqlite";
        $dest_file = constant("DB_DIR") . gmtimestamp(timestamp()) . "_db.sqlite";
        if (move_uploaded_file($tmp_name, $dest_file)) {
            $settings_array = $settings->allSettings();
            $settings_array['database_file'] = $db_file;
            $settings->write_php_ini($settings_array);
        }
    }
}
if (isset($post['submit_restoreDefaultDB'])) {
    $settings->restoreDefaultDB();
}
if (isset($post['submit_productsPerPage'])) {
    if (isset($post['productsPerPage']) && $post['productsPerPage']) {
        $productsPerPage = (int) $post['productsPerPage'];
        if ($productsPerPage < 2) {
            $productsPerPage = 2;
        }
        $changeppp = $settings->productsPerPage($productsPerPage);
    }
}
/*  ================================  */
$head['title'] = 'Settings';