本文整理汇总了PHP中pagestart_nobody函数的典型用法代码示例。如果您正苦于以下问题:PHP pagestart_nobody函数的具体用法?PHP pagestart_nobody怎么用?PHP pagestart_nobody使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了pagestart_nobody函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: mysql_free_result
mysql_free_result($res);
$sql = 'select LgTextSize, LgRemoveSpaces, LgRightToLeft from languages where LgID = ' . $langid;
$res = mysql_query($sql);
if ($res == FALSE) {
die("Invalid Query: {$sql}");
}
$record = mysql_fetch_assoc($res);
$textsize = $record['LgTextSize'];
$removeSpaces = $record['LgRemoveSpaces'];
$rtlScript = $record['LgRightToLeft'];
mysql_free_result($res);
saveSetting('currenttext', $textid);
saveSetting('currentprintannotation', $ann);
saveSetting('currentprintstatus', $status);
saveSetting('currentprintannotationplacement', $annplcmnt);
pagestart_nobody('Print');
echo '<div id="noprint">';
echo '<h4>';
echo '<a href="edit_texts.php" target="_top">';
echo '<img src="img/lwt_icon.png" class="lwtlogo" alt="Logo" />Learning with Texts';
echo '</a> | ';
quickMenu();
echo ' | <a href="do_text.php?start=' . $textid . '" target="_top"><img src="icn/book-open-bookmark.png" title="Read" alt="Read" /></a> <a href="do_test.php?text=' . $textid . '" target="_top"><img src="icn/question-balloon.png" title="Test" alt="Test" /></a> <a target="_top" href="edit_texts.php?chg=' . $textid . '"><img src="icn/document--pencil.png" title="Edit Text" alt="Edit Text" /></a>';
echo '</h4><h3>PRINT ▶ ' . tohtml($title) . '</h3>';
echo "<p id=\"printoptions\">Terms with <b>status(es)</b><select id=\"status\" onchange=\"{val=document.getElementById('status').options[document.getElementById('status').selectedIndex].value;location.href='print_text.php?text=" . $textid . "&status=' + val;}\">";
echo get_wordstatus_selectoptions($status, true, true, false);
echo "</select> ...<br />will be <b>annotated</b> with ";
echo "<select id=\"ann\" onchange=\"{val=document.getElementById('ann').options[document.getElementById('ann').selectedIndex].value;location.href='print_text.php?text=" . $textid . "&ann=' + val;}\">";
echo "<option value=\"0\"" . get_selected(0, $ann) . ">Nothing</option>";
echo "<option value=\"1\"" . get_selected(1, $ann) . ">Translation</option>";
echo "<option value=\"5\"" . get_selected(5, $ann) . ">Translation & Tags</option>";
示例2: getreq
require_once 'utilities.inc.php';
$textid = getreq('text');
$sql = 'select TxLgID, TxTitle, TxAudioURI, TxSourceURI from ' . $tbpref . 'texts where TxID = ' . $textid;
$res = do_mysql_query($sql);
$record = mysql_fetch_assoc($res);
$audio = $record['TxAudioURI'];
if (!isset($audio)) {
$audio = '';
}
$audio = trim($audio);
$title = $record['TxTitle'];
$sourceURI = $record['TxSourceURI'];
$langid = $record['TxLgID'];
mysql_free_result($res);
saveSetting('currenttext', $textid);
pagestart_nobody(tohtml($title));
echo '<h2 class="center" style="margin:5px;margin-top:-10px;">';
?>
<script type="text/javascript">
//<![CDATA[
function do_hide_t() {
$('#showt').show();
$('#hidet').hide();
$('.anntermruby', window.parent.frames['text'].document).css('color','#E5E4E2').css('background-color', '#E5E4E2');
}
function do_show_t() {
$('#showt').hide();
$('#hidet').show();
$('.anntermruby', window.parent.frames['text'].document).css('color','black').css('background-color', 'white');
}
示例3: repl_tab_nl
$term = $record['WoText'];
$lang = $record['WoLgID'];
$transl = repl_tab_nl($record['WoTranslation']);
if ($transl == '*') {
$transl = '';
}
$sentence = repl_tab_nl($record['WoSentence']);
$rom = $record['WoRomanization'];
$status = $record['WoStatus'];
} else {
die("Error: No results");
}
mysql_free_result($res);
$termlc = mb_strtolower($term, 'UTF-8');
$titeltext = "Edit Term: " . tohtml($term);
pagestart_nobody($titeltext);
$scrdir = getScriptDirectionTag($lang);
?>
<form name="editword" class="validate" action="<?php
echo $_SERVER['PHP_SELF'];
?>
" method="post">
<input type="hidden" name="WoID" value="<?php
echo $wid;
?>
" />
<input type="hidden" name="WoOldStatus" value="<?php
echo $status;
?>
" />
示例4: tohtml
$span2 = "<b>Default</b> Table Set</span>";
} else {
$span2 = "Table Set: <b>" . tohtml(substr($tbpref, 0, -1)) . "</b></span>";
}
if ($fixed_tbpref) {
$span1 = '<span>';
$span3 = '<span>';
} else {
$span1 = '<span title="Manage Table Sets" onclick="location.href=\'table_set_management.php\';" class="click">';
if (count(getprefixes()) > 0) {
$span3 = '<span title="Select Table Set" onclick="location.href=\'start.php\';" class="click">';
} else {
$span3 = '<span>';
}
}
pagestart_nobody("Home");
echo '<h4>' . $span3;
echo_lwt_logo();
echo "Learning With Texts (LWT)";
echo '</span></h4><h3>Home' . ($debug ? ' <span class="red">DEBUG</span>' : '') . '</h3>';
echo "<p> </p>";
$currentlang = getSetting('currentlanguage');
$currenttext = getSetting('currenttext');
$langcnt = get_first_value('select count(*) as value from ' . $tbpref . 'languages');
if ($langcnt == 0) {
echo '<table class="tab3" cellspacing="0" cellpadding="5"><tr><th class="th1">Hint: The database seems to be empty.<br /><a href="install_demo.php">You may install the LWT demo database, </a><br />or<br /><a href="edit_languages.php?new=1">define the first language you want to learn.</a></th></tr></table>';
}
?>
<script type="text/javascript">
//<![CDATA[
示例5: get_first_value
$title = "All Terms in " . get_first_value('select LgName as value from ' . $tbpref . 'languages where LgID = ' . $langid);
$testsql = ' ' . $tbpref . 'words where WoLgID = ' . $langid . ' ';
}
if (isset($_REQUEST['text'])) {
$textid = getreq('text');
$p = "text=" . $textid;
$title = get_first_value('select TxTitle as value from ' . $tbpref . 'texts where TxID = ' . $textid);
saveSetting('currenttext', $_REQUEST['text']);
$testsql = ' ' . $tbpref . 'words, ' . $tbpref . 'textitems where TiLgID = WoLgID and TiTextLC = WoTextLC and TiTxID = ' . $textid . ' ';
}
if ($p == '') {
my_die("do_test_header.php called with wrong parameters");
}
$totalcountdue = get_first_value('SELECT count(distinct WoID) as value FROM ' . $testsql . ' AND WoStatus BETWEEN 1 AND 5 AND WoTranslation != \'\' AND WoTranslation != \'*\' AND WoTodayScore < 0');
$totalcount = get_first_value('SELECT count(distinct WoID) as value FROM ' . $testsql . ' AND WoStatus BETWEEN 1 AND 5 AND WoTranslation != \'\' AND WoTranslation != \'*\'');
pagestart_nobody(tohtml($title), $addcss = 'html, body {margin-bottom:0;}');
echo '<h4>';
echo '<a href="edit_texts.php" target="_top">';
echo_lwt_logo();
echo 'LWT';
echo '</a> | ';
quickMenu();
if (substr($p, 0, 4) == 'text') {
echo getPreviousAndNextTextLinks($textid, 'do_test.php?text=', FALSE, ' | ');
echo ' | <a href="do_text.php?start=' . $textid . '" target="_top"><img src="icn/book-open-bookmark.png" title="Read" alt="Read" /></a> <a href="print_text.php?text=' . $textid . '" target="_top"><img src="icn/printer.png" title="Print" alt="Print" /></a>' . get_annotation_link($textid);
}
echo '</h4><table><tr><td><h3>TEST ▶</h3></td><td class="width99pc"><h3>' . tohtml($title) . ' (Due: ' . $totalcountdue . ' of ' . $totalcount . ')</h3></td></tr><tr><td colspan="2">';
$_SESSION['teststart'] = time() + 2;
$_SESSION['testcorrect'] = 0;
$_SESSION['testwrong'] = 0;
$_SESSION['testtotal'] = $totalcountdue;
示例6: getreq
$testtype = getreq('type') + 0;
if ($testtype < 1) {
$testtype = 1;
}
if ($testtype > 5) {
$testtype = 5;
}
$nosent = 0;
if ($testtype > 3) {
$testtype = $testtype - 3;
$nosent = 1;
}
$totaltests = $_SESSION['testtotal'];
$wrong = $_SESSION['testwrong'];
$correct = $_SESSION['testcorrect'];
pagestart_nobody('', 'html, body { width:100%; height:100%; } html {display:table;} body { display:table-cell; vertical-align:middle; } #body { max-width:95%; margin:0 auto; }');
$cntlang = get_first_value('select count(distinct WoLgID) as value from ' . $testsql);
if ($cntlang > 1) {
echo '<p>Sorry - The selected terms are in ' . $cntlang . ' languages, but tests are only possible in one language at a time.</p>';
pageend();
exit;
}
?>
<div id="body">
<?php
$count = get_first_value('SELECT count(distinct WoID) as value FROM ' . $testsql . ' AND WoStatus BETWEEN 1 AND 5 AND WoTranslation != \'\' AND WoTranslation != \'*\' AND WoTodayScore < 0');
if ($debug) {
echo 'DEBUG - COUNT TO TEST: ' . $count . '<br />';
}
$notyettested = $count;
if ($count <= 0) {
示例7: trim
$langid = $record['TxLgID'];
$audio = $record['TxAudioURI'];
if (!isset($audio)) {
$audio = '';
}
$audio = trim($audio);
mysql_free_result($res);
$sql = 'select LgTextSize, LgRemoveSpaces, LgRightToLeft from ' . $tbpref . 'languages where LgID = ' . $langid;
$res = do_mysql_query($sql);
$record = mysql_fetch_assoc($res);
$textsize = $record['LgTextSize'];
$removeSpaces = $record['LgRemoveSpaces'];
$rtlScript = $record['LgRightToLeft'];
mysql_free_result($res);
saveSetting('currenttext', $textid);
pagestart_nobody('Annotated Text');
echo '<div class="noprint">';
echo '<h4>';
echo '<a href="edit_texts.php" target="_top">';
echo_lwt_logo();
echo 'LWT';
echo '</a> | ';
quickMenu();
echo getPreviousAndNextTextLinks($textid, 'print_impr_text.php?text=', TRUE, ' | ');
echo ' | <a href="do_text.php?start=' . $textid . '" target="_top"><img src="icn/book-open-bookmark.png" title="Read" alt="Read" /></a> <a href="do_test.php?text=' . $textid . '" target="_top"><img src="icn/question-balloon.png" title="Test" alt="Test" /></a> <a href="print_text.php?text=' . $textid . '" target="_top"><img src="icn/printer.png" title="Print" alt="Print" /> <a target="_top" href="edit_texts.php?chg=' . $textid . '"><img src="icn/document--pencil.png" title="Edit Text" alt="Edit Text" /></a>';
echo '</h4><h3>ANN.TEXT ▶ ' . tohtml($title) . (isset($sourceURI) ? ' <a href="' . $sourceURI . '" target="_blank"><img src="icn/chain.png" title="Text Source" alt="Text Source" /></a>' : '') . '</h3>';
echo "<p id=\"printoptions\"><b>Improved Annotated Text";
if ($editmode) {
echo " (Edit Mode)</b> <img src=\"icn/question-frame.png\" title=\"Help\" alt=\"Help\" class=\"click\" onclick=\"window.open('info.htm#il');\" /><br /><input type=\"button\" value=\"Display/Print Mode\" onclick=\"location.href='print_impr_text.php?text=" . $textid . "';\" />\n";
} else {
echo " (Display/Print Mode)</b><br /><input type=\"button\" value=\"Edit\" onclick=\"location.href='print_impr_text.php?edit=1&text=" . $textid . "';\" />";
示例8: getreq
}
?>
//]]>
</script>
<?php
}
// (substr($message,0,5) != 'Error')
}
// $_REQUEST['op'] == 'Save'
} else {
// if (! isset($_REQUEST['op']))
// new_word.php?text=..&lang=..
$lang = getreq('lang') + 0;
$text = getreq('text') + 0;
pagestart_nobody('');
$scrdir = getScriptDirectionTag($lang);
?>
<form name="newword" class="validate" action="<?php
echo $_SERVER['PHP_SELF'];
?>
" method="post">
<input type="hidden" name="WoLgID" value="<?php
echo $lang;
?>
" />
<input type="hidden" name="tid" value="<?php
echo $text;
?>
" />
示例9: pagestart
function pagestart($titletext, $close)
{
global $debug;
pagestart_nobody($titletext);
echo '<h4>';
if ($close) {
echo '<a href="index.php" target="_top">';
}
echo_lwt_logo();
echo "LWT";
if ($close) {
echo '</a> | ';
quickMenu();
}
echo '</h4><h3>' . $titletext . ($debug ? ' <span class="red">DEBUG</span>' : '') . '</h3>';
echo "<p> </p>";
}
示例10: do_mysql_query
} else {
$sql = 'select WoText, WoLgID from ' . $tbpref . 'words where WoID = ' . $wid;
$res = do_mysql_query($sql);
$record = mysql_fetch_assoc($res);
if ($record) {
$term = $record['WoText'];
$lang = $record['WoLgID'];
} else {
my_die("Cannot access Term and Language in edit_word.php");
}
mysql_free_result($res);
$termlc = mb_strtolower($term, 'UTF-8');
}
$new = isset($wid) == FALSE;
$titletext = ($new ? "New Term" : "Edit Term") . ": " . tohtml($term);
pagestart_nobody($titletext);
?>
<script type="text/javascript" src="js/unloadformcheck.js" charset="utf-8"></script>
<?php
$scrdir = getScriptDirectionTag($lang);
// NEW
if ($new) {
$seid = get_first_value("select TiSeID as value from " . $tbpref . "textitems where TiTxID = " . $_REQUEST['tid'] . " and TiWordCount = 1 and TiOrder = " . $_REQUEST['ord']);
$sent = getSentence($seid, $termlc, (int) getSettingWithDefault('set-term-sentence-count'));
?>
<form name="newword" class="validate" action="<?php
echo $_SERVER['PHP_SELF'];
?>
" method="post">
<input type="hidden" name="fromAnn" value="<?php
示例11: pagestart_nobody
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
For more information, please refer to [http://unlicense.org/].
***************************************************************/
/**************************************************************
Call: show_word.php?wid=...&ann=...
Show term
***************************************************************/
require_once 'settings.inc.php';
require_once 'connect.inc.php';
require_once 'dbutils.inc.php';
require_once 'utilities.inc.php';
pagestart_nobody('Term');
$wid = getreq('wid');
$ann = stripTheSlashesIfNeeded($_REQUEST["ann"]);
if ($wid == '') {
my_die('Word not found in show_word.php');
}
$sql = 'select WoLgID, WoText, WoTranslation, WoSentence, WoRomanization, WoStatus from ' . $tbpref . 'words where WoID = ' . $wid;
$res = do_mysql_query($sql);
if ($record = mysql_fetch_assoc($res)) {
$transl = repl_tab_nl($record['WoTranslation']);
if ($transl == '*') {
$transl = '';
}
$tags = getWordTagList($wid, '', 0, 0);
$rom = $record['WoRomanization'];
$scrdir = getScriptDirectionTag($record['WoLgID']);
示例12: pagestart
function pagestart($titeltext, $close)
{
global $debug;
pagestart_nobody($titeltext);
echo '<h4>';
if ($close) {
echo '<a href="index.php" target="_top">';
}
echo '<img class="lwtlogo" src="img/lwt_icon.png" alt="Logo" />Learning with Texts';
if ($close) {
echo '</a> | ';
quickMenu();
}
echo '</h4><h3>' . $titeltext . ($debug ? ' <span class="red">DEBUG</span>' : '') . '</h3>';
echo "<p> </p>";
}
示例13: do_mysql_query
}
$sql = 'select TxLgID, TxTitle from ' . $tbpref . 'texts where TxID = ' . $textid;
$res = do_mysql_query($sql);
$record = mysql_fetch_assoc($res);
$title = $record['TxTitle'];
$langid = $record['TxLgID'];
mysql_free_result($res);
$sql = 'select LgTextSize, LgRemoveSpaces, LgRightToLeft from ' . $tbpref . 'languages where LgID = ' . $langid;
$res = do_mysql_query($sql);
$record = mysql_fetch_assoc($res);
$textsize = $record['LgTextSize'];
$removeSpaces = $record['LgRemoveSpaces'];
$rtlScript = $record['LgRightToLeft'];
mysql_free_result($res);
saveSetting('currenttext', $textid);
pagestart_nobody('Display');
?>
<script type="text/javascript">
//<![CDATA[
function click_ann() {
if($(this).css('color') == 'rgb(200, 220, 240)') {
$(this).css('color','#006699');
$(this).css('background-color','white');
}
else {
$(this).css('color','#C8DCF0');
$(this).css('background-color','#C8DCF0');
}
}
示例14: get_wizard_selectoptions
require_once 'settings.inc.php';
require_once 'connect.inc.php';
require_once 'dbutils.inc.php';
require_once 'utilities.inc.php';
require_once 'langdefs.inc.php';
function get_wizard_selectoptions($v)
{
global $langDefs;
$r = "<option value=\"\"" . get_selected($v, "") . ">[Choose...]</option>";
$keys = array_keys($langDefs);
foreach ($keys as $item) {
$r .= "<option value=\"" . $item . "\"" . get_selected($v, $item) . ">" . $item . "</option>";
}
return $r;
}
pagestart_nobody('Language Settings Wizard', 'body {background-color: #FFFACD;}');
$currentnativelanguage = getSetting('currentnativelanguage');
?>
<script type="text/javascript">
//<![CDATA[
<?php
echo "var LANGDEFS = " . json_encode($langDefs) . ";\n";
?>
function wizard_go() {
var l1 = $('#l1').val();
var l2 = $('#l2').val();
if (l1 == '') {
alert ('Please choose your native language (L1)!');
示例15: elseif
***************************************************************/
require_once 'settings.inc.php';
require_once 'connect.inc.php';
require_once 'dbutils.inc.php';
require_once 'utilities.inc.php';
$p = '';
if (isset($_REQUEST['selection']) && isset($_SESSION['testsql'])) {
$testsql = $_SESSION['testsql'];
} elseif (isset($_REQUEST['lang'])) {
$testsql = ' ' . $tbpref . 'words where WoLgID = ' . $_REQUEST['lang'] . ' ';
} elseif (isset($_REQUEST['text'])) {
$testsql = ' ' . $tbpref . 'words, ' . $tbpref . 'textitems where TiLgID = WoLgID and TiTextLC = WoTextLC and TiTxID = ' . $_REQUEST['text'] . ' ';
} else {
my_die("do_test_table.php called with wrong parameters");
}
pagestart_nobody('', 'html, body { margin:3px; padding:0; }');
$cntlang = get_first_value('select count(distinct WoLgID) as value from ' . $testsql);
if ($cntlang > 1) {
echo '<p>Sorry - The selected terms are in ' . $cntlang . ' languages, but tests are only possible in one language at a time.</p>';
pageend();
exit;
}
$lang = get_first_value('select WoLgID as value from ' . $testsql . ' limit 1');
if (!isset($lang)) {
echo '<p class="center"> <br />Sorry - No terms to display or to test at this time.</p>';
pageend();
exit;
}
$sql = 'select LgTextSize, LgRegexpWordCharacters, LgRightToLeft from ' . $tbpref . 'languages where LgID = ' . $lang;
$res = do_mysql_query($sql);
$record = mysql_fetch_assoc($res);