Example #1
0
<?php

session_start();
require '../dynamicHelpers.php';
renderHead(['title' => 'Logged Landing Page', 'navField1' => 'Account Settings', 'navField2' => 'Saved Solutions', 'navField3' => 'Chemistry Terms', 'navField4' => 'Create Solution(s)']);
?>
<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width">
    <?php 
//If a solution is passed in via the 'POST' Method with value 'initialSolution',
//then initialize a javascipt object containing it.
if (isset($_POST['initialSolution'])) {
    echo "<script> var initialSolution = " . $_POST['initialSolution'] . ";</script>";
}
?>
    
    <?php 
include '../script-includes.html';
?>
    <!-- Big decimal javascript used for floating point precision -->
    <script src="big.min.js"></script>
    <script src="serialPage.js"></script>
    <script src="/static/js/utility.js"></script>
    <script src="/static/js/validate.js"></script>

	<link rel="stylesheet" type="text/css" href="/shared-content/InputStyle.css">
	<link rel="stylesheet" type="text/css" href="/static/css/navBar.css">
    <title>Solubuddy - Serial Dilution</title>
</head>
Example #2
0
<?php

require "../dynamicHelpers.php";
renderHead(["title" => "Logged Landing Page", "navField1" => "Account Settings", "navField2" => "Saved Solutions", "navField3" => "Chemistry Terms", "navField4" => "Create Solution(s)"]);
?>



<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<title>SoluBuddy Homepage</title>
	<!-- Latest compiled and minified CSS -->
	<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
	<!--Stylesheet-->
	<link href = "../static/css/navBar.css" type="text/css" rel = "stylesheet">
	<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
	<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>

</head>
<body id="bodyDefault">


</body>
</html>
Example #3
0
    $pdf->SetDefaultMonospacedFont('courier');
    // 设置间距
    $pdf->SetMargins(15, 21, 15);
    $pdf->SetHeaderMargin(5);
    $pdf->SetFooterMargin(10);
    $pdf->setCellHeightRatio(0.7);
    // 设置分页
    $pdf->SetAutoPageBreak(TRUE, 25);
    // set image scale factor
    $pdf->setImageScale(1.25);
    // set default font subsetting mode
    $pdf->setFontSubsetting(true);
    //设置字体
    $pdf->SetFont('droidsansfallback', '', 12);
    $pdf->AddPage();
    $content = renderHead($json);
    $content .= '<br/>';
    foreach ($json->tasks as $item) {
        $content = $content . render($item->title, $item->completedAt, $item->duration, $item->memo);
    }
    $pdf->writeHTML($content);
    //输出PDF
    $pdf->Output('t.pdf', 'I');
}
function renderHead($data)
{
    return '<div>' . '任务总数<span style="color:red"> ' . $data->total . '</span>,' . '已完成<span style="color:red"> ' . $data->done . '</span>,' . '累计工作时间<span style="color:red"> ' . $data->duration . '</span>' . '</div>';
}
function render($title, $compelted_at, $duration, $memo)
{
    $result = '<div style="border-bottom:1px solid #ddd;">';
Example #4
0
require_once "imagesHelper.php";
$dateNow = date("Y-m-d H:i:s");
if (wakaExists($_REQUEST['w'])) {
    $waka = readWaka($_REQUEST['w']);
    if (isset($waka['users'][$_REQUEST['u']]['type'])) {
        $user['type'] = $waka['users'][$_REQUEST['u']]['type'];
        $user['email'] = $waka['users'][$_REQUEST['u']]['email'];
    } else {
        $user['type'] = 'public';
        $user['email'] = 'notset';
    }
    $out = array();
    if (strnatcmp($waka['dateUsersTouched'], $_REQUEST['d']) > 0) {
        //echo $waka['starter']['dateTouched'].' > '.$_REQUEST['d'];
        $c = count($out);
        $out[$c]['html'] = renderHead($waka, $user);
        $out[$c]['location'] = 'head';
        $out[$c]['type'] = 'changed';
    }
    if (strnatcmp($waka['starter']['dateContentTouched'], $_REQUEST['d']) > 0) {
        $c = count($out);
        $out[$c]['html'] = renderItemContent($waka['starter'], 'starter');
        $out[$c]['location'] = 'starter_content';
        $out[$c]['type'] = 'changed';
        $c = count($out);
        $out[$c]['html'] = renderItemContentForm($waka['starter'], 'starter');
        $out[$c]['location'] = 'starter_content_form';
        $out[$c]['type'] = 'changed';
    }
    if (strnatcmp($waka['starter']['dateImagesTouched'], $_REQUEST['d']) > 0) {
        $c = count($out);
Example #5
0
function renderWaka($waka)
{
    //print_r($waka['users'][$_REQUEST['u']]['notificationCooldown']);
    if (isset($waka['users'][$_REQUEST['u']]['type'])) {
        $user['type'] = $waka['users'][$_REQUEST['u']]['type'];
        $user['email'] = $waka['users'][$_REQUEST['u']]['email'];
    } else {
        $user['type'] = 'public';
        $user['email'] = 'public';
    }
    echo '<div class="waka">';
    echo '<a href="javascript:switchHead()" style="text-decoration: none;"><span style="float:right; padding-bottom: 7px;">';
    if ($user['type'] != 'public') {
        echo '<small style="margin-bottom: 10px; padding-right: 8px;"><small style="color: #555;"">' . $user['email'] . '</small></small>';
    }
    echo '<img src="img/Apps-system-users-icon.png" style="vertical-align: bottom;"></span></a>';
    echo '<div style="clear:both"></div>';
    echo '<div class="headwrapper"><div class="head" id="head" style="display:none;">';
    echo renderHead($waka, $user);
    echo '</div></div>';
    //starter
    echo '<div class="starter" id="starter">';
    echo renderStarter($waka['starter'], $user);
    echo '</div>';
    //draft form
    echo '<div class="draft" id="draft"';
    if ($user['type'] != 'editor') {
        echo ' style="display:none"';
    }
    echo '>';
    if ($user['type'] == 'editor') {
        echo renderDraft($waka['drafts'][$_REQUEST['u']], $user);
    }
    echo '</div>';
    //echo '<hr>';
    //posts
    $waka['posts'] = sortItemsDesc($waka['posts'], 'dateCreated');
    $postcount = count($waka['posts']);
    //$dateread=date("Y-m-d H:i:s");
    for ($p = 0; $p < $postcount; $p++) {
        if (isset($waka['posts'][$p]['users'][$user['email']]) && isset($waka['posts'][$p]['users'][$user['email']]['dateRead'])) {
            $dateread = $waka['posts'][$p]['users'][$user['email']]['dateRead'];
        } else {
            $dateread = "1985-09-02 14:00:01";
        }
        //echo $waka['posts'][$p]['users'][$user['email']]['dateRead'].'<br>';
        //echo $waka['posts'][$p]['dateContentTouched'].' : '.$dateread.' -> '.strnatcmp($waka['posts'][$p]['dateContentTouched'],$dateread).'<br>';
        //echo $waka['posts'][$p]['dateFilesTouched'].' : '.$dateread.'<br>';
        //echo $waka['posts'][$p]['dateImagesTouched'].' : '.$dateread.'<br>';
        //echo $waka['posts'][$p]['dateUsersTouched'].' : '.$dateread.'<br>';
        echo '<div class="post" id="post_' . $waka['posts'][$p]['id'] . '"';
        if (!(strnatcmp($waka['posts'][$p]['dateContentTouched'], $dateread) == -1 && strnatcmp($waka['posts'][$p]['dateFilesTouched'], $dateread) == -1 && strnatcmp($waka['posts'][$p]['dateImagesTouched'], $dateread) == -1)) {
            echo ' unread="yes"';
        } else {
            echo ' unread="no"';
        }
        echo '>';
        echo renderPost($waka['posts'][$p], $waka['users'], $user);
        echo '</div>';
    }
    echo '</div>';
}