Пример #1
0
    if ($place != 'all') {
        $sql_query = "SELECT * FROM `{$table}` WHERE place='{$place}'";
        $results = mysql_query($sql_query);
        if (mysql_num_rows($results) == 0) {
            Header("Location: {$url}?q=" . urlencode($place) . "&place=notfound");
            exit;
        }
        $row = mysql_fetch_assoc($results);
        $zoom = 13;
    } else {
        $row['place'] = 'All of Philippines';
        $row['lat'] = 13;
        $row['lng'] = 123;
        $zoom = 6;
    }
    htmlheader('View Map of ' . $row['place'], 'View Map of ' . $row['place'], $row['place']);
}
$width = 980;
$height = 550;
?>

<div style="float:right;" id="xlink"></div>
<?php 
if ($row['place'] != 'All of Philippines') {
    ?>
	<table cellpadding="5" cellspacing="3">
		<tr><td><b>Description:</b></td><td><?php 
    echo $row['osmdesc'];
    ?>
</td></tr>
		<tr><td><b>Last Updated:</b></td><td><?php 
Пример #2
0
<?php

include '../includes/functions.php';
echo htmlheader("Follo • Team report", "../includes/main.css");
$totdaysofcurrentmonth = cal_days_in_month(CAL_GREGORIAN, date(m), date(Y));
$monthtextual = date(F);
$textualdate = "1 " . $monthtextual . " " . date(Y);
$timespanofgivenmonth = strtotime($textualdate);
$firstdayofmonth = date(w, $timespanofgivenmonth);
// 1 Monday
// 2 Tuesday
// 3 Wednesday
// 4 Thursday
// 5 Friday
// 6 Saturday
// 0 Sunday
$number = 31;
if (is_int($number / 7)) {
    $numberofweek = $number / 7;
} else {
    $numberofweek = (int) ($number / 7) + 1;
}
echo $numberofweek;
// echo (int)(30/7);
// for ($sem=0; $sem < ((int)($totdaysofcurrentmonth/7))+1; $sem++) {
// 	for ($jou=0; $jou < 7; $jou++) {
// 		$e=$e+1;
// 		$montharray[$sem][$jou]=$e;
// 	}
// }
// print_r($montharray);
Пример #3
0
function getdbcfg(){
	global $uc_dbcharset,$uc_dbhost,$uc_dbuser,$uc_dbpw,$uc_dbname,$uc_tablepre,$dbhost, $dbuser, $dbpw, $dbname, $dbcfg, $whereis, $cfgfile, $tablepre, $dbcharset,$dz_version,$ss_version,$uch_version;
	if(@!include($cfgfile)) {
			htmlheader();
			cexit("<h4>请先上传config文件以保证您的数据库能正常链接!</h4>");
	}
	if(UC_DBHOST) {
		$uc_dbhost = UC_DBHOST;
		$uc_dbuser = UC_DBUSER;
		$uc_dbpw = UC_DBPW;
		$uc_dbname = UC_DBNAME;	
		$uc_tablepre =  UC_DBTABLEPRE;
		$uc_dbcharset = UC_DBCHARSET;
	}
	switch($whereis) {
		case 'is_dz':
			$dbhost = $dbhost;
			$dbuser = $dbuser;
			$dbpw = $dbpw;
			$dbname = $dbname;	
			$tablepre =  $tablepre;
			$dbcharset = !$dbcharset ? (strtolower($charset) == 'utf-8' ? 'utf8' : $charset): $dbcharset;
			define('IN_DISCUZ',true);
			@require_once "./discuz_version.php";
			$dz_version = DISCUZ_VERSION;
			if($dz_version >= '7.1') {
				$dz_version = intval(str_replace('.','',$dz_version)).'0';
			} else {
				$dz_version = intval(str_replace('.','',$dz_version));
				}
			break;
		case 'is_uc':
			$dbhost = UC_DBHOST;
			$dbuser = UC_DBUSER;
			$dbpw = UC_DBPW;
			$dbname = UC_DBNAME;	
			$tablepre =  UC_DBTABLEPRE;
			$dbcharset = !UC_DBCHARSET ? (strtolower(UC_CHARSET) == 'utf-8' ? 'utf8' : UC_CHARSET) : UC_DBCHARSET;
			break;
		case 'is_uch':
			$dbhost = $_SC["dbhost"];
			$dbuser = $_SC["dbuser"];
			$dbpw = $_SC["dbpw"];
			$dbname = $_SC["dbname"];	
			$tablepre =  $_SC["tablepre"];
			if(file_exists("./ver.php")) {
				require './ver.php';
				$uch_version = X_VER;
			} else {
				$common = 'common.php';
				$version = fopen($common,'r');
				$version = fread($version,filesize($common));
				$len = strpos($version,'define(\'D_BUG\')');
				$version = substr($version,0,$len);
				$cache = fopen('./data/version.php','w');
				fwrite($cache,$version);
				fclose($cache);
				require_once './data/version.php';
				$uch_version = intval(str_replace('.','',X_VER));
				unlink('./data/version.php');
			}		
			$uch_version = intval(str_replace('.','',$uch_version));
			$dbcharset = !$_SC['dbcharset'] ? (strtolower($_SC["charset"]) == 'utf-8' ? 'utf8' : $_SC["charset"]) : $_SC['dbcharset'] ;
			break;
		case 'is_ss':
			$dbhost = $dbhost ? $dbhos : $_SC['dbhost'];
			$dbuser = $dbuser ? $dbuser : $_SC['dbuser'];
			$dbpw = $dbpw ? $dbpw : $_SC['dbpw'];
			$dbname = $dbname ? $dbname : $_SC['dbname'];	
			$tablepre =  $tablepre ? $tablepre : $_SC['tablepre'];
			$dbcharset = !$dbcharset ? (strtolower($charset) == 'utf-8' ? 'utf8' : $charset) : $dbcharset;
			if(!$dbcharset) {
				$dbcharset = !$_SC['dbcharset'] ? (strtolower($_SC['charset']) == 'utf-8' ? 'utf8' : $_SC['charset']) : $_SC['dbcharset'];			
			}
			if($_SC['dbhost'] || $_SC['dbuser']) {
				$common = 'common.php';
				$version = fopen($common,'r');
				$version = fread($version,filesize($common));
				$len = strpos($version,'define(\'S_RELEASE\'');
				$version = substr($version,0,$len);
				$cache = fopen('./data/version.php','w');
				fwrite($cache,$version);
				fclose($cache);
				require_once './data/version.php';
				$ss_version = intval(str_replace('.','',S_VER));
				unlink('./data/version.php');
			}
			break;
		default:
			$dbhost = $dbuser = $dbpw = $dbname = $tablepre = $dbcharset = '';
			break;
	}
}
Пример #4
0
<?php

## $Id$
require '.config.php';
require 'fx.inc.php';
ob_start('ob_tidyhandler');
httpheader();
echo htmlheader('travelrun -- drug information', usercss());
echo '<div class="drugnav">Go back to the <a href="index.php">start page</a>.</div>';
// open the database connection
$conn = mysql_connect(SQL_HOST, SQL_USER, SQL_PASS) or die(mysql_error());
mysql_select_db(SQL_DATA);
// get the data
$drugs = array();
$sql = <<<SQL_DRUGS
select stock.item, item.itemname, stock.country, country.countryname, stock.utctime, stock.price, stock.quantity
from stock, lastdrugs, item, country
where stock.item = lastdrugs.item
  and stock.item = item.itemid
  and stock.country = country.countryid
  and stock.country = lastdrugs.country
  and stock.utctime = lastdrugs.lastutc
order by item.itemname, stock.price
SQL_DRUGS;
$res = mysql_query($sql) or die(mysql_error());
while ($row = mysql_fetch_row($res)) {
    $drugs[] = array($row[0], $row[1], $row[2], $row[3], $row[4], $row[5], $row[6]);
}
mysql_free_result($res);
mysql_close($conn);
echo '<div class="drugdata">';
Пример #5
0
<?php

## $Id: $
require '.config.php';
require 'fx.inc.php';
ob_start('ob_tidyhandler');
httpheader();
echo htmlheader('travelrun -- flower information', usercss());
echo '<div class="drugnav">Go back to the <a href="index.php">start page</a>.</div>';
// open the database connection
$conn = mysql_connect(SQL_HOST, SQL_USER, SQL_PASS) or die(mysql_error());
mysql_select_db(SQL_DATA);
// get the data
$flowers = array();
$sql = <<<SQL_FLOWERS
select stock.item, item.itemname, stock.country, country.countryname, stock.utctime, stock.price, stock.quantity
from stock, lastflowers, item, country
where stock.item = lastflowers.item
  and stock.item = item.itemid
  and stock.country = country.countryid
  and stock.country = lastflowers.country
  and stock.utctime = lastflowers.lastutc
order by stock.utctime
SQL_FLOWERS;
$res = mysql_query($sql) or die(mysql_error());
while ($row = mysql_fetch_row($res)) {
    $flowers[] = array($row[0], $row[1], $row[2], $row[3], $row[4], $row[5], $row[6]);
}
mysql_free_result($res);
mysql_close($conn);
echo '<div class="drugdata">';
Пример #6
0
<?php

## $Id: $
require '.config.php';
require 'fx.inc.php';
ob_start('ob_tidyhandler');
httpheader();
echo htmlheader('travelrun -- all items information', usercss());
echo '<div class="drugnav">Go back to the <a href="index.php">start page</a>.</div>';
// open the database connection
$conn = mysql_connect(SQL_HOST, SQL_USER, SQL_PASS) or die(mysql_error());
mysql_select_db(SQL_DATA);
// get the data
$itemall = array();
$sql = <<<SQL_ITEMALL
select s.utctime, country.countryname, item.itemname, s.quantity, s.price

from stock s
   , (select max(utctime) as mt, country, item from stock where manual = 0 group by country, item) smax
   , country
   , item

where s.utctime = smax.mt
  and s.country = smax.country
  and s.item = smax.item
  and s.country = country.countryid
  and s.item = item.itemid
  and s.manual = 0
SQL_ITEMALL;
if (isset($_GET['f']) && trim($_GET['f']) != '') {
    $safefilter = mysql_real_escape_string($_GET['f']);
Пример #7
0
<?php

## $Id: $
require '.config.php';
require 'fx.inc.php';
ob_start('ob_tidyhandler');
httpheader();
echo htmlheader('travelrun -- plushie information', usercss());
echo '<div class="drugnav">Go back to the <a href="index.php">start page</a>.</div>';
// open the database connection
$conn = mysql_connect(SQL_HOST, SQL_USER, SQL_PASS) or die(mysql_error());
mysql_select_db(SQL_DATA);
// get the data
$plushies = array();
$sql = <<<SQL_PLUSHIES
select stock.item, item.itemname, stock.country, country.countryname, stock.utctime, stock.price, stock.quantity
from stock, lastplushies, item, country
where stock.item = lastplushies.item
  and stock.item = item.itemid
  and stock.country = country.countryid
  and stock.country = lastplushies.country
  and stock.utctime = lastplushies.lastutc
order by stock.utctime
SQL_PLUSHIES;
$res = mysql_query($sql) or die(mysql_error());
while ($row = mysql_fetch_row($res)) {
    $plushies[] = array($row[0], $row[1], $row[2], $row[3], $row[4], $row[5], $row[6]);
}
mysql_free_result($res);
mysql_close($conn);
echo '<div class="drugdata">';
Пример #8
0
<?php

## $Id: $
require '.config.php';
require 'fx.inc.php';
ob_start('ob_tidyhandler');
httpheader();
echo htmlheader('Travel Run: Flowers', usercss());
echo '<br><br>';
// open the database connection
$conn = mysql_connect(SQL_HOST, SQL_USER, SQL_PASS) or die(mysql_error());
mysql_select_db(SQL_DATA);
// get the data
$flowers = array();
$sql = <<<SQL_FLOWERS
select stock.item, item.itemname, stock.country, country.countryname, stock.utctime, stock.price, stock.quantity
from stock, lastflowers, item, country
where stock.item = lastflowers.item
  and stock.item = item.itemid
  and stock.country = country.countryid
  and stock.country = lastflowers.country
  and stock.utctime = lastflowers.lastutc
order by stock.utctime
SQL_FLOWERS;
$res = mysql_query($sql) or die(mysql_error());
while ($row = mysql_fetch_row($res)) {
    $flowers[] = array($row[0], $row[1], $row[2], $row[3], $row[4], $row[5], $row[6]);
}
mysql_free_result($res);
mysql_close($conn);
echo '<div class="drugdata">';
Пример #9
0
        $upk = $row[1];
    } else {
        $viewk += $row[1];
        $cvk[$row[0]] = $row[1];
    }
}
mysql_free_result($res);
// get first post of last page of flower thread
$sql = "select valint from config where configkey = 'LAST_FLOWER_PAGE'";
$res = mysql_query($sql) or die(mysql_error());
$lastflower = 20 * (mysql_result($res, 0, 0) - 1);
mysql_free_result($res);
// close the database connection
mysql_close($conn);
httpheader();
echo htmlheader('Travelrun: Home', usercss());
echo '<br><table width="100%" height="8" cellspacing="1" cellpadding="2"><tr bgcolor="#303030"><td style="padding-top: 10px;border-bottom-left-radius: 5px" align="center"><a href="index.php?c=m"><img src="images/48/Mexico.png" title="', $cvk['m'], ' views" alt="', $cvk['m'], ' views"></a></td><td style="padding-top: 10px" align="center"><a href="index.php?c=i"><img src="images/48/Cayman-Islands.png" title="', $cvk['i'], ' views" alt="', $cvk['i'], ' views"></a></td><td style="padding-top: 10px" align="center"><a href="index.php?c=c"><img src="images/48/Canada.png" title="', $cvk['c'], ' views" alt="', $cvk['c'], ' views"></a></td><td style="padding-top: 10px" align="center"><a href="index.php?c=h"><img src="images/48/Hawaii-Flag.png" title="', $cvk['h'], ' views" alt="', $cvk['h'], ' views"></a></td><td style="padding-top: 10px" align="center"><a href="index.php?c=u"><img src="images/48/United-Kingdom.png" title="', $cvk['u'], ' views" alt="', $cvk['u'], ' views"></a></td><td style="padding-top: 10px" align="center"><a href="index.php?c=a"><img src="images/48/Argentina.png" title="', $cvk['a'], ' views" alt="', $cvk['a'], ' views"></a></td><td style="padding-top: 10px" align="center"><a href="index.php?c=s"><img src="images/48/Switzerland.png" title="', $cvk['s'], ' views" alt="', $cvk['s'], ' views"></a></td><td style="padding-top: 10px" align="center"><a href="index.php?c=j"><img src="images/48/Japan.png" title="', $cvk['j'], ' views" alt="', $cvk['j'], ' views"</a></td><td style="padding-top: 10px" align="center"><a href="index.php?c=x"><img src="images/48/China.png" title="', $cvk['x'], ' views" alt="', $cvk['x'], ' views"></a></td><td style="padding-top: 10px" align="center"><a href="index.php?c=e"><img src="images/48/United-Arab-Emirates.png" title="', $cvk['e'], ' views" alt="', $cvk['e'], ' views"></a></td><td style="padding-top: 10px" align="center"><a href="index.php?c=z"><img src="images/48/South-Africa.png" title="', $cvk['z'], ' views" alt="', $cvk['z'], ' views"></a></td><td align="center" style="padding-top: 10px;border-bottom-right-radius: 5px"><a href="itemall.php"><img src="images/48/item.png"></a></td></tr></table>';
echo '<div class="timeinfo">';
echo 'Current time is ', gmdate('Y-m-d H:i:s'), ' GMT.<br>';
echo 'Last update was made at ', $lastupdate, ' GMT for ', $lastcountry, '.';
echo '</div>';
echo '<hr>';
if (isset($_SESSION['recent_update'])) {
    echo '<div class="pub"><br><i>';
    echo 'If you want to ';
    echo '<a href="http://www.torn.com/forums.php#!p=threads&f=10&t=15907728&b=0&a=0&start=999999">';
    echo 'make a post in the ';
    echo 'flower thread and advertise travelrun</a>, you can use the ';
    echo 'code between the following lines:</i><br>';
    echo '================================================<br>';
    echo "{$_SESSION['recent_update']['qtd']} ";
Пример #10
0
<?php

// header("Refresh:120");//check history every 2 minutes
include '../includes/functions.php';
echo htmlheader("Fello • Next Sprint", "../includes/main.css");
echo topbar(".");
$boardlist = "https://api.trello.com/1/boards/56128e84b038bd3747a4687d/lists?cards=open&card_fields=name&fields=name&key=65c83fd020db39e2027c509a67587125&token=d8cfaa1f1f58a0e0b7d34befc2952cc26352a3e97c948bd9f80243377f98654e";
if (!empty(fetchdataonapi($boardlist))) {
    $obj = json_decode(fetchdataonapi($boardlist));
    echo "<div id='subtopbar'><center><h2>Cards candidates for next sprint</h2> Last update at " . date(H . '\\h' . i . '\\m' . s . '\\s') . "</center></div>";
    ?>
<div id="pagecontent">
	<div id="table">
		
<form method='POST' action='index.php'>
	<input type='submit' name='printfunction' value='Save a JSON copy'>
</form>

<?php 
    if (!empty($_POST['printfunction'])) {
        #Folder creation
        $now = date(Ymd_His);
        mkdir("./history/" . $now, 0700);
        #File creation into folder
        file_put_contents("./history/" . $now . '/' . $now . '_nextsprintcandidates.json', fetchdataonapi($boardlist));
        echo "A copy of the file has been created";
    }
    ?>

<table id="tablecontainer"><tr>
<?php 
Пример #11
0
 *
 * Written by Stefan Schöttler
 *   email: stefan.schoettler@haw-hamburg.de
 *
 * @category ToolsAndUtilities
 * @package Stadtleser
 * @author Stefan Schöttler
 * @copyright 2016 HAW-Hamburg
 * @version 1.0.0
 * @link http://
 */
session_start();
require './config/config.php';
require './config/texte.php';
require './helper.php';
htmlheader($title);
echo "<div class='logo'>";
echo $text_üeberschrift_logon;
echo $text_üeberschrift_logon2;
echo $text_logon;
echo " </div>";
echo "<h3>Login</h3>";
// Seite wurde mit logout aufgerufen
if (isset($_GET['out'])) {
    // destroy session
    session_unset();
    $_SESSION = array();
    unset($_SESSION['user'], $_SESSION['access']);
    session_destroy();
}
// Seite wurde mit Login aufgerufen
Пример #12
0
<?php

## $Id: $
require '.config.php';
require 'fx.inc.php';
ob_start('ob_tidyhandler');
httpheader();
echo htmlheader('Travelrun: Plushies', usercss());
echo '<br><br>';
// open the database connection
$conn = mysql_connect(SQL_HOST, SQL_USER, SQL_PASS) or die(mysql_error());
mysql_select_db(SQL_DATA);
// get the data
$plushies = array();
$sql = <<<SQL_PLUSHIES
select stock.item, item.itemname, stock.country, country.countryname, stock.utctime, stock.price, stock.quantity
from stock, lastplushies, item, country
where stock.item = lastplushies.item
  and stock.item = item.itemid
  and stock.country = country.countryid
  and stock.country = lastplushies.country
  and stock.utctime = lastplushies.lastutc
order by stock.utctime
SQL_PLUSHIES;
$res = mysql_query($sql) or die(mysql_error());
while ($row = mysql_fetch_row($res)) {
    $plushies[] = array($row[0], $row[1], $row[2], $row[3], $row[4], $row[5], $row[6]);
}
mysql_free_result($res);
mysql_close($conn);
echo '<div class="drugdata">';
Пример #13
0
<?php

## $Id$
require '.config.php';
require 'fx.inc.php';
ob_start('ob_tidyhandler');
httpheader();
echo htmlheader('Travelrun: Drugs', usercss());
echo '<br><br>';
// open the database connection
$conn = mysql_connect(SQL_HOST, SQL_USER, SQL_PASS) or die(mysql_error());
mysql_select_db(SQL_DATA);
// get the data
$drugs = array();
$sql = <<<SQL_DRUGS
select stock.item, item.itemname, stock.country, country.countryname, stock.utctime, stock.price, stock.quantity
from stock, lastdrugs, item, country
where stock.item = lastdrugs.item
  and stock.item = item.itemid
  and stock.country = country.countryid
  and stock.country = lastdrugs.country
  and stock.utctime = lastdrugs.lastutc
order by item.itemname, stock.price
SQL_DRUGS;
$res = mysql_query($sql) or die(mysql_error());
while ($row = mysql_fetch_row($res)) {
    $drugs[] = array($row[0], $row[1], $row[2], $row[3], $row[4], $row[5], $row[6]);
}
mysql_free_result($res);
mysql_close($conn);
echo '<div class="drugdata">';
Пример #14
0
<?php

include '../includes/functions.php';
echo htmlheader("Trellowup • Card detail", "../includes/main.css");
echo topbar(".");
$cardid = $_GET['card'];
$cardlife = "https://api.trello.com/1/cards/" . $cardid . "/actions?filter=moveCardToBoard,updateCard:idList&limit=300&key=65c83fd020db39e2027c509a67587125&token=d8cfaa1f1f58a0e0b7d34befc2952cc26352a3e97c948bd9f80243377f98654e";
?>



<?php 
if (!empty(fetchdataonapi($cardlife))) {
    $obj = json_decode(fetchdataonapi($cardlife));
    echo "<div id='subtopbar'><center><h2>" . $obj[0]->data->card->name . "</h2>Last update at " . date(H . '\\h' . i . '\\m' . s . '\\s') . "</center></div>";
    ?>
<div id="pagecontent">
	<div id="table1">
<table>

	<tr align='center'>
		<td width='120px'></td>
		<td width='150px'><b>TO DO</b></td>
		<td width='150px'><b>IN PROGRESS</b></td>
		<td width='150px'><b>TO REVIEW</b></td>
		<td width='150px'><b>TO TEST</b></td>
		<td width='150px'><b>DONE</b></td>
	</tr>

<?php 
    foreach ($obj as $eventcard) {
Пример #15
0
<?php

header("Refresh:300");
//check history every 5 minutes
include '../includes/functions.php';
echo htmlheader("Follo • Live stream Members Activity", "../includes/main.css");
// Get all members of the board
// https://api.trello.com/1/boards/561228dc16f33267799133c3/members?fields=avatarHash,fullName,username&key=65c83fd020db39e2027c509a67587125&token=d8cfaa1f1f58a0e0b7d34befc2952cc26352a3e97c948bd9f80243377f98654e
// Get all cards related to a member
// https://api.trello.com/1/boards/561228dc16f33267799133c3/members/---Member id---/cards?fields=name,dateLastActivity,shortUrl&members=true&member_fields=avatarHash,fullName,username,initials&list=true&list_fields=name&=false&attachments=true&attachment_fields=url&key=65c83fd020db39e2027c509a67587125&token=d8cfaa1f1f58a0e0b7d34befc2952cc26352a3e97c948bd9f80243377f98654e
// fet avatar pic :
// https://trello-avatars.s3.amazonaws.com/---avatarHash---/170.png
// $allboardmembers = "https://api.trello.com/1/boards/561228dc16f33267799133c3/members?fields=avatarHash,fullName,username&key=65c83fd020db39e2027c509a67587125&token=d8cfaa1f1f58a0e0b7d34befc2952cc26352a3e97c948bd9f80243377f98654e";
//BE CAREFUL HARDCODED MEMBERS HERE !
$allboardmembers = array(array("55fa6e5e938f433370d23bee", "0c87cc12e39c5380e132254b256996ee", "Gaelle", "gaelle94", "Gaelle"), array("52af2930541e94e652004b97", "85b7e13aa45f7e6d37fd6de7b5c45b6d", "Chris Dugne", "chrisdugne", "Chris"), array("563785a574b325ce5a2be94e", "a74f7b712ccfbca67e32fbfac1d6e7b7", "Eric Sampaio", "ericsampaio4", "Eric"), array("55faabb71fe9809f1bce6d07", "4cef9517087083d70cc068cbdae2e526", "Jeroen Engels", "jeroenengels", "Jeroen"), array("5609074552d59cd5ceb8c4c7", "1b272b008df77f21d0ae2ac91b8e9e64", "Thibaut Lambert", "t1b0", "Thibaut"), array("55fa7aac7d53f052afdbe763", "786a7ad823c02255c6773a0b54376f9c", "Arthur Weber", "goduuu", "Arthur"), array("55ed4db9b0a1d88b74782bed", "667cede4e2f5bc4a50c477622d95368f", "Loïc Calvy", "loiccalvy1", "Loic"), array("561276d36f767ef609f437b8", "28be9bea97879575a5a542491b1036fe", "Matthieu Harbonnier", "matthieuharbonnier", "Matthieu"));
echo "<div id='namelisting'><ul class='namelistingul'>";
foreach ($allboardmembers as $userlisting) {
    echo "<li class='namelistingli'><a href='#" . $userlisting[0] . "'>" . $userlisting[4] . "</a></li>";
}
echo "</ul></div>";
echo "<div id='memberactivitypagecontent'>";
foreach ($allboardmembers as $user) {
    // Get a member id
    echo "<div id='memberactivity'>";
    echo "<div id='fullusername'><a name=" . $user[0] . ">" . $user[2] . "</div>";
    echo "<img class='avatar' src='https://trello-avatars.s3.amazonaws.com/" . $user[1] . "/170.png'>";
    echo "<div id='username'>@" . $user[3] . "</div>";
    // Get all cards related to member id
    $urlapicardstoamember = cardsmemberurl($user[0]);
    $cardsassociatedtomember = json_decode(fetchdataonapi($urlapicardstoamember));
    foreach ($cardsassociatedtomember as $cardsmember) {
Пример #16
0
<?php

## $Id: $
require '.config.php';
require 'fx.inc.php';
ob_start('ob_tidyhandler');
httpheader();
echo htmlheader('Travelrun: All Items', usercss());
echo '<br><br>';
// open the database connection
$conn = mysql_connect(SQL_HOST, SQL_USER, SQL_PASS) or die(mysql_error());
mysql_select_db(SQL_DATA);
// get the data
$itemall = array();
$sql = <<<SQL_ITEMALL
select s.utctime, country.countryname, item.itemname, s.quantity, s.price

from stock s
   , (select max(utctime) as mt, country, item from stock where manual = 0 group by country, item) smax
   , country
   , item

where s.utctime = smax.mt
  and s.country = smax.country
  and s.item = smax.item
  and s.country = country.countryid
  and s.item = item.itemid
  and s.manual = 0
SQL_ITEMALL;
if (isset($_GET['f']) && trim($_GET['f']) != '') {
    $safefilter = mysql_real_escape_string($_GET['f']);
Пример #17
0
    # delete files starting with $cch
    $files = glob('images/' . $cch . '*');
    foreach ($files as $file) {
        if (is_file($file)) {
            unlink($file);
        }
    }
}
if ($prize) {
    $prizedate = gmdate('Y-m-d H:i:s');
    $prizecode = md5(PRIZE_PREFIX . $prizedate);
    $sql = "insert into prize (pdate, pcode, puser, pcountry) values ('{$prizedate}', '{$prizecode}', 0, '{$safe_country}')";
    mysql_query($sql) or die(mysql_error());
    mysql_close($conn);
    httpheader();
    echo htmlheader('travelrun -- prize', usercss());
    echo '<div class="prize">';
    echo '<h1>Congratulations!</h1>';
    echo '<h2>You have won a prize.</h2>';
    echo '<h3>send a in-game message to <a href="http://www.torn.com/profiles.php?XID=1757971">ebcdic</a> to reclaim it.</h3>';
    echo '<h3>include the prize date and code in the message</h3>';
    echo '<h3 style="text-align: center;"><pre>';
    echo 'date: ', $prizedate, "\n";
    echo 'code: ', $prizecode;
    echo '</pre></h3>';
    echo '<br><i>Prizes are in testing phase: they\'ll be small prizes :)</i>';
    echo '<br><br>';
    echo 'Back to <a href="index.php?c=', $cch, '">the regular travelrun page</a>.';
    echo '</div>';
    echo htmlfooter();
    exit(0);
Пример #18
0
<?php

include 'lib/misc.inc.php';
print htmlheader();
?>
    <body>
    <div id="title">Wiki Wide Web: Enter Web 3.0</div>
    
    <?php 
if (!isset($_SESSION['username'])) {
    ?>
    <div class="user"><form action="dosignup.php" method="post">
    Please fill out the information below:<br />
    Username: <input type="text" name="username" /><br />
    Password: <input type="password" name="password" /><br />
    E-mail: <input type="text" name="email" /><br />
    Invite Code: <input type="text" name="invite" value="<?php 
    print isset($_GET['invite']) ? $_GET['invite'] : '';
    ?>
" /><br />
    <input type="submit" value="Sign Up" /></form>
    </div>
    <?php 
} else {
    ?>
    <div class="user">Silly, you're already logged in!</div>
    <?php 
}
?>
    </body>
</html>
Пример #19
0
}
$scale = 1;
if (isset($_GET['scale'])) {
    $scale = 1 * $_GET['scale'];
}
if ($scale < 1) {
    $scale = 1;
}
if ($scale > 1000) {
    $scale = 1000;
}
#connect to database
$conn = mysql_connect(SQL_HOST, SQL_USER, SQL_PASS) or die(mysql_error());
mysql_select_db(SQL_DATA);
httpheader();
echo htmlheader('travelrun', usercss());
echo '<div class="mannav">';
echo 'Return to the <a href="index.php">start page</a>.';
echo '</div>';
echo '<div>';
echo '<form>';
echo '<label>Country: <select name=c>';
$sql = "select letter, countryname from country order by countryid";
$res = mysql_query($sql) or die(mysql_error());
while ($row = mysql_fetch_row($res)) {
    echo '<option value="', $row[0], '"';
    if ($row[0] == $cc) {
        echo ' selected';
    }
    echo '>', $row[1];
}
Пример #20
0
<?php

## $Id$
require '.config.php';
require 'fx.inc.php';
ob_start('ob_tidyhandler');
// open the database connection
$conn = mysql_connect(SQL_HOST, SQL_USER, SQL_PASS) or die(mysql_error());
mysql_select_db(SQL_DATA);
$sql = "select valint from config where configkey = 'LAST_FLOWER_PAGE'";
$res = mysql_query($sql) or die(mysql_error());
$last1st = mysql_result($res, 0, 0);
mysql_free_result($res);
mysql_close($conn);
httpheader();
echo htmlheader('TravelRun: Last Forum Page', usercss());
echo '<br><br><br><br>';
echo '<div class="updateform">';
echo '<form method="post" action="firstoflast2.php">';
echo '<label>Last page in the flower thread: <input type="text" value="', $last1st, '" name="last1st" size="4"><br></label>';
echo '<input type="submit" value="UPDATE"><br>';
echo '</form>';
echo '<br>For the example below, you\'d use 860 for the last page.<br>';
echo '<img src="860.jpg" alt="page navigation on torn">';
echo '</div>';
echo htmlfooter();
Пример #21
0
<?php

header("Refresh:3600");
//check history every 60 minutes
include '../includes/functions.php';
echo htmlheader("Follo • Burndown chart", "../includes/main.css");
echo topbar("..");
?>
<!-- amCharts javascript sources -->
		<script type="text/javascript" src="http://www.amcharts.com/lib/3/amcharts.js"></script>
		<script type="text/javascript" src="http://www.amcharts.com/lib/3/serial.js"></script>
		<script type="text/javascript" src="http://www.amcharts.com/lib/3/themes/light.js"></script>
<?php 
//$allboardcards = "https://api.trello.com/1/boards/561228dc16f33267799133c3/cards?fields=name,idList&key=65c83fd020db39e2027c509a67587125&token=d8cfaa1f1f58a0e0b7d34befc2952cc26352a3e97c948bd9f80243377f98654e";
$boardlistsandcards = "https://api.trello.com/1/boards/561228dc16f33267799133c3/lists?cards=open&card_fields=name&fields=name&key=65c83fd020db39e2027c509a67587125&token=d8cfaa1f1f58a0e0b7d34befc2952cc26352a3e97c948bd9f80243377f98654e";
$newfoldername = date(Y . '\\-' . m . '\\-' . d);
$filename = './' . $newfoldername . '/';
//IF FOLDER is not existing THEN CREATE IT
if (!file_exists($filename)) {
    ?>
	<!-- TO BE REMOVED WHEN CSS DONE -->
	<br><br><br><br>
	<!-- ## -->
	<h5>Sprint dates have not been set :</h5>
	<form method='POST' action='./form.php'>
		<input type='text' name='begindate' placeholder='yyyy-mm-dd'>
		<input type='text' name='enddate' placeholder='yyyy-mm-dd'>
		<input type='submit' value='Submit'>
	</form>
	
	<?php 
<?php

$x_IN_FILE = 1;
include 'functions.php';
htmlheader('Contact Us');
if ($_GET['got'] == 'it') {
    echo '<p>Thank you - your message has been received. You should receive a reply within three business days.</p>';
} else {
    if ($_GET['got'] == 'anerror') {
        echo '<blockquote><p>You <b>must</b> fill in all fields.</p></blockquote>';
    }
    ?>
<p>Please fill out the following form.</p>
<form action="/contact-form.php" method="post" name="Submit">

<table cellspacing="5">

<tr><td>Name: </td>

<td><input type="text" size="30" value="" name="nick" /></td></tr>

<tr><td>Email:</td>
<td><input type="text" size="30" value="" name="email" /></td></tr>

<tr><td valign="top">Message:</td><td>
<textarea name="message" rows="8" cols="40"></textarea></td></tr>

<tr>
<td></td>
<td><input type="submit" value="Send Message &raquo;" /></td></tr>
Пример #23
0
<?php

## $Id$
#require '.config.php';
require 'fx.inc.php';
ob_start('ob_tidyhandler');
// open the database connection
#$conn = mysql_connect(SQL_HOST, SQL_USER, SQL_PASS) or die(mysql_error());
#mysql_select_db(SQL_DATA);
#mysql_close($conn);
httpheader();
echo htmlheader('travelrun -- update all', usercss());
?>
<div class="updatenav">
Go back to the <a href="index.php">start page</a>.
</div>

<div class="updateform">
<form method="post" action="update2.php">
  Refresh the item market to get rid of "NaN" values<br>
  Copy all of the torn country item page <i>(<b>Ctrl+A</b>, <b>Ctrl+C</b> probably works)</i><br>
  paste in the text box below <i>(<b>Ctrl+V</b> perhaps)</i> 
  <!--font size="-2">(if you're paranoid, you can edit the amount you have to,
  for example, <b>$100</b>, but leave that line in with no other changes)</font--><br>
  and click the "UPDATE" button<br>
  <i>The pasted text has to contain the line with the country name and your money; you can safely edit the amount of money but leave that line otherwise unchanged</i><br>
  <br><input type="submit" value="UPDATE"><br>
  <textarea name="data" rows="20" cols="80"></textarea>
  <br><input type="submit" value="UPDATE"> <i>Thank you.</i>
</form>
</div>
Пример #24
0
        $results = mysql_query($sql_query);
        if (mysql_num_rows($results) == 0) {
            Header("Location: {$url}?place=notfound");
            exit;
        }
        $row = mysql_fetch_assoc($results);
        $zoom = 13;
    } else {
        $row['place'] = 'All of Philippines';
        $row['lat'] = 13;
        $row['lng'] = 123;
        $zoom = 6;
    }
}
//map.getZoom()
htmlheader('Widgetize ' . $row['place']);
$p = urlencode(strtolower($row['place']));
?>
<script type="text/javascript">
<!--

var width = 400;
var height = 300;
var lat = <?php 
echo $row['lat'];
?>
;
var lng = <?php 
echo $row['lng'];
?>
;
Пример #25
0
## $Id$
require '.config.php';
require 'fx.inc.php';
ob_start('ob_tidyhandler');
#connect to database
$conn = mysql_connect(SQL_HOST, SQL_USER, SQL_PASS) or die(mysql_error());
mysql_select_db(SQL_DATA);
$prizes = array();
$sql = "select pdate, puser, pnote, pcountry from prize order by pdate desc limit 10";
$res = mysql_query($sql) or die(mysql_error());
while ($row = mysql_fetch_row($res)) {
    $prizes[] = array($row[0], $row[1], $row[2], $row[3]);
}
mysql_free_result($res);
httpheader();
echo htmlheader('Travelrun: Prizes', usercss());
echo '<div class="prizenav">';
echo 'Go back to the <a href="index.php">start page</a>.';
echo '</div>';
echo '<div class="prizemain">';
echo 'Recent prizes:<br>';
echo '<table border="0" cellpadding="0" cellspacing="1" width="100%">';
echo '<tr><th>date</th><th>claimed</th><th>note</th><th>country</th></tr>';
foreach ($prizes as $p) {
    echo '<tr>';
    echo '<td>', $p[0], '</td>';
    echo '<td align="center">';
    echo $p[1] ? $p[1] : '--';
    echo '</td>';
    echo '<td>', trim($p[2]) != '' ? $p[2] : '&nbsp;', '</td>';
    echo '<td>', $p[3], '</td>';
Пример #26
0
function freischalten()
{
    global $ldapconn, $stadtleser_dn, $stadtleserfilter, $LDAPFieldsToFind, $adh, $ad, $mysqlconn, $key;
    $i = 0;
    $newPassw = "";
    $zuaccount = "";
    $freierBenutzerGefunden = FALSE;
    // Suche starten
    $search = $ad->get_Users($stadtleserfilter);
    // Anzahl gefundener Einträge ermitteln
    $anzahl = $ad->get_AnzahlUsers();
    // userAccountControl 512=aktiv 514=deaktiviert
    // accountExpires
    foreach ($search as $zeile) {
        htmlheader("Stadtleser freischalten");
        // $pwdablaufdate = convert_AD_date ( $zeile ["accountexpires"] [0] );
        $pwdablaufdate = $adh->ConvertWindowsToUnixTimestamp($zeile["accountexpires"][0]);
        $dn = $zeile["distinguishedname"][0];
        if ($zeile["useraccountcontrol"][0] == 512) {
            if ($pwdablaufdate < time()) {
                // dann setze das passwort und weise benutzer zu benutzer zu
                $zuaccount = $zeile["samaccountname"][0];
                // Benutzerobjekt aus Datenbank holen
                $sql = "SELECT * FROM benutzer WHERE id='" . $_POST['id'] . "'";
                $mysqlres = mysql_query($sql, $mysqlconn) or exit("SQL Befehl war nicht erfolgreich");
                while ($row = mysql_fetch_array($mysqlres, MYSQL_ASSOC)) {
                    $dPasswort = mcrypt_decrypt(MCRYPT_3DES, $key, $row['passwort'], MCRYPT_MODE_ECB);
                    if ($row['dauer'] == 1) {
                        $aktivBis = time() + 86400;
                    } else {
                        $aktivBis = time() + 604800;
                    }
                    $aktivBis = $adh->ConvertUnixToWindowsTimestamp($aktivBis);
                    $data["givenname"][0] = time();
                    // var_dump ( $aktivBis );
                    $ae = sprintf('%f', $aktivBis);
                    $af = substr($ae, 0, 18);
                    // $data["accountexpires"][0] = "9223372036854775807";
                    $data["accountexpires"][0] = $af;
                    // var_dump ( $data ["accountexpires"] [0] );
                    // echo date ( "d-m-Y H:i:s", $adh->ConvertWindowsToUnixTimestamp ( $data ["accountexpires"] [0] ) );
                    $data["unicodepwd"][0] = $adh->makeADPassword($dPasswort);
                    $aktivBis = date("d.m.y H:i", $adh->ConvertWindowsToUnixTimestamp($aktivBis));
                    // ldap_mod_replace ( $ldapconn, $dn, $data ) or die ( "Setzen des Kennworts nicht möglich. Fehlermeldung ist: " . $php_errormsg );
                    if (!$ad->set_UserAttributes($dn, $data)) {
                        echo "<b>Schreiben fehlgeschlagen ! AD nicht erreichbar oder Passwort entspricht nicht den Vorgaben ! Bitte kontaktieren Sie Ihren Systemadministrator !</b><br><a href='index.php' class='button'>zurück<a>";
                        exit;
                    }
                    $sql = "UPDATE benutzer SET zuaccount='" . $zeile["samaccountname"][0] . "', status='" . $aktivBis . "', benutzer='" . $_SESSION['user'] . "' WHERE id='" . $_POST['id'] . "'";
                    //echo $sql;
                    $res = mysql_query($sql, $mysqlconn) or exit("SQL Befehl war nicht erfolgreich");
                    $freierBenutzerGefunden = TRUE;
                }
            }
        }
        if ($freierBenutzerGefunden == TRUE) {
            break;
        }
        if ($anzahl == $i) {
            echo "<b>Freischalten NICHT erfolgreich ! KEIN temporärer Account mehr verfügbar. Bitte kontaktieren Sie Ihren Systemadministrator !</b><br><a href='index.php' class='button'>zurück<a>";
            exit;
        }
        $i++;
    }
    echo "Freischalten erfolgreich ! Zugewiesenes Konto ist : <b>" . $zuaccount . "</b><br><a href='index.php' class='button'>zurück<a>";
}
<?php

ob_start();
$x_IN_FILE = 1;
include 'functions.php';
include 'locations.array.php';
htmlheader('Maps of Philippine Provinces, Cities & Municipalities', 'Maps of Philippine Provinces, Cities & Municipalities');
$i = 0;
echo '<table width="100%"><tr>';
foreach ($locations[0]['regions'] as $region) {
    if ($region['name'] == 'Metro Manila') {
        $i++;
        if ($i == 1 || $i > 1 && ($i - 1) % (count($locations[0]['regions']) / 3) == 0) {
            echo '<td valign="top" align="left">';
        }
        echo '<h2 style="display: inline;">' . str_replace('ñ', '&ntilde;', $region['name']) . '</h2>:<ul>';
        foreach ($region['cities'] as $city) {
            $sql_query = "SELECT * FROM `{$table}` WHERE `place` = '" . mysql_escape_string($city['name']) . "' OR `place` = '" . mysql_real_escape_string(str_replace(array('City of ', ' City'), '', $city['name']) . ' City') . "' LIMIT 1";
            $results = mysql_query($sql_query);
            $row = mysql_fetch_assoc($results);
            echo '<li>';
            if (mysql_num_rows($results)) {
                echo '<a href="/map/' . urlencode(str_replace(' ', '+', strtolower($row['place']))) . '">';
            } else {
                echo '<a href="/map/' . urlencode(str_replace(' ', '+', strtolower($city['name']))) . '">';
            }
            echo '<h3 style="display: inline; font-weight: normal;">' . str_replace('ñ', '&ntilde;', $city['name']) . '</h3>';
            echo '</a>';
            echo '</li>';
        }
        echo '</ul><br />';
Пример #28
0
mysql_select_db(SQL_DATA);
$sql = <<<SQL_FLOWERS
select item.itemid, item.itemname, country.countryname
from country, item
where country.flower = item.itemid
order by item.itemname
SQL_FLOWERS;
$data = array();
$res = mysql_query($sql) or die(mysql_error());
while ($row = mysql_fetch_row($res)) {
    $data[] = array($row[0], $row[1], $row[2]);
}
mysql_free_result($res);
mysql_close($conn);
httpheader();
echo htmlheader('travelrun -- manual update', usercss());
echo '<div class="mantitle">';
echo '<h3>Manual Update</h3>';
echo '</div>';
echo '<div class="mannav">';
echo 'Return to the <a href="index.php">start page</a>.';
echo '</div>';
echo '<div class="manform">';
echo '<i>Data from this update is only shown in the graph.</i>';
echo '<form method="post" action="manupdate2.php">';
echo 'You can copy all of the date/time forum line or part of it as long as it includes the highlighted underscored portion: [Posted on Sun <b><u>Sep 29, 2013 15:23</u></b>:55]<br>';
echo '<label>Time: <input type="text" name="time" size="24" title="Copy/Paste the time from the flower thread"></label>';
echo ' ';
echo '<label>GMT Offset: <input type="text" name="gmt" value="0" size="2"></label> (leave offset at 0 unless TC Time changes -- DST??)<br>';
echo 'Flower: <select name="flower"><option value="0">(select flower)';
foreach ($data as $flower) {
Пример #29
0
    }


</script>
<style>

.centered-form
{
    margin-top: 120px;
    margin-bottom: 120px;
}


</style>
	<?php 
htmlheader();
?>

</head>
	<?php 
include "common/header.php";
?>


 <div class="container" id="container1">
        <div class="row centered-form">
            <div class="col-xs-12 col-sm-8 col-md-4 col-sm-offset-2 col-md-offset-4">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title text-center">Registration</h3>
                    </div>
Пример #30
0
<?php

$x_IN_FILE = 1;
include 'functions.php';
ini_set("max_execution_time", "0");
ini_set("memory_limit", "-1");
htmlheader('Users');
$data = file('ref.txt');
foreach ($data as $k => $v) {
    $temp = explode('|', $v, 2);
    $url = $temp[1];
    if (strlen($url) > 1) {
        $info = parse_url($url);
        $host = $info['host'];
        $host = strtolower($host);
        $host = str_replace('http://', '', $host);
        $host = str_replace('/', '', $host);
        $host = str_replace('www.', '', $host);
        $urls[$host][$url]++;
    }
}
foreach ($urls as $k => $v) {
    arsort($v);
    echo '<b>' . $k . '</b>';
    $x = 0;
    echo '<ul>';
    foreach ($v as $k2 => $v2) {
        $x++;
        if ($x < 5) {
            echo '<li style="margin-left:15px;"><a href="' . $k2 . '">' . $k2 . '</a> <small>(' . $v2 . ')</small></li>';
        }