本文整理汇总了PHP中loadVariable函数的典型用法代码示例。如果您正苦于以下问题:PHP loadVariable函数的具体用法?PHP loadVariable怎么用?PHP loadVariable使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了loadVariable函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: loadVariable
$(element).removeClass(errorClass);
}
});
});
</script>
<?php
$p = loadVariable("p", "");
$a = loadVariable("a", "");
$email = loadVariable("email", "");
$password = loadVariable("password", "");
$username = loadVariable("username", "");
$firstname = loadVariable("firstname", "");
?>
<style>
div.authError {
color: #FF0000;
float: right;
margin-bottom: 10px;
margin-right: -18px;
padding-left: 56px;
vertical-align: top;
}
</style>
<form action="manage.php" method="post" name="login" id="login">
<input type="hidden" name="p" id="p" value="login" />
<div id="login-error">
示例2: loadVariable
<?php
$p = loadVariable("p", "");
$a = loadVariable("a", "");
$email = loadVariable("email", "");
$password = loadVariable("password2", "");
if ($email != "" || $password != "") {
$sql = "SELECT * FROM user WHERE email='{$email}' and password='{$password}' and Status='1'";
$getLogin = $objDB->select($sql);
if (!empty($getLogin) && count($getLogin) > 0) {
$_SESSION["email"] = $getLogin[0]["email"];
$_SESSION["username"] = $getLogin[0]["firstname"];
$_SESSION["userid"] = $getLogin[0]["UserId"];
$sql = "update user set LastLogin = '" . date('Y-m-d H:i:s') . "' where UserId = '" . $_SESSION["userid"] . "'";
$update = $objDB->sql_query($sql);
$sql3 = "select * from shoppingcart where UserId='" . $_COOKIE['PHPSESSID'] . "'";
$rscart = $objDB->select($sql3);
$result2 = mysql_query($sql3);
for ($c = 0; $c < count($rscart); $c++) {
$cartid = $rscart[$c]['CartId'];
$sql1 = "update shoppingcart set UserId='" . $_SESSION["userid"] . "' where CartId='" . $cartid . "'";
mysql_query($sql1);
}
//$_SESSION["email"]=$email;
header("Location:index.php?p=SetExpressCheckout");
exit;
} else {
$_SESSION['nologin'] = "We could not find an account with that email address. Please try again";
$_SESSION['email'] = $email;
$_SESSION['password3'] = $password;
header("Location:" . $AbsoluteURL . "index.php?p=checkout");
示例3: loadVariable
<?php
$a = loadVariable("a", '');
$v = loadVariable("v", "");
$page_type = loadVariable("page_type", "");
$id = loadVariable("id", "0");
if ($a != '') {
switch ($a) {
case "get_link_content":
echo get_link_content($v);
break;
case 'delete':
delete_row($page_type, $id);
break;
case 'status':
status_change($page_type, $id);
break;
default:
echo "Error";
}
}
function delete_row($page_type, $id)
{
if (empty($page_type)) {
die(json_encode(array("error" => "Page Type not declared!!!")));
} else {
//Table information declaration
$table_info['site menu']['tbl'] = "site_menu";
$table_info['site menu']['key'] = "menu_id";
$table_info['site content']['tbl'] = "site_content";
$table_info['site content']['key'] = "content_id";
示例4: count
$content_excerpt = $rsAdmin[0]["content_excerpt"];
$seo_introductory_text = $rsAdmin[0]["seo_introductory_text"];
$seo_text = $rsAdmin[0]["seo_text"];
$content = $rsAdmin[0]["content"];
$content_orderr = $rsAdmin[0]["content_orderr"];
$content_uri = $rsAdmin[0]["content_uri"];
$status = $rsAdmin[0]["status"];
}
}
}
if ($a == "list") {
$SQL = "select * from site_content order by content_title";
$rsAdmin = $objDB->select($SQL);
$numPerPage = 10;
$iCount = count($rsAdmin);
$page = loadVariable("page", 1);
$totalPages = ceil($iCount / $numPerPage);
$start = $page * $numPerPage - $numPerPage;
$end = $numPerPage;
if ($end > count($rsAdmin)) {
$end = $iCount;
}
$SQL .= " LIMIT " . $start . " , " . $end;
$rsAdmin = $objDB->select($SQL);
}
?>
<style>
label {
display: inline-block;
width: 80px;
}
示例5: setcookie
// no cookie is found
$varValue = $defaultValue;
// use the default value
}
}
setcookie($varName, $varValue, time() + $cookieLifetime);
// sets a cookie
return $varValue;
// returns the result
}
// initilize all variables
$distance = loadVariable("distance", 60);
$tension = loadVariable("tension", 10);
$mass = loadVariable("mass", 100);
$sag = loadVariable("sag", 1.5);
$angle = loadVariable("angle", 5.6);
?>
<html>
<head>
<title>Slackline Tension</title>
<link rel="manifest" href="manifest.json">
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<br>
<table id="input">
<form>
<tr>
<td><label for="tension">tension:</label></td>
<td><input id="tension" name="tension" type="number" step="0.1"
示例6: loadvariable
<?php
$p = loadvariable('p', '');
$a = loadvariable('a', '');
$AdminID = loadvariable('AdminID', '0');
$UserName = loadvariable('UserName', '');
$Password = loadvariable('Password', '');
$FirstName = loadvariable('FirstName', '');
$LastName = loadvariable('LastName', '');
$Email = loadvariable('Email', '');
$AdminRole = loadVariable("AdminRole", "");
$Status = loadvariable('Status', '');
$submit = loadvariable('submit', '');
$s = loadvariable('s', '');
if ($p == 'admin') {
if ($submit == 'Save') {
if ($a == 'add' && $AdminID == '0') {
$SQL = "select UserName from admin where UserName='" . $UserName . "'";
$rsAdmin = $objDB->select($SQL);
if (count($rsAdmin) > 0) {
$error = "The supplied UserName already exists.Please select a unique UserName.";
?>
<html>
<head></head>
<body>
<form name="frm" id="frm" method="post" action="index.php">
<?
foreach($_POST as $Key=>$Value){
if($Key!="submit"){
示例7: loadVariable
<?php
$p = loadVariable("p", "");
$a = loadVariable("a", "");
$PID = loadVariable("PID", "");
$id = loadVariable("id", "");
$value = loadVariable("value", "");
$DB = loadVariable("DB", "");
$FIELDSHOW = loadVariable("FIELDSHOW", "");
$sql = "UPDATE " . PROPERTY . " SET " . $id . "='" . inserttext($value) . "' where ID='" . $PID . "'";
$rsUpd = $objDB->sql_query($sql);
$SQL = "select " . $FIELDSHOW . " from " . $DB . " where " . $id . "='" . viewtext($value) . "'";
$rsDB = $objDB->select($SQL);
if ($id == "Status") {
if ($rsDB[0][$FIELDSHOW] == 0) {
echo "Inactive";
} elseif ($rsDB[0][$FIELDSHOW] == 1) {
echo "Active";
} elseif ($rsDB[0][$FIELDSHOW] == 2) {
echo "Postpond";
} elseif ($rsDB[0][$FIELDSHOW] == 3) {
echo "Canclled";
} elseif ($rsDB[0][$FIELDSHOW] == 4) {
echo "Sold to 3rd";
} elseif ($rsDB[0][$FIELDSHOW] == 5) {
echo "Sold to Bank";
}
} else {
echo $rsDB[0][$FIELDSHOW];
}
exit;
示例8: loadVariable
<script src="<?php
echo $AbsoluteURL;
?>
js/jquery.ui.core.js"></script>
<script src="<?php
echo $AbsoluteURL;
?>
js/jquery.ui.widget.js"></script>
<link href="css/jquery.fancybox.css?v=2.1.4" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery.fancybox.pack.js?v=2.1.4"></script>
<script type="text/javascript" src="<?php
echo $AbsoluteURL;
?>
js/jquery.validate.js"></script>
<?php
$category_id = loadVariable("c", "");
?>
<div class="main-container holder">
<!-- grid-cols -->
<div class="grid-cols">
<!-- col67 -->
<div style="width:100%;" class="col67">
<div class="col-holder">
<?php
if ($category_id != '') {
global $objDB;
$where = "";
$result = $objDB->getDataArray('site_menu', 'menu_id', 'menu_name', 'menu_id');
echo "<h3>" . $result[$category_id] . "</h3>";
} else {
echo "<h3>All Products</h3>";
示例9: loadVariable
<?php
$p = loadVariable("p", "");
$a = loadVariable("a", "");
$report = loadVariable("report", "");
$db = loadVariable("db", "");
$sql = "select * from " . $db;
$user = $objDB->select($sql);
?>
<script type="application/javascript" >
function getname(tablename)
{
location.href="index.php?p=report&db="+tablename;
}
</script>
<style type="text/css">
.hastable table a.btn span.ui-icon {
left:0.2em;
}
</style>
<div id="sub-nav"><div class="page-title" style="margin-left:520px;">
<?php
if (isset($val) && $val != '') {
$header = $val;
} else {
$header = 'Manage Reports';
}
?>
<h1><?php
示例10: loadVariable
<?php
$SubcategoryId = loadVariable("SubcategoryId", "");
$SizeId = loadVariable("SizeId", "");
$SQL = "select * from product where SubCategoryId='" . $SubcategoryId . "'";
$rsUser = $objDB->select($SQL);
for ($p = 0; $p < count($rsUser); $p++) {
$CategoryId = $rsUser[0]["CategoryId"];
if ($CategoryId == 1) {
$CategoryId = "Men";
} else {
$CategoryId = "Female";
}
}
echo "getbrand^_^";
?>
<div class="contain">
<?php
include "include/sidebar.php";
?>
<div class="contain_right" ">
<div class="h_line1"></div>
<div class="heading">
<?php
$SQL1 = "select * from subcategory where SubCategoryId =" . $SubcategoryId . "";
$rsUser1 = $objDB->select($SQL1);
$SQL1 = "select * from product_size where SizeId =" . $SizeId . "";
$rsUser2 = $objDB->select($SQL1);
$sql1 = "select * from product_qty where SizeId='" . $SizeId . "' and SubCategoryId =" . $SubcategoryId . "";
$rsp = $objDB->select($sql1);
echo "We found" . "  " . count($rsp) . "  " . "Products for" . "  " . $CategoryId . "  " . "Apparels" . "  " . $rsUser1[0]['SubCategory'] . "" . "  " . $rsUser2[0]['Size'];
示例11: loadvariable
<?php
$p = loadvariable('p', '');
$a = loadvariable('a', '');
$review_Id = loadvariable('review_Id', '');
$ProductId = loadvariable('ProductId', '');
$review_name = loadvariable('review_name', '');
$review_title = loadVariable('review_title', '');
$review_description = loadvariable('review_description', '');
$add_date = date('Y-m-d');
$status = loadvariable('status', '0');
if ($a == 'add') {
// add
$SQL = "insert product_review set ProductId ='" . inserttext($ProductId) . "',review_name ='" . inserttext($review_name) . "',review_title='" . inserttext($review_title) . "',review_description= '" . inserttext($review_description) . "',add_date='" . inserttext($add_date) . "',status= '" . inserttext($status) . "'";
$insert = $objDB->insert($SQL);
echo '1';
//header("Location:" . $AbsoluteURLAdmin . "index.php?p=manage_site_menu&a=edit&id=$lastid");
exit;
}
示例12: loadVariable
$pg = loadVariable("pg", "");
$bLoggedIn = loadVariable("bLoggedIn", "");
if ($bLoggedIn == 1) {
$pg = "home";
$_SESSION["session_adminID"] = $rsUser[0]['AdminID'];
header("location:index.php?pg='" . $pg . "'");
} else {
switch ($p) {
case 'login':
$heading = "Login";
switch ($a) {
case "login":
if (loadVariable("UserName", "") != "" && loadVariable("Password", "") != "") {
// Get user details
$SQL = "Select * from admin where UserName = '" . loadVariable("UserName", "") . "' and Password = '" . encodestring(loadVariable("Password", "")) . "'";
$rsUser = $objDB->select($SQL);
if (count($rsUser) <= 0) {
$error .= "Your username or password is invalid, please try again.<br>";
} elseif ($rsUser[0]["Status"] != 1) {
$error .= "Your account is Inactive.<br>";
} else {
if ($rsUser[0]['Status'] == '1') {
$_SESSION["session_adminID"] = $rsUser[0]['AdminID'];
$sql = "update admin set LastLogin = '" . date('Y-m-d H:i:s') . "' where AdminID = '" . $_SESSION["session_adminID"] . "'";
$update = $objDB->sql_query($sql);
header("Location: index.php?p=home");
} else {
$error .= "Somthing Wrong.<br>";
}
}
示例13: loadVariable
<?php
$SubcategoryId = loadVariable("SubcategoryId", "");
$ColorId = loadVariable("ColorId", "");
$SQL = "select * from product where SubCategoryId='" . $SubcategoryId . "'";
$rsUser = $objDB->select($SQL);
for ($p = 0; $p < count($rsUser); $p++) {
$CategoryId = $rsUser[0]["CategoryId"];
if ($CategoryId == 1) {
$CategoryId = "Men";
} else {
$CategoryId = "Female";
}
}
echo "getbrand^_^";
?>
<div class="contain">
<?php
include "include/sidebar.php";
?>
<div class="contain_right" ">
<div class="h_line1"></div>
<div class="heading">
<?php
$SQL1 = "select * from subcategory where SubCategoryId =" . $SubcategoryId . "";
$rsUser1 = $objDB->select($SQL1);
$SQL1 = "select * from product_color where ColorId =" . $ColorId . "";
$rsUser2 = $objDB->select($SQL1);
$sql1 = "select * from product_qty where ColorId='" . $ColorId . "' and SubCategoryId =" . $SubcategoryId . "";
$rsp = $objDB->select($sql1);
echo "We found" . "  " . count($rsp) . "  " . "Products for" . "  " . $CategoryId . "  " . "Apparels" . "  " . $rsUser1[0]['SubCategory'] . "" . "  " . $rsUser2[0]['ColorName'];
示例14: MySQLCN
require_once "utils/functions.php";
$objDB = new MySQLCN();
if (empty($_REQUEST['p'])) {
$page = "home.php";
} else {
if (isset($_REQUEST['p'])) {
$page = $_REQUEST['p'] . ".php";
} else {
$page = "home.php";
}
}
$p = loadVariable("p", "home");
if ($p == 'home') {
$a = loadVariable("a", "home");
} else {
$a = loadVariable("a", "");
}
$includeDir = "include/";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<title>X-Store Online Shop</title>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="<?php
echo $AbsoluteURL;
?>
images/x1.jpg" type="image/jpeg">
<link href="<?php
echo $AbsoluteURL;
?>
示例15: loadVariable
<?php
$p = loadVariable("p", "");
$a = loadVariable("a", "");
$sz = loadVariable("Size", '');
$ProductId = loadVariable("ProductId", 0);
$maincategory = loadVariable('maincategory', '');
$brand = loadVariable('brand', '');
$product_type = loadVariable('product_type', '');
$price = loadVariable('price', '');
$productname = loadVariable('productname', '');
$file = loadvariable("file", "");
$description = loadVariable('description', '');
$priview = loadVariable('preview_audio', '');
$submit = loadvariable('submit', '');
$quantity = loadVariable('quantity', '');
if ($p == "product") {
if ($submit == 'Save') {
if ($a == "add") {
$product_str = "";
$audio_str = "";
$priview_str = "";
$product_image = upload("product_image", "images/Product_Image/", "jpg,png,bmp,gif");
$audio = upload("audio", "images/Product_audio", "mp3,amr,wav");
$priview = upload("priview", "images/Product_audio", "mp3,amr,wav");
$product_str = 'UNSET1.jpg';
if ($product_image[1] == "") {
$product_str = $product_image[0];
}
if ($audio[1] == "") {
$audio_str = $audio[0];