本文整理汇总了PHP中GetFieldValue函数的典型用法代码示例。如果您正苦于以下问题:PHP GetFieldValue函数的具体用法?PHP GetFieldValue怎么用?PHP GetFieldValue使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetFieldValue函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: MakeCSVRecord
function MakeCSVRecord($a_column_list, $a_vars)
{
$s_rec = "";
$n_columns = count($a_column_list);
for ($ii = 0; $ii < $n_columns; $ii++) {
list($s_col_name, $s_format) = $this->_GetColumn($a_column_list[$ii]);
/*
* if a column is specified it must be included, even if there
* is no data for it.
*/
$s_value = GetFieldValue($s_col_name, $a_vars, $this->_cIntSep);
if (isset($this->_sCleanFunc)) {
$s_func = $this->_sCleanFunc;
$s_value = $s_func($s_value);
}
$s_value = $this->_Format($s_value, $s_format);
if ($ii > 0) {
/*
* prepend the separator from the second field onwards
*/
$s_rec .= $this->_cSep;
}
$s_rec .= $s_value;
}
return $s_rec;
}
示例2: explode
$addsql = '';
if (!empty($dede_fields)) {
$fieldarr = explode(';', $dede_fields);
if (is_array($fieldarr)) {
foreach ($fieldarr as $field) {
if ($field == '') {
continue;
}
$fieldinfo = explode(',', $field);
if ($fieldinfo[1] == 'htmltext' || $fieldinfo[1] == 'textdata') {
${$fieldinfo[0]} = filterscript(stripslashes(${$fieldinfo[0]}));
${$fieldinfo[0]} = addslashes(${$fieldinfo[0]});
${$fieldinfo[0]} = GetFieldValue(${$fieldinfo[0]}, $fieldinfo[1], 0, 'add', '', 'member');
${$fieldinfo[0]} = empty(${$fieldinfo[0]}) ? $diyco[$fieldinfo[0]] : ${$fieldinfo[0]};
} else {
${$fieldinfo[0]} = GetFieldValue(${$fieldinfo[0]}, $fieldinfo[1], 0, 'add', '', 'diy', $fieldinfo[0]);
${$fieldinfo[0]} = empty(${$fieldinfo[0]}) ? $diyco[$fieldinfo[0]] : ${$fieldinfo[0]};
}
$addsql .= !empty($addsql) ? ',`' . $fieldinfo[0] . "`='" . ${$fieldinfo[0]} . "'" : '`' . $fieldinfo[0] . "`='" . ${$fieldinfo[0]} . "'";
}
}
}
$query = "UPDATE `{$diy->table}` SET {$addsql} WHERE id={$id}";
if ($dsql->ExecuteNoneQuery($query)) {
$goto = "diy_list.php?action=list&diyid={$diy->diyid}";
showmsg('编辑成功', $goto);
} else {
showmsg('编辑成功', '-1');
}
}
}
示例3: GetFieldValueA
function GetFieldValueA($dvalue,$dtype,$aid=0,$job='add',$addvar='')
{
return GetFieldValue($dvalue,$dtype,$aid,$job,$addvar,'member');
}
示例4: deQueueMsg
//require_once '../inc/admin_secure.inc.php';
$msg = deQueueMsg();
$var_clear = true;
function generateRandomString($length = 15)
{
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
$charactersLength = strlen($characters);
$randomString = '';
for ($i = 0; $i < $length; $i++) {
$randomString .= $characters[rand(0, $charactersLength - 1)];
}
return $randomString;
}
$emailFlag = false;
if (!empty($_POST)) {
$num = GetFieldValue('name', 'users', "email ='" . $_POST['email'] . "'");
if ($num) {
echo "exist";
exit;
} else {
$string = generateRandomString();
$name = $_POST['name'];
$email = $_POST['email'];
$pass1 = $_POST['password'];
$phone = $_POST['phone'];
$pass = md5($pass1);
$sql_insert = "insert into users (name,email,password,phone,active,code) VALUES ( " . " '{$name}', '{$email}', '{$pass}', '{$phone}', 0 , '{$string}' )";
$sql_res = Query($sql_insert);
if ($sql_res) {
$msg = 'success';
$emailFlag = true;
示例5: deQueueMsg
<?php
include_once 'inc/config.inc.php';
include_once 'inc/class.phpmailer.php';
//require_once '../inc/admin_secure.inc.php';
$msg = deQueueMsg();
$var_clear = true;
if (!empty($_GET)) {
$email = $_GET['e'];
$key = $_GET['k'];
$num = GetFieldValue('name', 'users', "email ='" . $email . "' and code ='" . $key . "'");
if ($num) {
$update = "update users SET code = '' where email = '" . $email . "'";
$update_res = Query($update);
?>
<!DOCTYPE html>
<!--[if IE 8]><html class="ie ie8"> <![endif]-->
<!--[if IE 9]><html class="ie ie9"> <![endif]-->
<!--[if gt IE 9]><!--> <html> <!--<![endif]-->
<head>
<?php
include_once 'head.php';
?>
<title>We provide Combo packages for Best Day Tours in Singapore and Attractions</title>
<meta name="keywords" content="Singapore Day Tours, Singapore Attractions, Singapore Best Tours, Singapore Island Tours, Singapore City Tours, Singapore Private Tours, Singapore Family Tours, Singapore Adventure Tours, Singapore Couple Tours, Singapore Nature Tours">
<meta name="description" content="We brings best Travel deals for Singapore. We have Singapore best Day Tours & Attractions, short stay in Singapore. Our Professional can provide the best advice to visitors.">
<style>
.dropdown-menu {
示例6: deQueueMsg
<?php
include_once 'inc/config.inc.php';
include_once 'inc/class.phpmailer.php';
//require_once '../inc/admin_secure.inc.php';
$msg = deQueueMsg();
$var_clear = true;
if (!empty($_GET)) {
$email = $_GET['e'];
$key = $_GET['k'];
$num = GetFieldValue('name', 'users', "email ='" . $email . "'");
if ($num) {
$update = "update users SET active = 1 where email = '" . $email . "' and code = '" . $key . "'";
$update_res = Query($update);
header("Location: index.php");
exit;
} else {
header("Location: 404.php");
exit;
}
}
示例7: SubstituteValueWorker
function SubstituteValueWorker($a_matches, $s_repl, $b_html = true)
{
global $aSubstituteErrors, $aSubstituteValues, $SPECIAL_VALUES;
$b_insert_br = true;
// option to put "<br />" tags before newlines in HTML templates
$s_name = $a_matches[0];
assert(strlen($s_name) > 1 && $s_name[0] == '$');
$s_name = substr($s_name, 1);
if (($i_len = strlen($s_name)) > 0 && $s_name[0] == '{') {
assert($s_name[$i_len - 1] == '}');
$s_name = substr($s_name, 1, -1);
//
// grab any processing options
//
$a_args = explode(":", $s_name);
$s_name = $a_args[0];
if (($n_args = count($a_args)) > 1) {
for ($ii = 1; $ii < $n_args; $ii++) {
switch ($a_args[$ii]) {
case "nobr":
$b_insert_br = false;
break;
}
}
}
}
$s_value = "";
if (IsFieldSet($s_name, $aSubstituteValues) && !TestFieldEmpty($s_name, $aSubstituteValues, $s_mesg)) {
if (is_array($aSubstituteValues[$s_name])) {
//
// note that the separator can include HTML special chars
//
$s_value = implode($SPECIAL_VALUES['template_list_sep'], $b_html ? ArrayHTMLSpecialChars($aSubstituteValues[$s_name]) : $aSubstituteValues[$s_name]);
} else {
$s_value = GetFieldValue($s_name, $aSubstituteValues);
if ($b_html) {
$s_value = htmlspecialchars($s_value);
}
}
if ($b_html && $b_insert_br) {
//
// Insert HTML line breaks before newlines.
//
$s_value = nl2br($s_value);
}
} elseif (isset($SPECIAL_VALUES[$s_name])) {
$s_value = $b_html ? htmlspecialchars((string) $SPECIAL_VALUES[$s_name]) : (string) $SPECIAL_VALUES[$s_name];
} elseif (isset($s_repl)) {
//
// If a replacement value has been specified use it, and
// don't call htmlspecialchars. This allows the use
// of HTML tags in a replacement string.
//
$s_value = $s_repl;
} else {
$aSubstituteErrors[] = GetMessage(MSG_FLD_NOTFOUND, array("FIELD" => $s_name));
}
return $s_value;
}