if (array_key_exists('region', $_GET)) { $regione_richiesta = $_GET['region']; } else { # leggo il terzo livello per recuperare la regione richiesta $livelli_del_dominio = explode('.', $_SERVER['HTTP_HOST']); $regione_richiesta = $livelli_del_dominio[0]; } if (array_key_exists($regione_richiesta, $elenco_regioni)) { $regione = $elenco_regioni[$regione_richiesta]; $db_file = "{$regione_richiesta}.txt"; $db_regione = file("./db/{$db_file}", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); $title = 'Tutte le aziende opensource nella regione ' . $regione; } else { header("location: " . $main_url); } do_head($title); ?> <h1><?php echo $title; ?> </h1> <div id="center"> <table id="lugListTable"> <thead> <tr> <th>Provincia</th> <th>Denominazione</th> <th>Sito</th> <th>Keywords</th>
<?php require_once 'varie.php'; do_head('Lista completa delle aziende', array('js/jquery.dataTables.min.js', 'js/lista.js')); ?> <div> <?php $db_regione = array(); foreach ($elenco_regioni as $shortfile => $name) { $file = file("./db/{$shortfile}.txt", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); foreach ($file as &$row) { $row = "{$shortfile}|{$name}|{$row}"; } $db_regione = array_merge($db_regione, $file); } sort($db_regione); ?> <div class="description"> <p> Ci sono <?php echo count($db_regione); ?> aziende opensource in Italia. </p> <p> Probabilmente, almeno una di queste è vicina al tuo ufficio. </p> </div>
function editTerm() { global $db, $prefix; if (isset($_POST['submit'])) { $sql = "UPDATE " . $prefix . "_hosting_order_term\r\n\t\t\tSET discount = '" . $_POST['PostDiscount'] . "',\r\n\t\t\t\tterm = '" . $_POST['PostTerm'] . "',\r\n\t\t\t\tsetupfee = '" . $_POST['PostSetup'] . "'\r\n\t\t\tWHERE id = '" . $_POST['id'] . "'"; if ($result = $db->sql_query($sql)) { header("Location: admin.php?op=Order&action=editOrder&id=" . $_POST['pid']); } else { echo "Error: This could not be done."; } } else { do_head(); OpenTable(); $sql = "SELECT id, pid, term, setupfee, discount FROM " . $prefix . "_hosting_order_term WHERE id = '" . $_GET['id'] . "'"; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); ?> <center><form action="admin.php?op=Order&action=editTerm&id=<?php echo $row['id']; ?> " method="post"> <input type="hidden" name="pid" value="<?php echo $row['pid']; ?> "> <input type="hidden" name="id" value="<?php echo $row['id']; ?> "> <b><strong>· Edit Term ·</strong></b><br><br> <table width="50%"><tr><td align="right"> Term (In Months): </td><td align="left"><input type="text" name="PostTerm" value="<?php echo $row['term']; ?> " style="width:200;"></td></tr><tr><td align="right"> Discount (In %): </td><td align="left"><input type="text" name="PostDiscount" value="<?php echo $row['discount']; ?> " style="width:200;"></td></tr><tr><td align="right"> Setup Fee: </td><td align="left"><input type="text" name="PostSetup" value="<?php echo $row['setupfee']; ?> " style="width:200;"></td></tr><tr><td colspan="2" align="right"> <br>[<a href="admin.php?op=Order&action=delTerm&id=<?php echo $row['id']; ?> &sid=<?php echo $_GET['sid']; ?> ">Delete</a>] <input type="submit" name="submit" value="Submit" style="width=70;"></td></tr></table> </form></center> <?php CloseTable(); include "footer.php"; } }
<?php if ($_SERVER['HTTP_HOST'] != 'businessmap.it' && $_SERVER['HTTP_HOST'] != 'www.businessmap.it') { $domain = explode('.', $_SERVER['HTTP_HOST']); $host = $domain[0]; switch ($host) { default: include 'visualizza-regione.php'; break; } exit(0); } require_once 'varie.php'; do_head('Homepage', array('http://openlayers.org/api/OpenLayers.js', 'js/mappa.js')); $transformed = false; if (array_key_exists('zoom', $_GET)) { $found = false; $contents = file('dati.txt', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); foreach ($contents as $row) { list($lat, $lon, $lug, $useless) = explode("\t", $row, 4); if ($lug == $_GET['zoom']) { $found = true; break; } } if ($found == true) { $transformed = true; ?> <input type="hidden" name="zooming_lat" value="<?php echo $lat;
<?php require_once 'varie.php'; do_head("Cos'è BusinessMap"); ?> <div> <div class="description-plain"> <h3>Cos'è BusinessMap?</h3> <p> BusinessMap.it è la mappa delle aziende che offrono servizi e competenze su Linux e su prodotti opensource. Scopo dell'iniziativa è costruire un indice non necessariamente esaustivo ma utile per tutti coloro che cercano figure professionali cui appoggiarsi per godere dei vantaggi del software libero anche presso la propria attività. </p> <p> Chi invece cerca supporto domestico, o più semplicemente altri utenti linuxari con cui scambiare opinioni ed idee, può fare riferimento a <a href="http://lugmap.it/">LugMap.it</a> </p> <h3>I dati sono accessibili in formato raw?</h3> <p> Il sito viene periodicamente aggiornato sulla base di un <a href="https://github.com/madbob/BusinessMap">repository GitHub</a>