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


PHP getreq函数代码示例

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


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

示例1: having

        $wh_tag = " having (" . $wh_tag1 . ') ';
    } elseif ($currenttag2 != '' && $currenttag1 == '') {
        $wh_tag = " having (" . $wh_tag2 . ') ';
    } else {
        $wh_tag = " having ((" . $wh_tag1 . ($currenttag12 ? ') AND (' : ') OR (') . $wh_tag2 . ')) ';
    }
}
$no_pagestart = getreq('markaction') == 'deltag';
if (!$no_pagestart) {
    pagestart('My ' . getLanguage($currentlang) . ' Text Archive', true);
}
$message = '';
// MARK ACTIONS
if (isset($_REQUEST['markaction'])) {
    $markaction = $_REQUEST['markaction'];
    $actiondata = stripTheSlashesIfNeeded(getreq('data'));
    $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') {
                    $message = runsql('delete from archivedtexts where AtID in ' . $list, "Archived Texts deleted");
                    adjust_autoincr('archivedtexts', 'AtID');
                    runsql("DELETE archtexttags FROM (archtexttags LEFT JOIN archivedtexts on AgAtID = AtID) WHERE AtID IS NULL", '');
                } elseif ($markaction == 'addtag') {
开发者ID:hans,项目名称:lwt,代码行数:31,代码来源:edit_archivedtexts.php

示例2: text

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: display_impr_text_header.php?text=[textid]
Display an improved annotated text (top frame)
***************************************************************/
require_once 'settings.inc.php';
require_once 'connect.inc.php';
require_once 'dbutils.inc.php';
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;">';
开发者ID:nahabi4,项目名称:lwt,代码行数:31,代码来源:display_impr_text_header.php

示例3: Setting

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: save_setting_redirect.php?k=[key]&v=[value]&u=[RedirURI]
Save a Setting (k/v) and redirect to URI u
***************************************************************/
include "connect.inc.php";
include "settings.inc.php";
include "utilities.inc.php";
$k = getreq('k');
$v = getreq('v');
$u = getreq('u');
if ($k == 'currentlanguage') {
    unset($_SESSION['currenttextpage']);
    unset($_SESSION['currenttextquery']);
    unset($_SESSION['currenttexttag1']);
    unset($_SESSION['currenttexttag2']);
    unset($_SESSION['currenttexttag12']);
    unset($_SESSION['currentwordpage']);
    unset($_SESSION['currentwordquery']);
    unset($_SESSION['currentwordstatus']);
    unset($_SESSION['currentwordtext']);
    unset($_SESSION['currentwordtag1']);
    unset($_SESSION['currentwordtag2']);
    unset($_SESSION['currentwordtag12']);
    unset($_SESSION['currentarchivepage']);
    unset($_SESSION['currentarchivequery']);
开发者ID:russell359,项目名称:lwt,代码行数:31,代码来源:save_setting_redirect.php

示例4: getreq

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: set_test_status.php?wid=[wordid]&stchange=+1/-1
      set_test_status.php?wid=[wordid]&status=1..5/98/99
Change status of term while testing
***************************************************************/
include "connect.inc.php";
include "settings.inc.php";
include "utilities.inc.php";
$stchange = getreq('stchange');
$status = getreq('status');
$wid = getreq('wid') + 0;
$oldstatus = get_first_value("select WoStatus as value from words where WoID = " . $wid) + 0;
$oldscore = get_first_value('select greatest(0,round(WoTodayScore,0)) AS value from words where WoID = ' . $wid) + 0;
if ($stchange == '') {
    $status = $status + 0;
    $stchange = $status - $oldstatus;
    if ($stchange <= 0) {
        $stchange = -1;
    }
    if ($stchange > 0) {
        $stchange = 1;
    }
} else {
    $stchange = $stchange + 0;
    $status = $oldstatus + $stchange;
    if ($status < 1) {
开发者ID:hans,项目名称:lwt,代码行数:31,代码来源:set_test_status.php

示例5: getreq

}
if ($ann == '') {
    $ann = 3;
}
$show_rom = $ann & 2;
$show_trans = $ann & 1;
$show_tags = $ann & 4;
$status = getreq('status');
if ($status == '') {
    $status = getSetting('currentprintstatus');
}
if ($status == '') {
    $status = 14;
}
$whstatus = ' and (' . makeStatusCondition('WoStatus', $status) . ') ';
$annplcmnt = getreq('annplcmnt');
if ($annplcmnt == '') {
    $annplcmnt = getSetting('currentprintannotationplacement');
}
if ($annplcmnt == '') {
    $annplcmnt = 0;
}
$sql = 'select TxLgID, TxTitle from texts where TxID = ' . $textid;
$res = mysql_query($sql);
if ($res == FALSE) {
    die("Invalid Query: {$sql}");
}
$record = mysql_fetch_assoc($res);
$title = $record['TxTitle'];
$langid = $record['TxLgID'];
mysql_free_result($res);
开发者ID:robotmay,项目名称:lwt,代码行数:31,代码来源:print_text.php

示例6: prepare_textdata_js

    ?>
;
var roman = <?php 
    echo prepare_textdata_js($_REQUEST["WoRomanization"]);
    ?>
;
$('.word' + woid, context).attr('data_text',wotext).attr('data_trans',trans).attr('data_rom',roman).attr('data_status',status);
window.parent.frames['l'].focus();
window.parent.frames['l'].setTimeout('cClick()', 100);
//]]>
</script>
	
<?php 
} else {
    // if (! isset($_REQUEST['op']))
    $wid = getreq('wid');
    if ($wid == '') {
        die("Error: Term ID missing");
    }
    $sql = 'select WoText, WoLgID, WoTranslation, WoSentence, WoRomanization, WoStatus from words where WoID = ' . $wid;
    $res = mysql_query($sql);
    if ($res == FALSE) {
        die("Invalid Query: {$sql}");
    }
    $record = mysql_fetch_assoc($res);
    if ($record) {
        $term = $record['WoText'];
        $lang = $record['WoLgID'];
        $transl = repl_tab_nl($record['WoTranslation']);
        if ($transl == '*') {
            $transl = '';
开发者ID:russell359,项目名称:lwt,代码行数:31,代码来源:edit_tword.php

示例7: mysql_free_result

            $cnt++;
            $id = $record['WoID'];
            $list .= ($cnt == 1 ? '' : ',') . $id;
        }
        $list .= ")";
        mysql_free_result($res);
        $_SESSION['testsql'] = ' ' . $tbpref . 'words where WoID in ' . $list . ' ';
        header("Location: do_test.php?selection=1");
        exit;
    }
} elseif (isset($_REQUEST['del'])) {
    $message = runsql('delete from ' . $tbpref . 'words where WoID = ' . $_REQUEST['del'], "Deleted");
    adjust_autoincr('words', 'WoID');
    runsql("DELETE " . $tbpref . "wordtags FROM (" . $tbpref . "wordtags LEFT JOIN " . $tbpref . "words on WtWoID = WoID) WHERE WoID IS NULL", '');
} elseif (isset($_REQUEST['op'])) {
    $translation_raw = repl_tab_nl(getreq("WoTranslation"));
    if ($translation_raw == '') {
        $translation = '*';
    } else {
        $translation = $translation_raw;
    }
    // INSERT
    if ($_REQUEST['op'] == 'Save') {
        $message = runsql('insert into ' . $tbpref . 'words (WoLgID, WoTextLC, WoText, ' . 'WoStatus, WoTranslation, WoSentence, WoRomanization, WoStatusChanged,' . make_score_random_insert_update('iv') . ') values( ' . $_REQUEST["WoLgID"] . ', ' . convert_string_to_sqlsyntax(mb_strtolower($_REQUEST["WoText"], 'UTF-8')) . ', ' . convert_string_to_sqlsyntax($_REQUEST["WoText"]) . ', ' . $_REQUEST["WoStatus"] . ', ' . convert_string_to_sqlsyntax($translation) . ', ' . convert_string_to_sqlsyntax(repl_tab_nl($_REQUEST["WoSentence"])) . ', ' . convert_string_to_sqlsyntax($_REQUEST["WoRomanization"]) . ', NOW(), ' . make_score_random_insert_update('id') . ')', "Saved", $sqlerrdie = FALSE);
        $wid = get_last_key();
    } else {
        $oldstatus = $_REQUEST["WoOldStatus"];
        $newstatus = $_REQUEST["WoStatus"];
        $xx = '';
        if ($oldstatus != $newstatus) {
            $xx = ', WoStatus = ' . $newstatus . ', WoStatusChanged = NOW()';
开发者ID:MaVince,项目名称:lwt,代码行数:31,代码来源:edit_words.php

示例8: getreq

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: 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.)
开发者ID:russell359,项目名称:lwt,代码行数:31,代码来源:set_text_mode.php

示例9: elseif

Show test frame
***************************************************************/
include "connect.inc.php";
include "settings.inc.php";
include "utilities.inc.php";
$p = '';
if (isset($_REQUEST['selection']) && isset($_SESSION['testsql'])) {
    $testsql = $_SESSION['testsql'];
} elseif (isset($_REQUEST['lang'])) {
    $testsql = ' words where WoLgID = ' . $_REQUEST['lang'] . ' ';
} elseif (isset($_REQUEST['text'])) {
    $testsql = ' words, textitems where TiLgID = WoLgID and TiTextLC = WoTextLC and TiTxID = ' . $_REQUEST['text'] . ' ';
} else {
    die("Called with wrong parameters");
}
$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; }');
开发者ID:russell359,项目名称:lwt,代码行数:31,代码来源:do_test_test.php

示例10: refreshText

                echo refreshText($text, $_REQUEST['tid']);
            }
            ?>
//]]>
</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;
    ?>
开发者ID:hans,项目名称:lwt,代码行数:31,代码来源:new_word.php

示例11: getreq

For more information, please refer to [http://unlicense.org/].
***************************************************************/
/**************************************************************
Call: print_impr_text.php?text=[textid]&...
			... edit=1 ... edit own annotation 
			... del=1  ... delete own annotation 
Print/Edit an improved annotated text
***************************************************************/
require_once 'settings.inc.php';
require_once 'connect.inc.php';
require_once 'dbutils.inc.php';
require_once 'utilities.inc.php';
$textid = getreq('text') + 0;
$editmode = getreq('edit') + 0;
$delmode = getreq('del') + 0;
$ann = get_first_value("select TxAnnotatedText as value from " . $tbpref . "texts where TxID = " . $textid);
$ann_exists = strlen($ann) > 0;
if ($ann_exists) {
    $ann = recreate_save_ann($textid, $ann);
    $ann_exists = strlen($ann) > 0;
}
if ($textid == 0) {
    header("Location: edit_texts.php");
    exit;
}
if ($delmode) {
    // Delete
    if ($ann_exists) {
        $dummy = runsql('update ' . $tbpref . 'texts set ' . 'TxAnnotatedText = ' . convert_string_to_sqlsyntax("") . ' where TxID = ' . $textid, "");
    }
开发者ID:nahabi4,项目名称:lwt,代码行数:30,代码来源:print_impr_text.php

示例12: getreq

<?php 
    }
    ?>
window.parent.frames['l'].focus();
window.parent.frames['l'].setTimeout('cClick()', 100);
//]]>
</script>
	
<?php 
} else {
    // if (! isset($_REQUEST['op']))
    // edit_mword.php?tid=..&ord=..&wid=..  ODER  edit_mword.php?tid=..&ord=..&txt=..
    $wid = getreq('wid');
    if ($wid == '') {
        $lang = get_first_value("select TxLgID as value from " . $tbpref . "texts where TxID = " . $_REQUEST['tid']);
        $term = prepare_textdata(getreq('txt'));
        $termlc = mb_strtolower($term, 'UTF-8');
        $wid = get_first_value("select WoID as value from " . $tbpref . "words where WoLgID = " . $lang . " and WoTextLC = " . convert_string_to_sqlsyntax($termlc));
        if (isset($wid)) {
            $term = get_first_value("select WoText as value from " . $tbpref . "words where WoID = " . $wid);
        }
    } 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_mword.php");
        }
开发者ID:MaVince,项目名称:lwt,代码行数:31,代码来源:edit_mword.php

示例13: Setting

In jurisdictions that recognize copyright laws, the author or
authors of this software dedicate any and all copyright
interest in the software to the public domain. We make this
dedication for the benefit of the public at large and to the 
detriment of our heirs and successors. We intend this 
dedication to be an overt act of relinquishment in perpetuity
of all present and future rights to this software under
copyright law.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE 
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: ajax_save_setting.php?k=[key]&v=[value]
Save a Setting (k/v)
***************************************************************/
require_once 'settings.inc.php';
require_once 'connect.inc.php';
require_once 'dbutils.inc.php';
require_once 'utilities.inc.php';
$k = getreq('k');
$v = getreq('v');
saveSetting($k, $v);
开发者ID:Fips11,项目名称:lwt,代码行数:31,代码来源:ajax_save_setting.php

示例14: gettran

function gettran()
{
    global $u;
    global $bankid;
    global $server;
    $req = getreq();
    if (!$req) {
        return $false;
    }
    $msg = custmsg('gettime', $bankid, $req);
    $msg = $server->process($msg);
    $args = $u->match_message($msg);
    if (is_string($args)) {
        return false;
    }
    return $args['time'];
}
开发者ID:billstclair,项目名称:trubanc,代码行数:17,代码来源:servertest.php


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