当前位置: 首页>>代码示例>>PHP>>正文


PHP pagestart函数代码示例

本文整理汇总了PHP中pagestart函数的典型用法代码示例。如果您正苦于以下问题:PHP pagestart函数的具体用法?PHP pagestart怎么用?PHP pagestart使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了pagestart函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: processDBParam

      ... new=1 ... display new tag screen 
      ... chg=[wordid] ... display edit screen 
      ... sort=[sortcode] ... sort 
      ... page=[pageno] ... page  
      ... query=[tagtextfilter] ... tag text filter    
Manage tags
***************************************************************/
include "connect.inc.php";
include "settings.inc.php";
include "utilities.inc.php";
$currentsort = processDBParam("sort", 'currenttagsort', '1', 1);
$currentpage = processSessParam("page", "currenttagpage", '1', 1);
$currentquery = processSessParam("query", "currenttagquery", '', 0);
$wh_query = convert_string_to_sqlsyntax(str_replace("*", "%", $currentquery));
$wh_query = $currentquery != '' ? ' and (TgText like ' . $wh_query . ' or TgComment like ' . $wh_query . ')' : '';
pagestart('My Term Tags', true);
$message = '';
// MARK ACTIONS
if (isset($_REQUEST['markaction'])) {
    $markaction = $_REQUEST['markaction'];
    $message = "Multiple Actions: 0";
    if (isset($_REQUEST['marked'])) {
        if (is_array($_REQUEST['marked'])) {
            $l = count($_REQUEST['marked']);
            if ($l > 0) {
                $list = "(" . $_REQUEST['marked'][0];
                for ($i = 1; $i < $l; $i++) {
                    $list .= "," . $_REQUEST['marked'][$i];
                }
                $list .= ")";
                if ($markaction == 'del') {
开发者ID:russell359,项目名称:lwt,代码行数:31,代码来源:edit_tags.php

示例2: notempty

}
function notempty($var)
{
    return trim($var) != '';
}
function limit20(&$item, $key)
{
    $item = mb_substr($item, 0, 20);
}
function savetag($item, $key, $wid)
{
    global $tbpref;
    runsql('insert into ' . $tbpref . 'tags (TgText) values(' . convert_string_to_sqlsyntax($item) . ')', "");
    runsql('insert into ' . $tbpref . 'wordtags (WtWoID, WtTgID) select ' . $wid . ', TgID from ' . $tbpref . 'tags where TgText = ' . convert_string_to_sqlsyntax($item), "");
}
pagestart('Import Terms', true);
$message = '';
// Import
if (isset($_REQUEST['op'])) {
    // INSERT
    if ($_REQUEST['op'] == 'Import') {
        $col[0] = $_REQUEST["Col1"];
        $col[1] = $_REQUEST["Col2"];
        $col[2] = $_REQUEST["Col3"];
        $col[3] = $_REQUEST["Col4"];
        $col[4] = $_REQUEST["Col5"];
        $overwrite = $_REQUEST["Over"] == '1';
        $tabs = $_REQUEST["Tab"];
        $sqlct = 0;
        $lang = $_REQUEST["LgID"];
        $status = $_REQUEST["WoStatus"];
开发者ID:chajadan,项目名称:lwt,代码行数:31,代码来源:upload_words.php

示例3: processDBParam

      ... new=1 ... display new text tag screen 
      ... chg=[wordid] ... display edit screen 
      ... sort=[sortcode] ... sort 
      ... page=[pageno] ... page  
      ... query=[tagtextfilter] ... tag text filter    
Manage tags
***************************************************************/
include "connect.inc.php";
include "settings.inc.php";
include "utilities.inc.php";
$currentsort = processDBParam("sort", 'currenttexttagsort', '1', 1);
$currentpage = processSessParam("page", "currenttexttagpage", '1', 1);
$currentquery = processSessParam("query", "currenttexttagquery", '', 0);
$wh_query = convert_string_to_sqlsyntax(str_replace("*", "%", $currentquery));
$wh_query = $currentquery != '' ? ' and (T2Text like ' . $wh_query . ' or T2Comment like ' . $wh_query . ')' : '';
pagestart('My Text Tags', true);
$message = '';
// MARK ACTIONS
if (isset($_REQUEST['markaction'])) {
    $markaction = $_REQUEST['markaction'];
    $message = "Multiple Actions: 0";
    if (isset($_REQUEST['marked'])) {
        if (is_array($_REQUEST['marked'])) {
            $l = count($_REQUEST['marked']);
            if ($l > 0) {
                $list = "(" . $_REQUEST['marked'][0];
                for ($i = 1; $i < $l; $i++) {
                    $list .= "," . $_REQUEST['marked'][$i];
                }
                $list .= ")";
                if ($markaction == 'del') {
开发者ID:russell359,项目名称:lwt,代码行数:31,代码来源:edit_texttags.php

示例4: get_first_value

THE SOFTWARE.

For more information, please refer to [http://unlicense.org/].
***************************************************************/
/**************************************************************
Call: delete_word.php?wid=[wordid]&tid=[textid]
Delete a word
***************************************************************/
require_once 'settings.inc.php';
require_once 'connect.inc.php';
require_once 'dbutils.inc.php';
require_once 'utilities.inc.php';
$tid = $_REQUEST['tid'];
$wid = $_REQUEST['wid'];
$term = get_first_value("select WoText as value from " . $tbpref . "words where WoID = " . $wid);
pagestart("Term: " . $term, false);
$m1 = runsql('delete from ' . $tbpref . 'words where WoID = ' . $wid, '');
adjust_autoincr('words', 'WoID');
echo "<p>OK, term deleted, now unknown (" . $m1 . ").</p>";
?>
<script type="text/javascript">
//<![CDATA[
var context = window.parent.frames['l'].document;
var contexth = window.parent.frames['h'].document;
var title = make_tooltip(<?php 
echo prepare_textdata_js($term);
?>
,'','','');
$('.word<?php 
echo $wid;
?>
开发者ID:Fips11,项目名称:lwt,代码行数:31,代码来源:delete_word.php

示例5: pagestart

In case this is not legally possible, any entity is granted the
right to use this work for any purpose, without any conditions, 
unless such conditions are required by law.

Developed by J.P. in 2011, 2012.
***************************************************************/
/**************************************************************
Call: settings.php?....
      ... op=Save ... do save 
      ... op=Reset ... do reset to defaults 
Preferences / Settings 
***************************************************************/
include "connect.inc.php";
include "settings.inc.php";
include "utilities.inc.php";
pagestart('Settings/Preferences', true);
$message = '';
if (isset($_REQUEST['op'])) {
    if ($_REQUEST['op'] == 'Save') {
        saveSetting('set-text-h-frameheight-no-audio', $_REQUEST['set-text-h-frameheight-no-audio']);
        saveSetting('set-text-h-frameheight-with-audio', $_REQUEST['set-text-h-frameheight-with-audio']);
        saveSetting('set-text-l-framewidth-percent', $_REQUEST['set-text-l-framewidth-percent']);
        saveSetting('set-text-r-frameheight-percent', $_REQUEST['set-text-r-frameheight-percent']);
        saveSetting('set-test-h-frameheight', $_REQUEST['set-test-h-frameheight']);
        saveSetting('set-test-l-framewidth-percent', $_REQUEST['set-test-l-framewidth-percent']);
        saveSetting('set-test-r-frameheight-percent', $_REQUEST['set-test-r-frameheight-percent']);
        saveSetting('set-player-skin-name', $_REQUEST['set-player-skin-name']);
        saveSetting('set-test-main-frame-waiting-time', $_REQUEST['set-test-main-frame-waiting-time']);
        saveSetting('set-test-edit-frame-waiting-time', $_REQUEST['set-test-edit-frame-waiting-time']);
        saveSetting('set-test-sentence-count', $_REQUEST['set-test-sentence-count']);
        saveSetting('set-term-sentence-count', $_REQUEST['set-term-sentence-count']);
开发者ID:russell359,项目名称:lwt,代码行数:31,代码来源:settings.php

示例6: word

right to use this work for any purpose, without any conditions, 
unless such conditions are required by law.

Developed by J. Pierre in 2011.
***************************************************************/
/**************************************************************
Call: insert_word_wellknown.php?tid=[textid]&ord=[textpos]
Ignore single word (new term with status 99)
***************************************************************/
include "connect.inc.php";
include "settings.inc.php";
include "utilities.inc.php";
$word = get_first_value("select TiText as value from textitems where TiWordCount = 1 and TiTxID = " . $_REQUEST['tid'] . " and TiOrder = " . $_REQUEST['ord']);
$wordlc = mb_strtolower($word, 'UTF-8');
$langid = get_first_value("select TxLgID as value from texts where TxID = " . $_REQUEST['tid']);
pagestart("Term: " . $word, false);
$m1 = runsql('insert into words (WoLgID, WoText, WoTextLC, WoStatus, WoStatusChanged,' . make_score_random_insert_update('iv') . ') values( ' . $langid . ', ' . convert_string_to_sqlsyntax($word) . ', ' . convert_string_to_sqlsyntax($wordlc) . ', 99, NOW(), ' . make_score_random_insert_update('id') . ')', 'Term added');
$wid = get_last_key();
echo "<p>OK, you know this term well!</p>";
$hex = strToClassName($wordlc);
?>
<script type="text/javascript">
//<![CDATA[
var context = window.parent.frames['l'].document;
var contexth = window.parent.frames['h'].document;
var title = make_tooltip(<?php 
echo prepare_textdata_js($word);
?>
,'*','','99');
$('.TERM<?php 
echo $hex;
开发者ID:hans,项目名称:lwt,代码行数:31,代码来源:insert_word_wellknown.php

示例7: LWTTableSet

if (isset($_REQUEST['prefix'])) {
    if ($_REQUEST['prefix'] !== '-') {
        $tbpref = $_REQUEST['prefix'];
        LWTTableSet("current_table_prefix", $tbpref);
        header("Location: index.php");
        exit;
    }
}
$prefix = getprefixes();
if (count($prefix) == 0) {
    $tbpref = '';
    LWTTableSet("current_table_prefix", $tbpref);
    header("Location: index.php");
    exit;
}
pagestart('Select Table Set', false);
?>

<table class="tab1" style="width: auto;" cellspacing="0" cellpadding="5">

<tr>
<th class="th1">
<form name="f1" class="inline" action="<?php 
echo $_SERVER['PHP_SELF'];
?>
" method="post">
<p>Select: <select name="prefix">
<option value="" <?php 
echo $tbpref == '' ? 'selected="selected"' : '';
?>
>Default Table Set</option>
开发者ID:nahabi4,项目名称:lwt,代码行数:31,代码来源:start.php

示例8: die

right to use this work for any purpose, without any conditions, 
unless such conditions are required by law.

Developed by J.P. in 2011, 2012.
***************************************************************/
/**************************************************************
Call: index.php
LWT Start Screen / Main Menu / Home
***************************************************************/
if (!file_exists('connect.inc.php')) {
    die('Fatal Error, cannot find file: "connect.inc.php". Please rename the correct file "connect_[servertype].inc.php" to "connect.inc.php" ([servertype] is the name of your server: xampp, mamp, or easyphp). Please read the documentation: http://lwt.sf.net');
}
include "connect.inc.php";
include "settings.inc.php";
include "utilities.inc.php";
pagestart('Home', false);
$currentlang = getSetting('currentlanguage');
$currenttext = getSetting('currenttext');
$langcnt = get_first_value('select count(*) as value from 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[
if (! areCookiesEnabled()) document.write('<p class="red">*** Cookies are not enabled! Please enable! ***</p>');
//]]>
</script>

<?php 
开发者ID:russell359,项目名称:lwt,代码行数:31,代码来源:index.php

示例9: pagestart

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: long_text_import.php?...
			op=...
Long Text Import
***************************************************************/
require_once 'settings.inc.php';
require_once 'connect.inc.php';
require_once 'dbutils.inc.php';
require_once 'utilities.inc.php';
pagestart('Long Text Import', true);
$message = '';
$max_input_vars = ini_get('max_input_vars');
if ($max_input_vars === FALSE) {
    $max_input_vars = 1000;
}
if ($max_input_vars == '') {
    $max_input_vars = 1000;
}
if (isset($_REQUEST['op'])) {
    if (substr($_REQUEST['op'], 0, 5) == 'NEXT ') {
        $langid = $_REQUEST["LgID"];
        $title = stripTheSlashesIfNeeded($_REQUEST["TxTitle"]);
        $paragraph_handling = $_REQUEST["paragraph_handling"];
        $maxsent = $_REQUEST["maxsent"];
        $source_uri = stripTheSlashesIfNeeded($_REQUEST["TxSourceURI"]);
开发者ID:nahabi4,项目名称:lwt,代码行数:31,代码来源:long_text_import.php

示例10: getreq

right to use this work for any purpose, without any conditions, 
unless such conditions are required by law.

Developed by J.P. in 2011, 2012.
***************************************************************/
/**************************************************************
Call: set_text_mode.php?text=[textid]&mode=0/1
Change the text display mode
***************************************************************/
include "connect.inc.php";
include "settings.inc.php";
include "utilities.inc.php";
$tid = getreq('text') + 0;
$showAll = getreq('mode') + 0;
saveSetting('showallwords', $showAll);
pagestart("Text Display Mode changed", false);
echo '<p><span id="waiting"><img src="icn/waiting.gif" alt="Please wait" title="Please wait" />&nbsp;&nbsp;Please wait ...</span>';
flush();
?>

<script type="text/javascript">
//<![CDATA[
var method = 1;  // 0 (jquery, deactivated, too slow) or 1 (reload) 
if (method) window.parent.frames['l'].location.reload();
else {
var context = window.parent.frames['l'].document;
<?php 
/**************************************************************
(jquery, deact.)

$sql = 'select TiWordCount as Code, TiText, TiOrder, TiIsNotWord, WoID from (textitems left join words on (TiTextLC = WoTextLC) and (TiLgID = WoLgID)) where TiTxID = ' . $tid . ' order by TiOrder asc, TiWordCount desc';
开发者ID:russell359,项目名称:lwt,代码行数:31,代码来源:set_text_mode.php

示例11: Check

This applies worldwide.
In case this is not legally possible, any entity is granted the
right to use this work for any purpose, without any conditions, 
unless such conditions are required by law.

Developed by J.P. in 2011, 2012.
***************************************************************/
/**************************************************************
Call: check_text.php?...
			op=Check ... do the check
Check (parse & split) a Text (into sentences/words)
***************************************************************/
include "connect.inc.php";
include "settings.inc.php";
include "utilities.inc.php";
pagestart('Check a Text', true);
if (isset($_REQUEST['op'])) {
    echo '<p><input type="button" value="&lt;&lt; Back" onclick="history.back();" /></p>';
    if (strlen(prepare_textdata($_REQUEST['TxText'])) > 65000) {
        echo "<p>Error: Text too long, must be below 65000 Bytes.</p>";
    } else {
        echo checkText($_REQUEST['TxText'], $_REQUEST['TxLgID']);
    }
    echo '<p><input type="button" value="&lt;&lt; Back" onclick="history.back();" /></p>';
} else {
    ?>
<form class="validate" action="<?php 
    echo $_SERVER['PHP_SELF'];
    ?>
" method="post">
<table class="tab3" cellspacing="0" cellpadding="5">
开发者ID:russell359,项目名称:lwt,代码行数:31,代码来源:check_text.php

示例12: runsql

    $dummy = runsql('TRUNCATE ' . $tbpref . 'languages', '');
    $dummy = runsql('TRUNCATE ' . $tbpref . 'sentences', '');
    $dummy = runsql('TRUNCATE ' . $tbpref . 'tags', '');
    $dummy = runsql('TRUNCATE ' . $tbpref . 'tags2', '');
    $dummy = runsql('TRUNCATE ' . $tbpref . 'textitems', '');
    $dummy = runsql('TRUNCATE ' . $tbpref . 'texts', '');
    $dummy = runsql('TRUNCATE ' . $tbpref . 'texttags', '');
    $dummy = runsql('TRUNCATE ' . $tbpref . 'words', '');
    $dummy = runsql('TRUNCATE ' . $tbpref . 'wordtags', '');
    $dummy = runsql('DELETE FROM ' . $tbpref . 'settings where StKey = \'currenttext\'', '');
    optimizedb();
    get_tags($refresh = 1);
    get_texttags($refresh = 1);
    $message = "Database content has been deleted (but settings have been kept)";
}
pagestart('Backup/Restore/Empty Database', true);
echo error_message_with_hide($message, 1);
if ($tbpref == '') {
    $prefinfo = "(Default Table Set)";
} else {
    $prefinfo = "(Table Set: <i>" . tohtml(substr($tbpref, 0, -1)) . "</i>)";
}
?>
<form enctype="multipart/form-data" action="<?php 
echo $_SERVER['PHP_SELF'];
?>
" method="post" onsubmit="return confirm('Are you sure?');">
<table class="tab1" cellspacing="0" cellpadding="5">
<tr>
<th class="th1 center">Backup</th>
<td class="td1">
开发者ID:MaVince,项目名称:lwt,代码行数:31,代码来源:backup_restore.php

示例13: getcwd

if (isset($_REQUEST['install'])) {
    $file = getcwd() . '/install_demo_db.sql.gz';
    if (file_exists($file)) {
        $handle = gzopen($file, "r");
        if ($handle === FALSE) {
            $message = "Error: File ' . {$file} . ' could not be opened";
        } else {
            // $handle OK
            $message = restore_file($handle, "Demo Database");
        }
        // $handle OK
    } else {
        $message = "Error: File ' . {$file} . ' does not exist";
    }
}
pagestart('Install LWT Demo Database', true);
echo error_message_with_hide($message, 1);
$langcnt = get_first_value('select count(*) as value from ' . $tbpref . 'languages');
if ($tbpref == '') {
    $prefinfo = "(Default Table Set)";
} else {
    $prefinfo = "(Table Set: <i>" . tohtml(substr($tbpref, 0, -1)) . "</i>)";
}
?>
<form enctype="multipart/form-data" action="<?php 
echo $_SERVER['PHP_SELF'];
?>
" method="post" onsubmit="return confirm('Are you sure?');">
<table class="tab3" cellspacing="0" cellpadding="5">
<tr>
<th class="th1 center">Install Demo</th>
开发者ID:MaVince,项目名称:lwt,代码行数:31,代码来源:install_demo.php

示例14: pagestart

Developed by J. Pierre in 2011.
***************************************************************/
/**************************************************************
Call: edit_languages.php?....
      ... refresh=[langid] ... reparse all texts in lang
      ... del=[langid] ... do delete
      ... op=Save ... do insert new 
      ... op=Change ... do update 
      ... new=1 ... display new lang. screen 
      ... chg=[langid] ... display edit screen 
Manage languages
***************************************************************/
include "connect.inc.php";
include "settings.inc.php";
include "utilities.inc.php";
pagestart('My Languages', true);
$message = '';
// REFRESH
if (isset($_REQUEST['refresh'])) {
    $id = $_REQUEST['refresh'] + 0;
    $message2 = runsql('delete from sentences where SeLgID = ' . $id, "Sentences deleted");
    $message3 = runsql('delete from textitems where TiLgID = ' . $id, "Text items deleted");
    adjust_autoincr('sentences', 'SeID');
    adjust_autoincr('textitems', 'TiID');
    $sql = "select TxID, TxText from texts where TxLgID = " . $id . " order by TxID";
    $res = mysql_query($sql);
    if ($res == FALSE) {
        die("Invalid Query: {$sql}");
    }
    while ($record = mysql_fetch_assoc($res)) {
        $txtid = $record["TxID"];
开发者ID:hans,项目名称:lwt,代码行数:31,代码来源:edit_languages.php

示例15: header

                if ($j < $num_fields - 1) {
                    $return .= ',';
                }
            }
            // foreach field
            $out .= $return . ");\n";
        }
        // foreach record
    }
    // foreach table
    header('Content-type: application/x-gzip');
    header("Content-disposition: attachment; filename=" . $fname);
    echo gzencode($out, 9);
    exit;
}
pagestart('Backup/Restore LWT Database', true);
echo error_message_with_hide($message, 1);
?>
<form enctype="multipart/form-data" action="<?php 
echo $_SERVER['PHP_SELF'];
?>
" method="post">
<table class="tab1" cellspacing="0" cellpadding="5">
<tr>
<th class="th1 center">Backup</th>
<td class="td1">
<p class="smallgray2">
The database <i><?php 
echo tohtml($dbname);
?>
</i> will be exported to a gzipped SQL file. Please keep this file in a safe place.<br />If necessary, you can recreate the database via the Restore function below.<br />Important: If the backup file is too large, the restore may not be possible (see limits below).</p>
开发者ID:hans,项目名称:lwt,代码行数:31,代码来源:backup_restore.php


注:本文中的pagestart函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。