</th> <th></th> </tr> </thead> <tbody> <?php $reservations = querySQL('search'); if ($reservations) { foreach ($reservations as $row) { // reservation ID $id = $row->reservation_id; $_SESSION['reservation_guest_name'] = $row->reservation_guest_name; // check if reservation is tautologous $tautologous = querySQL('tautologous'); echo "<tr id='res-" . $id . "'>"; echo "<td>" . humanize($row->reservation_date) . "</td>\n\t\t\t<td>" . formatTime($row->reservation_time, $general['timeformat']) . "</td>\n\t\t\t<td>" . showReservation_status($row->reservation_hidden) . "</td>\n\t\t\t<td>" . printTitle($row->reservation_title) . "\n\t\t\t<span class='bold'><a href='?p=102&resID=" . $id . "' >" . utf8_encode($row->reservation_guest_name) . "</a></strong>"; if ($row->repeat_id != 0) { //print out recurring symbol echo "<img src='images/icons/arrow-repeat.png' alt='" . _recurring . "' title='" . _recurring . "' border='0' >"; } echo "</td>\n\t\t\t<td><span class='bold'>" . $row->reservation_pax . "</strong></td>\n\t\t\t<td>" . $row->reservation_guest_phone . "</td>\n\t\t\t<td>" . $row->reservation_hotelguest_yn . "</td>\n\t\t\t<td>" . $row->outlet_name . "</td>\n\t\t\t<td>" . $row->reservation_booker_name . "</td>"; echo "<td class='noprint'>"; // DELETE BUTTON if (current_user_can('Reservation-Delete') && $q != 3) { echo "<a href='#modalsecurity' name='" . $row->repeat_id . "' id='" . $id . "' class='delbtn'>\n\t\t\t\t\t<img src='images/icons/delete_cross.png' alt='" . _cancelled . "' class='help' title='" . _delete . "'/></a>"; } echo "</td></tr>"; } } ?> </tbody>
<?php include "header_start.php"; printTitle("Edit Crisis"); ?> <style> input[readonly="readonly"] { color: #aaa; } </style> <?php include "header_end.php"; include_once "api.php"; function isNullOrEmpty($value) { return is_null($value) || $value == ''; } function emptyAsNull($value) { if ($value == '') { return null; } return $value; } function getValueChange($oldValue, $newValue) { if (emptyAsNull($newValue) != $oldValue) { return $newValue; } else { return null; }
$userProfile = $fetcher->fetchUserProilfe(); // TODO error handling 404 --> $userProfile = empty if ($userProfile === false) { print "Fehler: auid konnte nicht geholt werden"; } $username = $userProfile['username']; global $dbInfos; $oAuthDb = new DbOAuth2($dbInfos); $oAuthDb->saveAuthData($electionhash, $serverId, $tmpsecret, $auid, $username, $tokeninfos, $now->format(DateTime::ATOM)); /* if (isset($userProfile['public_id'])) $public_id = $userProfile['public_id']; else $public_id = ''; if ($public_id == '') $h1 = 'Hallo,'; else $h1 = 'Hallo ' . $public_id .','; */ $h1 = 'Autorisierung erfolgreich'; printTitle('VVVote: Login erfolgreich', $h1); // print '<ul><li>Schließen Sie jetzt dieses Fenster</li>'; // print ' <li>Anschließend:</li>'; // print '<ul><li>Wenn Sie noch nicht erfolgreich für den anderen Abstimmserver eingeloggt haben, klicken Sie in dem ursprünglichen Fenster auf den Link zum Login für den anderen Abstimmungsserver</li>'; // print '<li>Wenn Sie sich bereits für beide Abstimmserver eingeloggt haben, klicken Sie in dem ursprünglichen Fenster auf den Knopf "Wahlschein holen".</li></ul></ul>'; //print '<br>isInVoterlist from fetch: ' . ($fetcher->isInVoterList('d94b915b-db13-4264-890c-0780692e4998') ? 'true' : 'false'); $techinfos = '<h2>Technische Informationen</h2>' . '<br> ' . '<ul>' . ' <li>Ihr Login war erfolgreich und der Abstimmserver >' . $serverkey['serverName'] . '< ist nun berechtigt, ' . 'Ihre Wahlberechtigung abzufragen.</li>' . ' <li>Ihre Wahlberechtigung wurde noch nicht geprüft. Sie wird erst geprüft, wenn Sie im urspünglichen Fenster auf "Wahlschein erzeugen" klicken.</li>' . '</ul>' . '<br><h2>Informationen zum Datenschutz</h2>' . '<br>Folgende persönliche Daten wurden auf diesem Abstimmserver gespeichert:' . '<ul>' . '<li>Ihr Username beim Basisentscheid-Server</li>' . '<li>Eine Ziffernfolge, die Sie eindeutig identifiziert: ' . $auid . '</li>' . '<li>Geheime Zugangsdaten, die es dem Server ermöglichen, Ihre Wahlberechtigung beim Basisentscheid-Server abzufragen.</li>' . '</ul>'; printTechInfos($techinfos); /* $membership = $client->fetch($curOAuth2Config['get_membership_endp'], Array(), Client::HTTP_METHOD_POST); print "<br><br>\nresponse 2: "; print_r($membership); $userprofile = $client->fetch('https://beoauth.piratenpartei-bayern.de/api/self/profile/', $params, Client::HTTP_METHOD_POST); print "<br><br>\nresponse 3: "; print_r($userprofile);
if ($row->reservation_time > $daylight_evening) { echo "<img src='images/icons/clock-moon.png' class='middle smicon'/>"; } else { if ($row->reservation_time > $daylight_noon) { echo "<img src='images/icons/clock-sun.png' class='middle smicon'/>"; } else { if ($row->reservation_time < $daylight_noon) { echo "<img src='images/icons/clock-grey.png' class='middle smicon'/>"; } } } } echo "<strong>" . formatTime($row->reservation_time, $general['timeformat']) . "</strong></td>"; echo "<td>\n\t\t\t\t<strong class='big'>" . $row->reservation_pax . "</strong> " . $row->reservation_hotelguest_yn . "</td>"; //<img src='images/icons/user-silhouette.png' class='middle'/> echo "<td style='width:20%'>" . printTitle($row->reservation_title) . "<strong> <a id='detlbuttontrigger' href='ajax/guest_detail.php?id=" . $id . "'"; // color guest name if tautologous if ($tautologous > 1) { echo " class='tautologous tipsy' title='" . _tautologous_booking . "'"; } echo ">" . $row->reservation_guest_name . "</a></strong>"; if ($row->repeat_id != 0) { //print out recurring symbol echo " <img src='images/icons/loop-alt.png' alt='" . _recurring . "' title='" . _recurring . "' class='tipsy' border='0' >"; } echo "</td><td style='width:20%'>"; if ($_SESSION['page'] == 1) { echo $row->outlet_name; } else { echo $row->reservation_notes; }
function printBlogPostsList($request) { $dir = BASE_PATH . BLOG_DIR; $uri = BASE_URI . BLOG_DIR; //print "<hr>file exist somehow !!!!<br/>\n"; $dirFiles = getFileList($dir, $empty); rsort($dirFiles); $html = "<div class=\"blog list\">\n"; $html .= "<div class=\"title\"><h3>All the Niconomicon blog posts</h3></div>\n"; foreach ($dirFiles as $file) { $fileUri = guessBlogUri($uri, $file); $inText = file_get_contents($dir . $file); $title = getTitleFromContent($inText); $html .= printTitle($title, $dir . $file, $fileUri); } $html .= "</div>"; return $html; }
<?php if (substr($ct, 0, 2) == "ap") { ?> <meta http-equiv="Content-type" content="<?php echo $ct; ?> " /> <?php } else { ?> <meta http-equiv="charset" content="UTF-8" /> <?php } ?> <title><?php printTitle(); ?> </title> <?php if (ae_detect_ie()) { echo file_get_contents($FILEDIR . "headerie.html"); } if (!ae_detect_ie()) { echo file_get_contents($FILEDIR . "header.html"); } ?> <style type="text/css"><?php start_css(); echo file_get_contents($CSSDIR . "/default.css"); if (ae_detect_ie()) { echo file_get_contents($CSSDIR . "/allie.css");
function createHistoryChart_age($db) { print "<div class='row span12'>\n"; printTitle("Average age of completed per day"); $sqlGetView = "select date(ZSTOPPEDDATE, 'unixepoch', '+31 years') as date, count(Z_PK) as completed, " . "round(julianday(datetime(avg(ZSTOPPEDDATE), 'unixepoch', '+31 years')) - julianday(datetime(avg(ZCREATIONDATE), 'unixepoch', '+31 years')),5) as age " . "from ZTHING where ZSTATUS = 3 group by date order by date"; $result = $db->query($sqlGetView); $arrValuesCompleted = $result->fetchAll(PDO::FETCH_ASSOC); $dates = array(); foreach ($arrValuesCompleted as $row) { $dates[$row['date']][0] = $row['completed']; $dates[$row['date']][1] = $row['age']; } //array may not be fully populated, so make sure it's sorted in to order array_multisort(array_keys($dates), $dates); //list the dates, number of tasks created and completed print "<div class='graph' id='historychartage'></div>\n"; print "<script>\n"; print "Morris.Line({\n"; print "element: 'historychartage', data: [\n"; foreach ($dates as $i => $values) { //print $i . "," . ($dates[$i][0] ? : 0) . "," . ($dates[$i][1] ? : 0) . "<br/>\n"; print "{d: '{$i}', a: " . ($dates[$i][0] ?: 0) . ", b: " . ($dates[$i][1] ?: 0) . "},\n"; } print "],\n"; print "xkey: 'd', ykeys: ['b', 'a'], labels: ['Average age', 'Completed'], lineWidth: 2 });\n"; print "</script>\n"; print "</div>\n\n"; // print "<div>\n"; // print json_encode($dates); // print "</div>\n"; }
$cid = $_POST['category']; $q = "UPDATE f_transactions set t_name=\"{$_name}\",t_cid={$cid},t_date=\"{$_date}\",t_entity=\"{$_from}\",t_mode=\"{$_mode}\",t_event=\"{$_event}\",t_amount={$_amt},t_desc=\"{$_desc}\",t_credit={$_credit} where t_id={$_id};"; echo "<div align=center>\n"; if (!mysql_query($q)) { echo "<i>ERROR: Could not execute {$q}</i><br>"; $ustat = 'Failed'; } else { echo "<i>Updated requested Transaction: {$_id} ({$q})</i><BR>"; } echo "</div>"; } } } } } printTitle("View Transactions"); $whereclause = array(); echo "<table class=ptables>\n"; $q = "SELECT * FROM f_transactions "; $f_t = $_GET['f_transaction']; $f_c = $_GET['f_category']; $f_s = $_GET['f_source']; $f_m = $_GET['f_mode']; $f_e = $_GET['f_event']; if ($f_t) { array_push($whereclause, "t_name like \"%{$f_t}%\""); } if ($f_s) { array_push($whereclause, "t_entity like \"%{$f_s}%\""); } if ($f_m) {
#echo ')'; if ($test['warning_type'] == 'ok') { echo '<strong style="color:green;">' . $test['warning_type'] . '</strong>'; } else { echo '<strong style="color:red">' . $test['warning_type'] . '</strong>'; } echo '</td></tr>'; if ($test['warning_type'] == "error") { $errors += 1; } } return $errors; } if ($_SERVER["REQUEST_METHOD"] == "GET" && empty($_GET["mode"])) { printHeader(); printTitle('environment_testing'); $errors = 0; echo '<table style="margin:auto;">'; printEnvironmentTitle('php_version'); $data = Environments::checkPhpVersion(); $errors += printEnvironmentTest(_lng('php_version'), $data); printEnvironmentTitle('required_php_extensions'); $data = Environments::checkPhpExtensions(); foreach ($data as $key => $item) { $item["expected"] = ''; $item['value'] = $item["loaded"] ? "enabled" : "disabled"; $item['warning_type'] = $item["loaded"] ? "ok" : "warning"; $errors += printEnvironmentTest($item['title'], $item); } printEnvironmentTitle('php_settings_values'); $data = Environments::checkPhpDirectives();
session_start(); // ** set configuration include '../../config/config.general.php'; // ** connect to database include '../classes/connect.db.php'; // ** database functions include '../classes/database.class.php'; // ** localization functions include '../classes/local.class.php'; // ** database functions include '../classes/business.class.php'; // translate to selected language translateSite(substr($_SESSION['language'], 0, 2), '../'); // ** all database queries include '../classes/db_queries.db.php'; // ** set configuration include '../../config/config.inc.php'; // check for new reservations $new = querySQL('cxl_list'); if ($new != '') { $i = 1; $message = "<div style='width:400px; padding-left:23px;'>"; $message .= "<h2>CXL " . _overview . "</h2>"; $message .= "<p>" . _cxl_text . "</p><br/>"; foreach ($new as $row) { $message .= $i . ". " . printTitle($row->reservation_title) . " <strong>" . $row->reservation_guest_name . "</strong> " . _canceled_ . " " . $row->count . "x<br/><br/>"; $i++; } $message .= "</div>"; echo $message; }
printTitle("Testing setTaskNote"); // commented out to avoid unwanted effect // printResponse($plancakeApi->setTaskNote($validTaskId, "this is a note from the API test")); printTitle("Testing addTask"); printResponse($plancakeApi->addTask("this is a task from the API test")); printTitle("Testing addTask (misc parameters)"); //printResponse($plancakeApi->addTask("this is a test", 2, false, false, '2010-11-18', '1930', null, null, null, 'this is a simple note', '1,2')); printTitle("Testing editTask"); // commented out to avoid unwanted effect //printResponse($plancakeApi->editTask($validTaskId, "this is a test for the editTask API method")); printTitle("Testing editTask (misc parameters)"); // commented out to avoid unwanted effect //printResponse($plancakeApi->editTask(22, "let's change this", 2, null, null, '2011-07-13', null, 10, 13, null, null, "1")); printTitle("Testing deleteTask"); // commented out to avoid unwanted effect // printResponse($plancakeApi->deleteTask($validTaskId)); printTitle("Testing whatHasChanged"); printResponse($plancakeApi->whatHasChanged($fromTimestamp, $toTimestamp)); printTitle("This is the token we have used and we can save for later use"); echo $plancakeApi->token . "\n\n"; } catch (Exception $e) { die($e->getMessage() . "\n"); } function printTitle($msg) { echo "\n >>>>> {$msg} <<<<<\n"; } function printResponse($response) { echo print_r($response, true); }
<?php include "header_start.php"; printTitle("Manage Attributes"); include "header_end.php"; include_once "api.php"; //Delete attribute? if (!is_null($_GET) && key_exists('delete', $_GET)) { $deleteID = intval($_GET["delete"]); deleteAttribute($deleteID); } ?> <h1><a href="overview.php">Overview</a> > Attributes</h1> <input type="button" value="Add new attribute" onclick="goto('edit_attribute.php')" /> <br/><br/> <div class="table-row table-header"> <div class="table-column right">ID</div> <div class="table-column">Code</div> <div class="table-column">Name</div> <div class="table-column">Labels</div> <div class="table-column">Description</div> <div class="table-column right">Training samples</div> <div class="table-column"> </div> </div> <?php $attributes = getAttributes(); foreach ($attributes as $a) { $id = $a->id;
$cid = $_POST['category']; $q = "UPDATE f_receivables set r_from=\"{$_name}\",r_cid={$cid},r_date=\"{$_date}\",r_rdate=\"{$_rdate}\",r_amount={$_amt} where r_id={$_id};"; echo "<div align=center>\n"; if (!mysql_query($q)) { echo "<i>ERROR: Could not execute {$q}</i><br>"; $ustat = 'Failed'; } else { echo "<i>Updated requested Receivable: {$_id} ({$q})</i><BR>"; } echo "</div>"; } } } } } printTitle("View Receivables"); echo "<table class=ptables>\n"; $q = "SELECT * FROM f_receivables order by r_date"; $whereclause = ""; $res = mysql_query($q); $num = mysql_num_rows($res); $i = 0; printHeaderRow(); while ($i < $num) { $id = mysql_result($res, $i, "r_id"); $c_id = mysql_result($res, $i, "r_cid"); $cat = runQuery("SELECT c_name from f_categories where c_id={$c_id}", 'c_name'); $date = mysql_result($res, $i, "r_date"); $rdate = mysql_result($res, $i, "r_rdate"); $name = mysql_result($res, $i, "r_from"); $amt = mysql_result($res, $i, "r_amount");
// ** set configuration include '../../config/config.inc.php'; $_SESSION['resID'] = $_GET['id']; // check for reservation/guest details $new = querySQL('reservation_info'); if ($new != '') { foreach ($new as $row) { $bookingnumber = $row->reservation_bookingnumber == '' ? '--' : $row->reservation_bookingnumber; $_SESSION['reservation_guest_name'] = $row->reservation_guest_name; $date = date($general['dateformat_short'], strtotime($row->reservation_date)); $time = formatTime($row->reservation_time, $general['timeformat']); // count total visits $visits = querySQL('reservation_visits'); // collect history infos about guest $history = querySQL('reservation_history'); echo "<h3 style='width:500px;'>" . printTitle($row->reservation_title) . " " . $_SESSION['reservation_guest_name'] . "</h3>"; echo "<h5>" . $date . " " . $time . " | " . $row->outlet_name . "</h5><br/>"; echo "<table class='detailbig'>"; echo "<tr><td style='width:160px;'>" . _booknum . "</td><td><strong>" . $bookingnumber . "</strong></td></tr>"; echo "<tr><td>" . _phone_room . "</td><td><strong>" . $row->reservation_guest_phone . "</strong></td></tr>"; echo "<tr><td>" . _email . "</td><td><strong>" . $row->reservation_guest_email . "</strong>"; if ($row->reservation_advertise == 'YES') { echo "<img src='images/icons/mail_yes.png' class='mail-icon' title='Advertise allowed'/>"; } else { echo "<img src='images/icons/mail_no.png' class='mail-icon' title='No advertise'/>"; } echo "</td></tr>"; echo "<tr><td>" . _adress . "</td><td><strong>" . $row->reservation_guest_adress . "</td></tr>"; echo "<tr><td></td><td>" . $row->reservation_guest_city . "</strong></td></tr>"; echo "<tr><td>" . _visits . "</td><td><strong>" . $visits . "</strong></td></tr>"; echo "<tr><td>" . _history . "</td><td>";
<?php include "header_start.php"; printTitle("Manage Crisis Types"); include "header_end.php"; include_once "api.php"; //Did the user just submit changes? if (!is_null($_POST) && key_exists('newName', $_POST)) { $name = stripString2($_POST["newName"]); createCrisisType($name); } elseif (!is_null($_GET) && key_exists('delete', $_GET)) { $deleteID = intval($_GET["delete"]); deleteCrisisType($deleteID); } ?> <h1><a href="overview.php">Overview</a> > Crisis Types</h1> <form method="post" action="crisistypes.php"> <div> New crisis type: <input type="text" name="newName" /> <input type="submit" value="Create" /> </div> </form> <br/> <br/> <div class="table"> <div class="table-row table-header"> <div class="table-column">Name</div> <div class="table-column">#crises</div>
if ($row->reservation_timestamp > $maitre['maitre_timestamp'] && $maitre['maitre_comment_day'] != '') { echo " class='tautologous' title='" . _sentence_13 . "' "; } // daylight coloring if ($row->reservation_time > $daylight_evening) { echo " class='evening' "; } else { if ($row->reservation_time > $daylight_noon) { echo " class='afternoon' "; } else { if ($row->reservation_time < $daylight_noon) { echo " class='morning' "; } } } echo "><strong>" . formatTime($row->reservation_time, $general['timeformat']) . "</strong></td>\n\t\t\t<td>" . printTitle($row->reservation_title) . "</td>\n\t\t\t<td>\n\t\t\t<strong><a href='?p=102&resID=" . $id . "'"; // color guest name if tautologous if ($tautologous > 1) { echo " class='tautologous tipsy' title='" . _tautologous_booking . "'"; } echo ">" . $row->reservation_guest_name . "</a></strong>"; if ($row->repeat_id != 0) { //print out recurring symbol echo " <img src='images/icons/arrow-repeat.png' alt='" . _recurring . "' title='" . _recurring . "' class='tipsy' border='0' >"; } // old reservations symbol if (strtotime($row->reservation_timestamp) + $general['old_days'] * 86400 <= time()) { echo "<img src='images/icons/clock-ex.png' class='help tipsy right-side' title='" . _sentence_11 . "' />"; } echo "</td>\n\t\t\t<td><strong>" . $row->reservation_pax . "</strong></td>\n\t\t\t<td>" . $row->reservation_guest_phone . "</td>\n\t\t\t<td>" . $row->reservation_hotelguest_yn . "</td>\n\t\t\t<td>"; if ($_SESSION['page'] == 1) {
<?php include "header_start.php"; printTitle("Edit Attribute"); ?> <style> input[readonly="readonly"] { color: #aaa; } </style> <?php include "header_end.php"; include_once "api.php"; $maxLabels = 20; function isNullOrEmpty($value) { return is_null($value) || $value == ''; } function emptyAsNull($value) { if ($value == '') { return null; } return $value; } function getValueChange($oldValue, $newValue) { if (emptyAsNull($newValue) != $oldValue) { return $newValue; } else { return null;
echo " class='morning noprint'"; } } } echo " style='width:10px !important; padding:0px;'> </td>"; echo "<td id='tb_time'"; // reservation after maitre message if ($row->reservation_timestamp > $maitre['maitre_timestamp'] && $maitre['maitre_comment_day'] != '') { echo " class='tautologous' title='" . _sentence_13 . "' "; } echo ">"; echo "<strong>" . formatTime($row->reservation_time, $general['timeformat']) . "</strong></td>"; echo "<td id='tb_pax'><strong class='big'>" . $row->reservation_pax . "</strong> <span class='noprint'>"; printType($row->reservation_hotelguest_yn); //echo "<img src='images/icons/user-silhouette.png' class='middle'/>"; echo "</span></td><td style='width:20%' id='tb_name'><span class='noprint'>" . printTitle($row->reservation_title) . "</span><strong> <a id='detlbuttontrigger' href='ajax/guest_detail.php?id=" . $id . "'"; // color guest name if tautologous if ($tautologous > 1) { echo " class='tautologous tipsy' title='" . _tautologous_booking . "'"; } echo ">" . $row->reservation_guest_name . "</a></strong>"; // old reservations symbol if (strtotime($row->reservation_timestamp) + $general['old_days'] * 86400 <= time()) { echo "<img src='images/icons/clock-bolt.png' class='help tipsyold middle smicon' title='" . _sentence_11 . "' />"; } // recurring symbol if ($row->repeat_id != 0) { echo " <img src='images/icons/loop-alt.png' alt='" . _recurring . "' title='" . _recurring . "' class='tipsy' border='0' >"; } echo "</td><td style='width:30%' id='tb_note'>"; if ($_SESSION['page'] == 1) {
$con = mysql_connect($hostname, $username, $password); @mysql_select_db($database) or die("Unable to select db"); $_selfURL = "patronDB.php"; $_notifyURL = "patronNotify.php"; $_detailsURL = "pdbDetails.php"; $alpha_filter = $_GET['f']; $type = $_GET['t']; //--Stylesheets and header info--// include "patrondb/financeDB_Header.html"; // Transactions // Add, Edit/Update, View, Summarize $tdate = date('Y-m-d H:i:s'); printTitle("Current Financial Statements <br> {$tdate}"); $net = printIncomeStatement(); printBalanceStatements($net); printTitle("Detailed Revenue Breakdowns <br> {$tdate}"); printDetailedIncomeStatement(); printEventIncomeStatement(); function printTitle($t) { echo "<div align=center><h2>{$t}</h2></div><P>"; } function printDetailedIncomeStatement() { $net = sprintf("%.2f", runQuery("Select SUM(t_amount) as amt from f_transactions where t_id > 1 and t_date like '%2015%' and t_credit=0", 'amt')); $patronincome = sprintf("%.2f", runQuery("Select sum(donation) as amt from DONORS where dat like '%2015%'", 'amt')); $busincome = sprintf("%.2f", runQuery("select sum(t_amount) as amt from f_transactions where t_cid=6", 'amt')); $matchincome = sprintf("%.2f", runQuery("select sum(t_amount) as amt from f_transactions where t_cid=10", 'amt')); $otherincome = $net - $patronincome - $busincome - $matchincome; echo "<P><table class=ptables>\n"; printRow("Revenue Details 2015", '', '', 'H');
if ($_SESSION['user'] == '') { echo "<script>location.replace(\"index.php\");</script>"; } $con = mysql_connect($hostname, $username, $password); @mysql_select_db($database) or die("Unable to select db"); $_selfURL = "patronDB.php"; $_notifyURL = "patronNotify.php"; $_detailsURL = "pdbDetails.php"; $alpha_filter = $_GET['f']; $type = $_GET['t']; //--Stylesheets and header info--// include "patrondb/financeDB_Header.html"; // Transactions // Add, Edit/Update, View, Summarize $tdate = date('Y-m-d H:i:s'); printTitle("Current Financial Statements as of {$tdate}"); $net = printIncomeStatement(); printBalanceStatements($net); function printTitle($t) { echo "<div align=center><h2>{$t}</h2></div><P>"; } function printIncomeStatement() { $carryover = runQuery("SELECT t_amount from f_transactions where t_name='Carryover from 2014'", 't_amount'); $revenues = sprintf("%.2f", runQuery("Select SUM(t_amount) as amt from f_transactions where t_id > 1 and t_date like '%2015%' and t_credit=0", 'amt')); $expenses = sprintf("%.2f", runQuery("Select SUM(t_amount) as amt from f_transactions where t_id > 1 and t_date like '%2015%' and t_credit=1", 'amt')); $patronincome = sprintf("%.2f", runQuery("Select sum(donation) as amt from DONORS where dat like '%2015%'", 'amt')); $net = $carryover + $revenues - $expenses; echo "<table class=ptables>\n"; printRow("Mini Income Statement", '', '', 'H');
<p> A visualization of the frequency and location of instagram photos tagged with <a href="http://instagram.com/aokhalifax" target="_blank">#aokhalifax</a>, a grass roots initiative to brighten the perspective of citizens and tourists: the goal being to promote positivity in Halifax. </p> <?php printTitle('options'); ?> <ul> <li><b>size</b>: in meters (default: 30km)</li> <li><b>opacity</b>: in percent/100 (default: 1)</li> <li><b>gradientTexture</b>: url-to-texture-image (default: false)</li> <li><b>alphaRange</b>: change transparency in heatmap (default: 1)</li> <li><b>autoresize</b>: resize heatmap when map size changes (default: false)</li> </ul> <?php printTitle('usage'); ?> <pre class="brush: js;"> //Halifax, Nova Scotia var map = L.map('map', { layers : [base], center : [44.65, -63.57], zoom: 12 }); L.tileLayer('http://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg', { subdomains: '1234' }).addTo( map ); L.control.scale().addTo(map);
<?php include "header_start.php"; printTitle("Overview"); ?> <style> div.crisis { display: block; margin-bottom: 40px; } div.crisis .crisis-name{ font-weight: bold; font-size: 1.3em; margin: 10px 0px 10px 0px; } </style> <?php include "header_end.php"; include_once "api.php"; //Delete crisis? if (!is_null($_GET) && key_exists('delete', $_GET)) { $deleteID = intval($_GET["delete"]); deleteCrisis($deleteID); } echo '<h1>Overview</h1>'; echo "<button onclick=\"goto('crisistypes.php')\">Manage crisis types</button>"; echo "<button onclick=\"goto('attributes.php')\">Manage attributes</button>"; echo "<button onclick=\"goto('edit_crisis.php')\">Add new crisis</button>"; echo "<br/><br/>"; $crises = getOverview();
$expectedDeliveryDate = $testClient->markEnRoute($orderId, true); printSuccess(sprintf(' (expectedDeliveryDate: %s)', $expectedDeliveryDate->format('j. n. Y'))); printTitle('mark-getting-ready-for-pickup'); $expectedDeliveryDate = $testClient->markGettingReadyForPickup($orderId, true, true); printSuccess(sprintf(' (expectedDeliveryDate: %s)', $expectedDeliveryDate->format('j. n. Y'))); printTitle('mark-ready-for-pickup'); $testClient->markReadyForPickup($orderId, true); printSuccess(); printTitle('mark-delivered'); $testClient->markDelivered($orderId); printSuccess(); printTitle('cancel'); $cancelOrderItems = [new \SlevomatZboziApi\Request\CancelOrderItem('787887454', 1), new \SlevomatZboziApi\Request\CancelOrderItem('7844544', 2)]; $testClient->cancelOrder($orderId, $cancelOrderItems, 'Duvod storna'); printSuccess(); printTitle('update-shipping-address'); $testClient->updateShippingAddress($orderId, 'Petr Novak', 'Prazska 16', 'Praha 10', 'cz', '+420777888999', '10200'); printSuccess(); } catch (\SlevomatZboziApi\Request\ConnectionErrorException $e) { printError(sprintf('%s %s', $e->getMessage(), $e->getPrevious()->getMessage())); //retry request } catch (\SlevomatZboziApi\Request\InvalidRequestException $e) { printError($e->getMessage(), 'red', 'REQUEST ERROR: '); //fix error } catch (\SlevomatZboziApi\ZboziApiException $e) { printError($e->getMessage()); //retry request } function printError($message, $color = 'orangered', $startWith = '') { echo sprintf('<br><b style="color: %s">%s%s</b><hr>', $color, $startWith, $message);
printTitle('mark-pending'); $testClient->markPending($orderId); printSuccess(); printTitle('mark-en-route'); $expectedDeliveryDate = $testClient->markEnRoute($orderId, true); printSuccess(sprintf(' (expectedDeliveryDate: %s)', $expectedDeliveryDate->format('j. n. Y'))); printTitle('mark-getting-ready-for-pickup'); $expectedDeliveryDate = $testClient->markGettingReadyForPickup($orderId); printSuccess(sprintf(' (expectedDeliveryDate: %s)', $expectedDeliveryDate->format('j. n. Y'))); printTitle('mark-ready-for-pickup'); $testClient->markReadyForPickup($orderId); printSuccess(); printTitle('mark-delivered'); $testClient->markDelivered($orderId); printSuccess(); printTitle('cancel'); $cancelOrderItems = [new \SlevomatZboziApi\Request\CancelOrderItem('787887454', 1), new \SlevomatZboziApi\Request\CancelOrderItem('7844544', 2)]; $testClient->cancelOrder($orderId, $cancelOrderItems, 'Duvod storna'); printSuccess(); } catch (\SlevomatZboziApi\Request\ConnectionErrorException $e) { printError(sprintf('%s %s', $e->getMessage(), $e->getPrevious()->getMessage())); //retry request } catch (\SlevomatZboziApi\Request\InvalidRequestException $e) { printError($e->getMessage(), 'red', 'REQUEST ERROR: '); //fix error } catch (\SlevomatZboziApi\ZboziApiException $e) { printError($e->getMessage()); //retry request } function printError($message, $color = 'orangered', $startWith = '') {
echo "<td"; // reservation after maitre message if ($row->reservation_timestamp > $maitre['maitre_timestamp'] && $maitre['maitre_comment_day']!='') { echo " class='tautologous' title='"._sentence_13."' "; } // daylight coloring if ($row->reservation_time > $daylight_evening){ echo " class='evening' "; }else if ($row->reservation_time > $daylight_noon){ echo " class='afternoon' "; }else if ($row->reservation_time < $daylight_noon){ echo " class='morning' "; } echo "><strong>".formatTime($row->reservation_time,$general['timeformat'])."</strong></td> <td>".printTitle($row->reservation_title)."</td> <td> <strong><a href='?p=102&resID=".$id."'"; // color guest name if tautologous if($tautologous>1){echo" class='tautologous tipsy' title='"._tautologous_booking."'";} echo ">".$row->reservation_guest_name."</a></strong>"; if ($row->repeat_id !=0) { //print out recurring symbol echo " <img src='images/icons/arrow-repeat.png' alt='"._recurring. "' title='"._recurring."' class='tipsy' border='0' >"; } // old reservations symbol if( (strtotime($row->reservation_timestamp) + $general['old_days']*86400) <= time() ){ echo "<img src='images/icons/clock-ex.png' class='help tipsy right-side' title='"._sentence_11."' />"; }
function printBudgets() { $events = buildArrayFromQuery("SELECT distinct(b_event) from BUDGET order by b_date", 'b_event'); foreach ($events as $event) { printTitle("{$event}"); $balance = 0; $res = mysql_query("SELECT * from BUDGET where b_event=\"{$event}\" order by b_revenue DESC"); $num = mysql_num_rows($res); $i = 0; echo "<table class=ptables>\n"; echo "<tr><td class=pcellheads>Budget Item</td><td class=pcellheads>POC</td><td class=pcellheads>Due Date</td><td class=pcellheads>Revenue</td><td class=pcellheads>Expense</td><td class=pcellheads>Balance</td></tr>"; while ($i < $num) { $b_id = mysql_result($res, $i, "b_id"); $b_item = mysql_result($res, $i, "b_item"); $b_rev = mysql_result($res, $i, "b_revenue"); $b_poc = mysql_result($res, $i, "b_poc"); $b_date = mysql_result($res, $i, "b_date"); $b_exp = mysql_result($res, $i, "b_expense"); if ($b_rev > 0) { echo "<tr><td class=pcells>{$b_item}</td><td class=pcells>{$b_poc}</td><td class=pcells>{$b_date}</td><td class=pcells>{$b_rev}</td><td> </td>"; $balance = $balance + $b_rev; } else { echo "<tr><td class=pcells>{$b_item}</td><td class=pcells>{$b_poc}</td><td class=pcells>{$b_date}</td><td class=pcells> </td><td class=pcells>({$b_exp})</td>"; $balance = $balance - $b_exp; } $pbalance = money_format("%.2i", $balance); echo "<td class=pcells>{$pbalance} <a href=\"budgets.php?t=Edit&b_id={$b_id}\">Edit</a></td></tr>"; $i++; } echo "</table>"; } }
$cid = $_POST['category']; $q = "UPDATE f_payables set p_to=\"{$_name}\",p_cid={$cid},p_date=\"{$_date}\",p_rdate=\"{$_pdate}\",p_amount={$_amt} where p_id={$_id};"; echo "<div align=center>\n"; if (!mysql_query($q)) { echo "<i>ERROR: Could not execute {$q}</i><br>"; $ustat = 'Failed'; } else { echo "<i>Updated requested Payable: {$_id} ({$q})</i><BR>"; } echo "</div>"; } } } } } printTitle("View Payables"); echo "<table class=ptables>\n"; $q = "SELECT * FROM f_payables order by p_date"; $whereclause = ""; $res = mysql_query($q); $num = mysql_num_rows($res); $i = 0; printHeaderRow(); while ($i < $num) { $id = mysql_result($res, $i, "p_id"); $c_id = mysql_result($res, $i, "p_cid"); $cat = runQuery("SELECT c_name from f_categories where c_id={$c_id}", 'c_name'); $date = mysql_result($res, $i, "p_date"); $pdate = mysql_result($res, $i, "p_pdate"); $name = mysql_result($res, $i, "p_to"); $amt = mysql_result($res, $i, "p_amount");