예제 #1
0
	<table border='0' cellpadding='3' bgcolor='#e0e0e0' width=<?php 
        echo isset($SIDEBAR_DATA) ? '50%' : '40%';
        ?>
>
	<tr>
	<td><br />User name:</td>
	<td><br /><input type = 'text' name = 'user' value = "<?php 
        echo $user;
        ?>
"><br /></td>
	<tr>
	<td>Password:</td>
	<td><input type = 'password' name = 'pass' value = '' size = '12'><br /></td>
	<tr>
	<td colspan='2' align='right'><input type = 'submit' name = 'submit'></td>
	</tr>
	</table>
	</form>

<?php 
        print stretchPage(3);
        print "&nbsp;</div>\n";
    }
} else {
    unset($user);
    unset($pass);
    print "\n\t\t<h1>You are logged in</h1>\n\t\t<br />\n\t\t<ul>\n\t\t\t<li>Applications Administration (currently offline)<br /></li>\n\t\t\t<li><a href='manual/browse-notes.php'>Notes Administration</a><br /></li>\n\t\t\t<li><a href='info.php'>Check phpinfo()</a><br /></li>\n\t\t\t<li><a href='manual/admin-notes.php?test'>Set up test environment</a>\n\t\t\t\t(restricted) <b>" . (isset($_COOKIE[get_user()]) ? 'Test mode enabled' : 'Test mode disabled') . "</b><br /></li>\n\t\t\t<li><a href='manual/admin-notes.php'>Switch public access to user notes\n\t\t\t\t<b>" . (file_exists($okfile) ? 'off' : 'on') . "</b></a> (restricted)<br /></li>\n\t\t\t<li><a href='manual/admin-notes.php?m'>Switch outgoing mail\n\t\t\t\t<b>" . (file_exists($mailfile) ? 'off' : 'on') . "</b></a> (restricted)<br /></li>\n\t\t\t<li><a href='admin-logout.php'>Log out</a></li>\n\t\t</ul>\n\t";
}
print stretchPage(7);
print "&nbsp;</div>\n";
commonFooter();
예제 #2
0
        }
        ?>
</textarea>
   <br />
  </td>
 </tr>
 <tr>
  <td>&nbsp;</td>
  <td>
   <input type = "hidden" name = "referer" value = "<?php 
        echo $referrer;
        ?>
">
   <input type = 'submit' name = 'cancel' value = 'Cancel'>
   <input type = 'submit' name = 'preview' value = 'Preview'>
   <input type = 'submit' name = 'add' value = 'Add note' onClick = 'return check_email();'>
  </td>
 </tr>
</table>
</form>

<?php 
    }
} else {
    /* hide everything if the notes mechanism is down */
    print stretchPage(22);
    print "<p>The PHP-GTK manual notes system is off-line at present. Please try again later!</p>\n";
    print "<p><a href = '{$referrer}'>Back</a></p>\n";
    print "</div>\n";
}
commonFooter();
예제 #3
0
} else {
    for ($i = ord('a'); $i <= ord('z'); $i++) {
        $letter = chr($i);
        if (isset($used[$letter])) {
            $links[] = make_link("{$_SERVER['PHP_SELF']}?let={$letter}{$queue}", "<b>{$letter}</b>");
        } else {
            $links[] = $letter;
        }
    }
}
$jumpbar = "<table border='0' cellpadding='4' cellspacing='0' width='100%'>\n" . "<tr bgcolor='#d0d0d0' valign='top'>\n" . "<td align='right' colspan='2'><small>Jump to: " . implode(" <span style='color:#999999'>|</span> ", $links) . "<br /></small></td>\n" . "</tr>\n" . "</table><br />\n\n";
echo $jumpbar;
echo '<table border="0" cellpadding="4" cellspacing="0" width="100%">';
if (!isset($used[$let]) && $order != 'date') {
    echo '<tr><td colspan="2">No entries for <b>' . $let . '</b><br /></td></tr>';
    echo stretchPage(15);
    echo "&nbsp;</div>";
} else {
    $db = sqlite_open($notesfile);
    if ($order == 'date') {
        $query = sqlite_query($db, "SELECT * FROM notes WHERE strftime('%Y', date, 'unixepoch') = '{$y}' ORDER BY date DESC");
    } else {
        $query = sqlite_query($db, "SELECT * FROM notes WHERE lower(substr({$order}, 1, 1)) = '{$let}' ORDER BY lower({$order})");
    }
    while ($row = sqlite_fetch_array($query, SQLITE_ASSOC)) {
        if ($order == 'page') {
            if ($row['page'] != $last) {
                makeTitle($row['page']);
                $last = $row['page'];
            }
        } else {