Beispiel #1
0
    if (preg_match("/^[0-9a-zA-Z_-]+\$/", $_GET['list'])) {
        $list = $_GET['list'];
    } else {
        die("You must provide a valid list!");
    }
}
//----------------------------------------------------------------------
// Connect to MySQL server
//----------------------------------------------------------------------
// MySQL Connection
$db = new mysqli('localhost', $username, $password, $database);
if ($db->connect_errno > 0) {
    die('Unable to connect to database [' . $db->connect_error . ']');
}
// Check list
$lists = getAllLists($db);
//----------------------------------------------------------------------
// Compile XML (for API)
//----------------------------------------------------------------------
if ($list != "NA") {
    if (!in_array($list, $lists)) {
        die("This list does not exist!");
    }
    $data = getAllRecords($db, $list);
    header('Content-Type: application/xml; charset=utf-8');
    echo '<?xml version="1.0" encoding="utf-8" ?>' . "\n";
    echo '<?xml-stylesheet type="text/xsl" href="/show.xsl" ?>' . "\n";
    echo '<qalist name="' . $list . '" updated="' . $date . " " . $time . '" >' . "\n";
    // Entries
    foreach ($data as $key => $row) {
        echo '<entry id="' . $row['id'] . '">' . "\n";
Beispiel #2
0
<?php

require_once 'parts.php';
require_once 'model.php';
?>

<?php 
$lists = getAllLists();
/*$lists=array(
        array("name"=>"10 best tools for lean startups", "creator"=>"Rafael Dahis", "dateCreated"=>"2012-11-10", "introduction"=>"this list bla bla bla", "creatorTwitter"=>"rafaeldahis", "creatorTitle"=>"creator of TuneYourStartup", "slug"=>"10-best-tools-for-lean-startups"),
        array("name"=>"10 best tools for lean startups", "creator"=>"Rafael Dahis", "dateCreated"=>"2012-11-10", "introduction"=>"this list bla bla bla", "creatorTwitter"=>"rafaeldahis", "creatorTitle"=>"creator of TuneYourStartup", "slug"=>"10-best-tools-for-lean-startups")
        );
*/
?>
 


<?php 
$title = "Lists of Startup Tools and Resources";
$description = "Tools to help you build, run and grow a startup: ";
get_header($title, $description);
?>

<script>mixpanel.track("All Lists Page");</script>

<?php 
printHeroUnit();
?>
<div class="container"><br/></div>