本文整理汇总了PHP中rt函数的典型用法代码示例。如果您正苦于以下问题:PHP rt函数的具体用法?PHP rt怎么用?PHP rt使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了rt函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: rt
$val = "now()";
$sql .= $val;
} else {
$sql .= "\"" . $val . "\"";
}
} else {
if ($type == "timestamp") {
$val = rt($name);
if ($val == "") {
$val = "null";
}
// causes timestamp to auto-update
$sql .= $val;
} else {
if ($type == "float") {
$val = rt($name);
if ($val == "") {
$val = 0;
}
$sql .= $val;
} else {
print "<br>";
p_red("UNHANDLED FIELD TYPE: {$type}");
print "<br>";
$sql .= 0;
}
}
}
}
}
$n++;
示例2: dbg
}
else
{
dbg("login failed");
$uid = "";
$user_type = "";
}
return false;
}
*/
// Process a login
if ($action == "login") {
$username = rt("username");
//$_REQUEST["username"];
$password = rt("password");
//$_REQUEST["password"];
dbg("processing login: username={$username} password={$password}");
$rs = dbExec("select * from users where active=1 and username=\"{$username}\" and password=\"{$password}\"");
// these 3 tests prevent sql injection from being effective on login
if ($rs->RecordCount() == 1 && strtolower($rs->fields("username")) == strtolower($username) && strtolower($rs->fields("password")) == strtolower($password)) {
dbg("login successful");
$uid = $rs->fields("id");
$user_type = $rs->fields("user_type");
$db->Execute("update users set sid='{$sid}', last_login=now() where id={$uid}");
// Set initial login cookies
setCookie("uid", $uid, time() + 60 * ($expire_mins + 5));
setCookie("sid", $sid, time() + 60 * $expire_mins);
$_COOKIE["uid"] = $uid;
$_COOKIE["sid"] = $sid;
logit("user logged in: username={$username} id={$uid} sid={$sid}");
示例3: strtoupper
$school_state = strtoupper($school_state);
}
dbg("school_state={$school_state}");
$school_city = rt("school_city");
if ($other_city != "") {
$school_city = $other_city;
}
$school_city = ucfirst($school_city);
dbg("school_city={$school_city}");
$school_name = rt("school_name");
if ($other_name != "") {
$school_name = $other_name;
}
$school_name = ucfirst($school_name);
dbg("school_name={$school_name}");
$confirm = rt("confirm");
$regopen = getField("config", "val", "where tag='registration'");
$regopen = $regopen == "1" ? true : false;
if ($regopen) {
if ($school_state == "") {
include "regintro.php";
}
?>
<div style="margin: 30px;">
<span class=body_copy_blue>
<style>
#inset {
示例4: p_red
p_red($o->fn . " " . $o->ln . "[" . $o->id . "]:\n");
for ($w = 1; $w <= $game_weeks; $w++) {
$wvs = "w" . $w . "v";
$wvl = "w" . $w . "vendor";
if ($o->{$wvs} == "" && $gd[$wvl] != "") {
$vn = getvname($gd[$wvl], $w, $o->cls);
$sql = "update tracking set {$wvl}='{$vn}' where user_id={$id}";
p_red($sql);
dbExec($sql);
}
}
p_red("");
}
exit;
}
if (rt("reset")) {
b("clearing raised money for teams and students");
//dbExec("delete from vars");
//p("cleared vars table");
dbExec("update tracking set raisedmoney=0");
p("cleared tracking.raisedmoney");
dbExec("update groups set raisedmoney=0");
p("cleared groups.raisedmoney");
dbExec("delete from results");
dbExec("insert into results (uid,gid)\n\t\t\t\tselect id,group_id from users where active=1 and user_type='s' and group_id!=0 and gamedata != ''");
p("Done");
}
b("updating raised money for students");
$tr = array();
$rs = dbExec("select uid,gid from results where raised is NULL");
$rc = $rs->RecordCount();
示例5:
</tr>
</table></td>
</tr>
<tr>
<td><table align="left" border="0" cellpadding="0" cellspacing="0" width="800">
<tr>
<td width="635" bgcolor="#FFFFFF"> </td>
<td><a href="signin.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Start_Btn','','images/Start_Btn_f2.jpg',1);"><img name="Start_Btn" src="images/Start_Btn.jpg" width="165" height="47" border="0" id="Start_Btn" alt="" /></a></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"> </td>
<td bgcolor="#FFFFFF"> </td>
</tr>
</table></td>
</tr>
<?php
}
?>
</table>
<?php
if (rt("w") != '') {
include "winteams.php";
}
?>
</body>
</html>
<?php
include "footer.php";
示例6: rt
echo $style1;
?>
">
<div style="<?php
echo $style2;
?>
"><b>Info</b></div>
** ERROR POSTING MESSAGE **
</div>
<br>
<?php
}
}
} else {
if ($action == "mb_nuke") {
$id = rt("mb_id");
deleteRecords($mb_table, "where id={$id}");
}
}
if (!$mb_nopost) {
?>
<div style="<?php
echo $style1;
?>
">
<div style="<?php
echo $style2;
?>
"><b>Post a Message </b></div>
<table style="padding-top: 10px">
示例7: print_vars
function print_vars($vars)
{
if ($GLOBALS['cli']) {
if (function_exists('rt')) {
print_r($vars);
rt($vars);
} else {
print_r($vars);
}
} else {
if (function_exists('r')) {
r($vars);
} else {
print_r($vars);
}
}
}
示例8: rt
$sc = $o->sc;
$school = $o->school;
$school = "<font color=gray size=-1>{$school}</font>";
$t->row($rs->CurrentRow() + 1);
$t->set($rs->CurrentRow() + 1);
$t->set(percbar_str($pcntl, $pcntl));
$t->set($name . "<br>" . $school);
}
$t->dump();
}
}
?>
<p>
<?php
$id = rt("n");
$fc = rt("fc");
if ($id != "") {
function sr($t, $v)
{
?>
<tr>
<td width=320 id=tdh >
<?php
echo $t;
?>
</td>
<td width=320 id=tdc>
<?php
echo $v;
?>
</td>
示例9: rt
<?php
include "lib.php";
include "db.php";
echo "<pre>";
//print_r($_REQUEST);
//print_r($_SERVER);
$rep = rt("report");
function send_mail($to, $from, $fromname, $subj, $body, $cc)
{
$hdrs = "Return-Path: <{$from}>\nFrom: {$fromname} <{$from}>\nReturn-Receipt-To: <{$from}>\nReply-To: <{$from}>\n";
if ($cc != "") {
$hdrs .= "Cc: {$cc}\n";
}
$body = preg_replace("|\r|", "", $body);
$body = preg_replace("|\n|", "\r\n", $body);
$r = mail($to, $subj, $body, $hdrs, " -f {$from} ");
return $r;
}
function snip($re, $s)
{
$r = "";
if (preg_match($re, $s, $m)) {
}
$r = $m[1];
echo "snipped {$r}\n";
return $r;
}
$final = snip("/FINAL (.)/i", $rep);
$hostname = snip("/hostname ([^\n]+)/i", $rep);
$username = snip("/username ([^\n]+)/i", $rep);
示例10: pt
function pt($text)
{
return preg_replace('/\\|/', '%', rt($text));
}
示例11: header
<div class=body_copy_blue style="margin:30px;">
<?php
if ($user_type != 's') {
header("Location: home.php");
}
$action = rt("action");
$candidate = rt("candidate");
if ($action == "vote" && $candidate != "") {
dbg("candidate={$candidate}");
$id = unobfuscate_number($candidate);
dbg("id={$id}");
if ($id == $uid) {
header("Location: home.php");
}
$sql = "select * from users where id={$id} and group_id={$group_id} and teacher_code={$teacher_code}";
$rs = dbExec($sql);
$rc = $rs->RecordCount();
if ($rc != 1) {
fail("Voting irregularity.");
}
$first_name = $rs->fields("first_name");
$last_name = $rs->fields("last_name");
$username = $rs->fields("username");
$class = $rs->fields("class");
$name = "{$first_name} {$last_name}";
$role = roleName($class);
// $sql = "select count(*) from votes where office = 'mvp' and voter_id=$uid and stamp > date_sub(now(), interval 1 day)";
$sql = "select count(*) from votes where office = 'mvp' and voter_id={$uid}";
$rs = dbExec($sql);
if ($rs->fields(0) > 0) {
?>
示例12: count
</div>
<div >
<table class=stuff border=0>
<tr>
<td colspan=5 class=sutdh><b>User Accounts</b></td>
</tr>
<tr>
<td class=sutdh> Active User Recs </td>
<td class=sutdh> Active Teachers </td>
<td class=sutdh> Active Students </td>
<td class=sutdh> Active Teacher:Student Ratio</td>
<td class=sutd rowspan=2>
<?php
if (rt("act") == "nuke_it") {
echo "<span bgcolor=black><i>Oh brilliant. What did the button say?<br>Now you've really gone and done it.</i></span>";
} else {
?>
<input type=button value="DO NOT CLICK THIS BUTTON" onClick="if(confirm('Are you sure you want to do this?')) document.location = '?act=nuke_it'">
<?php
}
?>
</td>
</tr>
<tr>
<td class=sutd>
<?php
echo $db->GetOne("select count(id) from users where active=1");
?>
</td>
示例13: su_sc
if ($_GET["supw"] == "bubba") {
su_sc("su", "true");
$su = true;
} else {
su_sc("su", "");
$su = false;
}
} else {
if ($_GET["su"] == "off" || $_GET["su"] == "false") {
su_sc("su", "false");
$su = false;
}
}
}
if ($su) {
$action = rt("action");
?>
<div style="background-color: #c00; padding: 0.5em; text-align: center;">
<?php
but("Admin Menu", "a_menu.php");
?>
<?php
but("Support ", "a_support.php");
?>
<?php
but("Dupes", "a_dupstuds.php");
?>
<?php
but("Registration", "a_regctrl.php");
?>
<?php
示例14: rt
<?php
include "dbg.php";
include "lib.php";
$where = rt("where");
dbg("where={$where}");
if ($where == "") {
$where = "/";
} else {
if ($where == "/register.php" || $where == "/registration.php") {
$where = "/register.php";
} else {
if ($where == "/prizes.php") {
$where = "/rules.php#Scoring";
}
}
}
//else
//if($where == "/test.php")
// $where = "/test/index.php";
dbg("where={$where}");
jmp($where);
示例15: dump
}
function dump($a, $b)
{
var_dump($a, $b);
}
echo "sfc\n";
x(p(1), p(2), p(3), 4);
$y = 'x';
echo "dfc\n";
$y(p(1), p(2), p(3), 4);
echo "smc\n";
c::g(p(1), p(2), p(3), 4);
$y = 'g';
echo "dsmc\n";
c::$y(p(1), p(2), p(3), 4);
echo "occ\n";
$q = new c(p(1), p(2), p(3), 4);
echo "omc\n";
$q->f(p(1), p(2), p(3), 4);
echo "rsfc\n";
rt($a, id(10));
var_dump($a);
dump($v++, $v++);
$v = 10;
dump($v, $v = 0);
echo "nest\n";
x(p(1), x(p(2), p(3), p(4), p(5)), p(6), x(p(7), p(8), p(9), p(10)));
echo "arr\n";
$z = array(p(1), p(2), x(p(3), p(4), p(5), p(6)), p(7));
$q = 1;
$z = array(1, 2, $q);