Example #1
0
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Crows.  If not, see <http://www.gnu.org/licenses/>.
 *  */


include_once('config2.php');
include_once('common.php');

//mobile detection
include('mobile_device_detect.php');
if(array_key_exists('nomobile', $_GET) && !($_GET['nomobile'])) { mobile_device_detect(true,true,true,true,true,true,'mobile/index.php',false); }

send_cache_headers($index_ttl);

?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-loose.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN" lang="EN"> 

<head>
	<title><?php 
echo $page_title;
?>
</title>
	
	<meta name="description" content="<?php 
echo $page_description;
?>
" />
	<meta name="keywords" content="<?php 
Example #2
0
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Crows is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Crows.  If not, see <http://www.gnu.org/licenses/>.
 *  */


include_once('../config.php');
include('../common.php');
send_cache_headers($youtube_ttl);

if($result = cache_fetch("youtube-data")) {
        print $result;
        exit;
}

$curl = curl_init();

$youtube_api_url=$youtube_api_url.'&alt=json&orderby='.$youtube_orderby;
curl_setopt ($curl, CURLOPT_URL,$youtube_api_url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec ($curl);
curl_close ($curl);

cache_store("youtube-data",$result,$youtube_ttl);
Example #3
0
<html>
<?php 
require '../include/mellivora.inc.php';
login_session_refresh();
send_cache_headers('home', CONFIG_CACHE_TIME_HOME);
head('Home');
if (cache_start('home', CONFIG_CACHE_TIME_HOME)) {
    require CONFIG_PATH_THIRDPARTY . 'nbbc/nbbc.php';
    $bbc = new BBCode();
    $bbc->SetEnableSmileys(false);
    section_subhead('PicoCTF Integrated Challenge');
    cache_end('home');
}
?>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
    <meta name="description" content="CTF Platform">
    <link href="css/game.css" rel="stylesheet" media="screen">
    <link href="lib/dark-hive/jquery-ui-1.10.2.custom.css" rel="stylesheet" media="screen">
</head>

<body>
<div class="container-narrow">
    <div class="container-narrow">
        <div class="row-fluid">
            <div class="span12">
                <div id="canvaswrapper">
                    <div id="problemdisplay">
                        <div id="problemhintdialog" title="Hint" display="none"></div>
                        <div id="problemcontent"></div>
Example #4
0
<?php

require '../include/ctf.inc.php';
login_session_refresh();
send_cache_headers('scores', CONFIG_CACHE_TIME_SCORES);
head(lang_get('scoreboard'));
if (cache_start(CONST_CACHE_NAME_SCORES, CONFIG_CACHE_TIME_SCORES)) {
    $now = time();
    echo '
    <div class="row">
        <div class="col-lg-6">';
    $user_types = db_select_all('user_types', array('id', 'title'));
    // no user types
    if (empty($user_types)) {
        section_head(lang_get('scoreboard'), '<a href="' . CONFIG_SITE_URL . 'json?view=scoreboard">
                <img src="' . CONFIG_SITE_URL_STATIC_RESOURCES . 'img/json.png" title="View json" alt="json" class="discreet-inline small-icon" />
            </a>', false);
        $scores = db_query_fetch_all('
            SELECT
               u.id AS user_id,
               u.team_name,
               co.id AS country_id,
               co.country_name,
               co.country_code,
               SUM(c.points) AS score,
               MAX(s.added) AS tiebreaker
            FROM users AS u
            LEFT JOIN countries AS co ON co.id = u.country_id
            LEFT JOIN submissions AS s ON u.id = s.user_id AND s.correct = 1
            LEFT JOIN challenges AS c ON c.id = s.challenge
            WHERE u.competing = 1
Example #5
0
 * Crows is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Crows.  If not, see <http://www.gnu.org/licenses/>.
 *  */


include_once('../config.php');
include_once('../common.php');

$page=!empty($_POST['page']) ? $_POST['page'] : 1;

send_cache_headers($flickr_ttl);


$flickr_request_url = $flickr_api_url.'&format=json&page='.$page;

if($result = cache_fetch($flickr_request_url)) {
	print $result;
	exit;
}

$curl = curl_init();
curl_setopt ($curl, CURLOPT_URL,$flickr_request_url);
curl_setopt ($curl, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec ($curl);
curl_close ($curl);
Example #6
0
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Crows is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Crows.  If not, see <http://www.gnu.org/licenses/>.
 *  */


include_once('../config.php');
include('../common.php');
send_cache_headers($twitter_ttl);


header("Content-type: text/json");


$searchterm=$_POST['searchterm'];
$page=$_POST['page'];


$twitterquery='http://search.twitter.com/search.json?q='.urlencode($searchterm).'&rpp=100&page='.$page;
if($result = cache_fetch($twitterquery)) {
        print $result;
        exit;
}
Example #7
0
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Crows is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Crows.  If not, see <http://www.gnu.org/licenses/>.
 *  */


include('../config.php');
include('../common.php');
send_cache_headers($podcast_ttl);

if($result = cache_fetch("podcast-proxy")) {
        print $result;
        exit;
}

header("Content-type: text/xml");

$curl = curl_init();
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.7'));  
curl_setopt ($curl, CURLOPT_URL,$podcast_feed_url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec ($curl);
curl_close ($curl);
$result=str_replace('media:','',$result);