Exemplo n.º 1
0
<?php

if (isset($profile_uname)) {
    $user = $profile_uname;
} else {
    $user = $uname;
}
displayTags($user);
function displayTags($user)
{
    global $connection;
    $query = "SELECT tag_cloud FROM user ";
    $query .= "WHERE user.uname = '{$user}'";
    $result = mysqli_query($connection, $query);
    //confirm_query($result);
    while ($row = mysqli_fetch_assoc($result)) {
        $csv_tag_cloud = $row["tag_cloud"];
        if (!empty($csv_tag_cloud)) {
            $tag_cloud = explode(",", $csv_tag_cloud);
            for ($n = 0; $n < count($tag_cloud); $n++) {
                echo $tag_cloud[$n] . "&nbsp;&nbsp;&nbsp;";
            }
        } else {
            echo $user . " has not saved any tags yet.";
        }
    }
}
Exemplo n.º 2
0
echo _('Back to experiments listing');
?>
</a></menu>

<section class='box' id='main_section' style='border-left: 6px solid #<?php 
echo $experiment['color'];
?>
'>
    <img class='align_right' src='img/big-trash.png' title='delete' alt='delete' onClick="deleteThis('<?php 
echo $id;
?>
','exp', 'experiments.php')" />

    <?php 
// TAGS
echo displayTags('experiments', $id);
?>

    <!-- BEGIN EDITXP FORM -->
    <form id="editXP" method="post" action="app/editXP-exec.php" enctype='multipart/form-data'>
    <input name='item_id' type='hidden' value='<?php 
echo $id;
?>
' />

    <div class='row'>

        <div class='col-md-4'>
            <img src='img/calendar.png' class='bot5px' title='date' alt='calendar' />
            <label for='datepicker'><?php 
echo _('Date');
Exemplo n.º 3
0
    $table_tags = array();
    $databaseName = "jmd57";
    $serverName = 'sql.njit.edu';
    $userName = '******';
    $password = '******';
    // create connection
    $connection = mysql_connect($serverName, $userName, $password);
    if (!$connection) {
        die(' Could not connect: ' . mysql_error());
    }
    // select database
    if (!mysql_select_db($databaseName, $connection)) {
        die('Could not select database');
    }
    $sql = "SELECT * FROM Tags;";
    $db_table_events = mysql_query($sql, $connection);
    if (!$db_table_events) {
        $data['status'] = 404;
        echo "json_encode({$data})";
        exit;
    }
    while ($row = mysql_fetch_assoc($db_table_events)) {
        if (!in_array($row['tag'], $table_tags['tags'])) {
            $table_tags['tags'][] = $row['tag'];
        }
    }
    $response = json_encode($table_tags);
    echo $response;
}
displayTags();
Exemplo n.º 4
0
// BEGIN CONTENT
?>
<script src='js/tinymce/tinymce.min.js'></script>
<section class='box' style='border-left: 6px solid #<?php 
echo $data['bgcolor'];
?>
'>
    <!-- TRASH -->
    <img class='align_right' src='img/big-trash.png' title='delete' alt='delete' onClick="deleteThis('<?php 
echo $id;
?>
','item', 'database.php')" />

    <?php 
// TAGS
echo displayTags('items', $id);
?>

    <!-- BEGIN 2ND FORM -->
    <form method="post" action="app/editDB-exec.php" enctype='multipart/form-data'>
    <!-- STAR RATING via ajax request -->
    <div class='align_right'>
    <input id='star1' name="star" type="radio" class="star" value='1' <?php 
if ($data['rating'] == 1) {
    echo "checked=checked ";
}
?>
/>
    <input id='star2' name="star" type="radio" class="star" value='2' <?php 
if ($data['rating'] == 2) {
    echo "checked=checked ";
Exemplo n.º 5
0
function displayPeople($uid, $pid)
{
    ?>
    <table>
        <?php 
    displayAuthors($uid, $pid);
    ?>
        <?php 
    displaySpoiled($uid, $pid);
    ?>
        <?php 
    if (USING_ROUND_CAPTAINS) {
        displayRoundCaptain($uid, $pid);
    }
    ?>
        <?php 
    displayEditors($uid, $pid);
    ?>
        <?php 
    if (USING_APPROVERS) {
        displayApprovers($uid, $pid);
    }
    ?>
        <?php 
    displayFactcheckers($uid, $pid);
    ?>
        <?php 
    displayTags($uid, $pid);
    ?>
        <?php 
    if (canSeeTesters($uid, $pid)) {
        displayTesters($uid, $pid);
    }
    ?>
        <?php 
    displayTestingAdmin($uid, $pid);
    ?>
    </table>
<?php 
}
<?php

$autoloader = (require __DIR__ . '/../vendor/autoload.php');
use GithubService\GithubArtaxService\GithubService;
use Amp\Artax\Client as ArtaxClient;
use ArtaxServiceBuilder\ResponseCache\NullResponseCache;
use GithubService\Model\Tags;
use GithubService\AuthToken\NullToken;
function displayTags(Tags $repoTags)
{
    foreach ($repoTags as $nextRepoTag) {
        echo "Found tag: " . $nextRepoTag->name . "\n";
    }
}
$github = new GithubService(new ArtaxClient(), \Amp\reactor(), new NullResponseCache(), 'Danack/GithubArtaxService');
echo "Tags on first page:\n";
//Get the first page of data
$command = $github->listRepoTags(new NullToken(), 'php', 'php-src');
$repoTags = $command->execute();
displayTags($repoTags);
<?php

require_once "1_ListRepositoryTags.php";
use GithubService\AuthToken\NullToken;
// This example follows on from example 1
/** @var $github GithubService\GithubArtaxService\GithubService */
/** @var $repoTags GithubService\Model\Tags  */
echo "Following pagination:\n";
// All github services are paged with RFC 5988 https://tools.ietf.org/html/rfc5988
// I don't think this is great for an api. It's fine for web content, where there
// is no clear mapping from input to output, but for a defined api, it seems not great.
if ($repoTags->pager) {
    $pages = $repoTags->pager->getAllKnownPages();
    foreach ($pages as $page) {
        echo "Page: " . $page . "\n";
        $command = $github->listRepoTagsPaginate(new NullToken(), $page);
        $nextRepoTags = $command->execute();
        displayTags($nextRepoTags);
    }
}