• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP set_vars函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: get_categories

 function get_categories()
 {
     global $db;
     $cat_info = get_vars("category");
     $this->priority = $this->cat_priority;
     if (!is_array($cat_info)) {
         $cat_info = array();
         $db->query("SELECT * FROM " . PREFIX . "_category ORDER BY posi ASC");
         while ($row = $db->get_row()) {
             $cat_info[$row['id']] = array();
             foreach ($row as $key => $value) {
                 $cat_info[$row['id']][$key] = $value;
             }
         }
         set_vars("category", $cat_info);
         $db->free();
     }
     $xml = "";
     $lastmod = date("Y-m-d");
     foreach ($cat_info as $cats) {
         if ($this->allow_url == "yes") {
             $loc = $this->home . $this->get_url($cats[id], $cat_info) . "/";
         } else {
             $loc = $this->home . "index.php?do=cat&category=" . $cats['alt_name'];
         }
         $xml .= $this->get_xml($loc, $lastmod);
     }
     return $xml;
 }
开发者ID:Hadryan,项目名称:L2LWEB,代码行数:29,代码来源:google.class.php


示例2: page

function page()
{
    global $G;
    set_vars();
    require_once HEADER;
    require_once BODY;
    require_once FOOTER;
    exit;
}
开发者ID:hassanazimi,项目名称:SQLite,代码行数:9,代码来源:67.php


示例3: page

function page($p)
{
    global $CRUD;
    // used in the required files
    if (!$p) {
        $p = "main";
    }
    set_vars();
    require_once "assets/header.php";
    require_once "assets/{$p}.php";
    require_once "assets/footer.php";
    exit;
}
开发者ID:kbglobal51,项目名称:yii-trackstar-sample,代码行数:13,代码来源:crud.php


示例4: Cookies

<?php

require_once __DIR__ . '/../all.php';
$cookies = new Cookies();
$user = $cookies->user_from_cookie();
$vars = array("id");
if (set_vars($_POST, $vars) && $user !== 0) {
    DB::delete("category_items", "id=%s", $_POST["id"]);
}
header("Location: /admin.php?p=3");
exit;
开发者ID:soengle,项目名称:BringIt,代码行数:11,代码来源:exec-delete-service-item.php


示例5: array

     $_POST['limit'] = 0;
     $member_id = array();
     $user_group = array();
     $member_id['user_group'] = 1;
     $user_group[$member_id['user_group']]['admin_googlemap'] = 1;
     $cat_info = get_vars("category");
     if (!is_array($cat_info)) {
         $cat_info = array();
         $db->query("SELECT * FROM " . PREFIX . "_category ORDER BY posi ASC");
         while ($row = $db->get_row()) {
             $cat_info[$row['id']] = array();
             foreach ($row as $key => $value) {
                 $cat_info[$row['id']][$key] = stripslashes($value);
             }
         }
         set_vars("category", $cat_info);
         $db->free();
     }
     if (count($cat_info)) {
         foreach ($cat_info as $key) {
             $cat[$key['id']] = $key['name'];
             $cat_parentid[$key['id']] = $key['parentid'];
         }
     }
     include_once ROOT_DIR . '/engine/inc/googlemap.php';
     die("done");
 } elseif ($cronmode == "optimize") {
     $arr = array();
     $db->query("SHOW TABLES");
     while ($row = $db->get_array()) {
         if (substr($row[0], 0, strlen(PREFIX)) == PREFIX) {
开发者ID:Banych,项目名称:SiteCreate,代码行数:31,代码来源:cron.php


示例6: array

    $banned_info = array();
    $db->query("SELECT * FROM " . USERPREFIX . "_banned");
    while ($row = $db->get_row()) {
        if ($row['users_id']) {
            $banned_info['users_id'][$row['users_id']] = array('users_id' => $row['users_id'], 'descr' => stripslashes($row['descr']), 'date' => $row['date']);
        } else {
            if (count(explode(".", $row['ip'])) == 4) {
                $banned_info['ip'][$row['ip']] = array('ip' => $row['ip'], 'descr' => stripslashes($row['descr']), 'date' => $row['date']);
            } elseif (strpos($row['ip'], "@") !== false) {
                $banned_info['email'][$row['ip']] = array('email' => $row['ip'], 'descr' => stripslashes($row['descr']), 'date' => $row['date']);
            } else {
                $banned_info['name'][$row['ip']] = array('name' => $row['ip'], 'descr' => stripslashes($row['descr']), 'date' => $row['date']);
            }
        }
    }
    set_vars("banned", $banned_info);
    $db->free();
}
if ($config["lang_" . $_REQUEST['skin']]) {
    if (file_exists(ROOT_DIR . '/language/' . $config["lang_" . $_REQUEST['skin']] . '/website.lng')) {
        @(include_once ROOT_DIR . '/language/' . $config["lang_" . $_REQUEST['skin']] . '/website.lng');
    } else {
        die("Language file not found");
    }
} else {
    @(include_once ROOT_DIR . '/language/' . $config['langs'] . '/website.lng');
}
$config['charset'] = $lang['charset'] != '' ? $lang['charset'] : $config['charset'];
$is_logged = false;
$member_id = array();
if ($config['allow_registration'] == "yes") {
开发者ID:Hadryan,项目名称:L2LWEB,代码行数:31,代码来源:addcomments.php


示例7: Cookies

<?php

require_once __DIR__ . '/../all.php';
$cookies = new Cookies();
$user = $cookies->user_from_cookie();
$vars = array("id", "service_id");
if (set_vars($_POST, $vars)) {
    if ($user->data["permission"] === "4" || $user->data["permission"] === "3" && $user->data["service_id"] === $_POST["service_id"]) {
        //        DB::insert("menu_sides", array("name"=>$_POST["name"], "price"=>$_POST["price"], "required"=>$_POST["req"], "service_id"=>$_POST["service_id"]));
        DB::delete("menu_categories", "id=%d", $_POST["id"]);
        echo DB::affectedRows();
    } else {
        echo "-1";
    }
} else {
    echo "-1";
}
开发者ID:soengle,项目名称:BringIt,代码行数:17,代码来源:exec-del-cat.php


示例8: Copyright

-----------------------------------------------------
 http://dle-news.ru/
-----------------------------------------------------
 Copyright (c) 2004,2013 SoftNews Media Group
=====================================================
 Данный код защищен авторскими правами
=====================================================
 Файл: cron.php
-----------------------------------------------------
 Назначение: Выполнение автоматических операций
=====================================================
*/
if (!defined('DATALIFEENGINE')) {
    die("Hacking attempt!");
}
set_vars("cron", $_TIME);
if ($cron == 1) {
    $db->query("DELETE FROM " . PREFIX . "_spam_log WHERE is_spammer = '0'");
}
if ($config['cache_count']) {
    $result = $db->query("SELECT COUNT(*) as count, news_id FROM " . PREFIX . "_views GROUP BY news_id");
    while ($row = $db->get_array($result)) {
        $db->query("UPDATE " . PREFIX . "_post_extras SET news_read=news_read+{$row['count']} WHERE news_id='{$row['news_id']}'");
    }
    $db->free($result);
    $db->query("TRUNCATE TABLE " . PREFIX . "_views");
    clear_cache(array('news_', 'full_', 'rss'));
}
if ($cron == 2) {
    $db->query("TRUNCATE TABLE " . PREFIX . "_login_log");
    $db->query("TRUNCATE TABLE " . PREFIX . "_flood");
开发者ID:Zzepish,项目名称:IvanShikalovWebSIte,代码行数:31,代码来源:cron.php


示例9: CheckLogin

 private function CheckLogin()
 {
     if ($_SESSION['dle_log'] >= 5) {
         die("Hacking attempt!");
     }
     $GLOBALS['user_group'] = get_vars("usergroup");
     if (!$GLOBALS['user_group']) {
         $GLOBALS['user_group'] = array();
         $this->db->query("SELECT * FROM " . USERPREFIX . "_usergroups ORDER BY id ASC");
         while ($row = $this->db->get_row()) {
             $GLOBALS['user_group'][$row['id']] = array();
             foreach ($row as $key => $value) {
                 $GLOBALS['user_group'][$row['id']][$key] = $value;
             }
         }
         set_vars("usergroup", $GLOBALS['user_group']);
         $this->db->free();
     }
     $hash_pass = md5(md5($_POST['password']));
     $login = $this->db->safesql($_POST['name']);
     if ($GLOBALS['member_id'] = $this->db->super_query("SELECT * FROM " . USERPREFIX . "_users WHERE name='{$login}' AND password='{$hash_pass}'")) {
         if (!defined('DOMAIN')) {
             define('DOMAIN', "." . $_SERVER['HTTP_HOST']);
         }
         setcookie("dle_password", md5($_POST['password']), time() + 3600 * 24 * 365, "/", DOMAIN, NULL, TRUE);
         @session_register('dle_password');
         @session_register('member_lasttime');
         if ($GLOBALS['config']['version_id'] < 7.2) {
             @session_register('dle_name');
             setcookie("dle_name", $_POST['name'], time() + 3600 * 24 * 365, "/", DOMAIN, NULL, TRUE);
             $_SESSION['dle_name'] = $_POST['name'];
         } else {
             @session_register('dle_user_id');
             setcookie("dle_user_id", $GLOBALS['member_id']['user_id'], time() + 3600 * 24 * 365, "/", DOMAIN, NULL, TRUE);
             $_SESSION['dle_user_id'] = $GLOBALS['member_id']['user_id'];
         }
         $_SESSION['dle_password'] = md5($_POST['password']);
         $_SESSION['dle_log'] = 0;
         return true;
     } else {
         $_SESSION['dle_log']++;
         return false;
     }
 }
开发者ID:dautushenka,项目名称:Totalizator,代码行数:44,代码来源:InstallUpdate.php


示例10: page

function page()
{
    global $SID;
    set_vars();
    require_once "assets/header.php";
    require_once "assets/main.php";
    require_once "assets/footer.php";
}
开发者ID:hassanazimi,项目名称:MySQL,代码行数:8,代码来源:SQLDemo.php


示例11: die

if (!defined('DATALIFEENGINE')) {
    die("Hacking attempt!");
}
define('BANNERS', 1);
//################# Определение баннеров
$banners = get_vars("banners");
if (!is_array($banners)) {
    $banners = array();
    $db->query("SELECT * FROM " . PREFIX . "_banners ORDER BY id ASC");
    while ($row_b = $db->get_row()) {
        $banners[$row_b['id']] = array();
        foreach ($row_b as $key => $value) {
            $banners[$row_b['id']][$key] = $value;
        }
    }
    set_vars("banners", $banners);
    $db->free();
}
$ban = array();
$banner_in_news = array();
if (count($banners) > 0) {
    foreach ($banners as $name => $value) {
        if ($value['approve']) {
            //если активный
            if ($value['category']) {
                $value['category'] = explode(',', $value['category']);
                if (!in_array($category_id, $value['category'])) {
                    $value['code'] = "";
                }
            }
            if ($value['main']) {
开发者ID:Gordondalos,项目名称:union,代码行数:31,代码来源:banners.php


示例12: die

    die("Hacking attempt!");
}
$replace_links = array();
//################# Определение ссылок
$links = get_vars("links");
if (!is_array($links)) {
    $links = array();
    $db->query("SELECT * FROM " . PREFIX . "_links ORDER BY id DESC");
    while ($row_b = $db->get_row()) {
        $links[$row_b['id']] = array();
        foreach ($row_b as $key => $value) {
            $links[$row_b['id']][$key] = stripslashes($value);
        }
    }
    usort($links, "cmplinks");
    set_vars("links", $links);
    $db->free();
}
function cmplinks($a, $b)
{
    global $config;
    return dle_strlen($b['word'], $config['charset']) - dle_strlen($a['word'], $config['charset']);
}
function comparehosts($a, $b)
{
    $a = str_replace("http://", "", strtolower($a));
    $a = str_replace("https://", "", $a);
    if (substr($a, 0, 2) == '//') {
        $a = str_replace("//", "", $a);
    }
    if (substr($a, 0, 4) == 'www.') {
开发者ID:Gordondalos,项目名称:union,代码行数:31,代码来源:links.php


示例13: _online_block


//.........这里部分代码省略.........
                 }
             } else {
                 $users[$user['userid']]['username'] = $user['username'];
                 $users[$user['userid']]['lastactivity'] = $user['lastactivity'];
                 $users[$user['userid']]['useragent'] = $user['useragent'];
                 $users[$user['userid']]['host'] = $user['host'];
                 $users[$user['userid']]['location'] = $user['location'];
             }
         }
         $location_array = array("%addcomments%" => $this->lang['paddcomments'], "%readnews%" => $this->lang['preadnews'], "%incategory%" => $this->lang['pincategory'], "%posin%" => $this->lang['pposin'], "%mainpage%" => $this->lang['pmainpage'], "%view_pofile%" => $this->lang['view_profile'], "%newposts%" => $this->lang['newposts'], "%view_stats%" => $this->lang['view_stats']);
         if (count($users)) {
             foreach ($users as $id => $value) {
                 if ($GLOBALS['member_id']['user_group'] == 1) {
                     $user_array[$value['username']] = $this->lang['os'] . $this->_os($users[$id]['useragent']) . '<br />' . $this->lang['browser'] . $this->_browser($users[$id]['useragent']) . '<br />' . '<b>IP:</b>&nbsp;' . $users[$id]['host'] . '<br />';
                 }
                 $user_array[$value['username']] .= $this->lang['was'] . $this->_timeagos($users[$id]['lastactivity']) . $this->lang['back'] . '<br />' . $this->lang['location'];
                 if (preg_match("'%(.*?)%'si", $users[$id]['location'])) {
                     foreach ($location_array as $find => $replace) {
                         $users[$id]['location'] = str_replace($find, $replace, $users[$id]['location']);
                     }
                 } else {
                     $users[$id]['location'] = $this->lang['pforum'];
                 }
                 $user_array[$value['username']] .= $users[$id]['location'] . "<br/>";
                 $descr = $user_array[$value['username']];
                 $user_array[$value['username']] = array();
                 $user_array[$value['username']]['descr'] = $descr;
                 $user_array[$value['username']]['id'] = $id;
                 $count_user++;
             }
         }
         if (count($robots)) {
             foreach ($robots as $name => $value) {
                 if ($GLOBALS['member_id']['user_group'] == 1) {
                     $robot_array[$name] = $this->lang['os'] . $this->_os($robots[$name]['useragent']) . '<br />' . $this->lang['browser'] . $this->_browser($robots[$name]['useragent']) . '<br />' . '<b>IP:</b>&nbsp;' . $robots[$name]['host'] . '<br />';
                 }
                 $robot_array[$name] .= $this->lang['was'] . $this->_timeagos($robots[$name]['lastactivity']) . $this->lang['back'] . '<br />' . $this->lang['location'];
                 if (preg_match("'%(.*?)%'si", $robots[$name]['location'])) {
                     foreach ($location_array as $find => $replace) {
                         $robots[$name]['location'] = str_replace($find, $replace, $robots[$name]['location']);
                     }
                 } else {
                     $robots[$name]['location'] = $this->lang['pforum'];
                 }
                 $robot_array[$name] .= $robots[$name]['location'] . "<br/>";
                 $count_robots++;
             }
         }
         $users = "";
         $i = 0;
         if (count($user_array)) {
             foreach ($user_array as $name => $a) {
                 $desc = $a['descr'];
                 $id = $a['id'];
                 if ($i) {
                     $users .= $this->config['separator'];
                 }
                 $desc = htmlspecialchars($desc, ENT_QUOTES);
                 if (!$this->config['vb_block_online_user_link_forum']) {
                     $user_url = $GLOBALS['config']['allow_alt_url'] == "yes" ? $GLOBALS['config']['http_home_url'] . "user/" . urlencode($name) . "/" : $PHP_SELF . "?subaction=userinfo&amp;user=" . urlencode($name);
                 } else {
                     $user_url = $this->vb_config['bburl'] . "/member.php?u=" . $id;
                 }
                 $users .= "<a onmouseover=\"showhint('{$desc}', this, event, '180px');\" href=\"" . $user_url . "\" >" . $name . "</a>";
                 $i++;
             }
         } else {
             $users = $this->lang['notusers'];
         }
         $robots = "";
         $i = 0;
         if (count($robot_array)) {
             foreach ($robot_array as $name => $desc) {
                 if ($i) {
                     $robots .= $this->config['separator'];
                 }
                 $desc = htmlspecialchars($desc, ENT_QUOTES);
                 $robots .= "<span onmouseover=\"showhint('{$desc}', this, event, '180px');\"  style=\"cursor:hand;\" >" . $name . "</span>";
                 $i++;
             }
         } else {
             $robots = $this->lang['notbots'];
         }
         $tpl->load_template('block_online.tpl');
         $tpl->set('{users}', $count_user);
         $tpl->set('{guest}', $guests);
         $tpl->set('{robots}', $count_robots);
         $tpl->set('{all}', $count_user + $guests + $count_robots);
         $tpl->set('{userlist}', $users);
         $tpl->set('{botlist}', $robots);
         $tpl->compile('block_online');
         $tpl->clear();
         if ($this->config['block_online_cache_time'] && function_exists('create_cache')) {
             create_cache("vb_block_online_cache", $tpl->result['block_online']);
             set_vars('vb_block_online_cache_time', time());
         }
     } else {
         $tpl->result['block_online'] = $cache;
     }
 }
开发者ID:dautushenka,项目名称:dle-vb,代码行数:101,代码来源:dle_vs_vb.php


示例14: set_vars

<?php

require_once __DIR__ . '/includes/all.php';
$vars = set_vars($_GET, array("type", "id"));
if (!$vars) {
    header("Location: /index.php");
    exit;
}
$cookies = new Cookies();
$user = $cookies->user_from_cookie();
if ($user === 0) {
    header("Location: /index.php");
    exit;
}
$cookies->renew_cookie($user->id);
$user_id = $user->data["uid"];
$menu = new Menu($_GET["type"], $_GET["id"]);
?>
<!DOCTYPE HTML>
<html>
	<head>
		<title> </title>
		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
		<meta name="viewport" content="initial-scale=1">
		<meta name="description" content="" />
		<meta name="keywords" content="" />
		<!--[if lte IE 8]><script src="css/ie/html5shiv.js"></script><![endif]-->
		<script src="js/jquery.min.js"></script>
		<script src="js/jquery.scrolly.min.js"></script>
		<script src="js/skel.min.js"></script>
<!--        <script src="js/jquery.cookie.js"></script>-->
开发者ID:soengle,项目名称:BringIt,代码行数:31,代码来源:order.php


示例15: die

*/
if (!defined('DATALIFEENGINE')) {
    die("Hacking attempt!");
}
//################# Определение информеров
$informers = get_vars("informers");
if (!is_array($informers)) {
    $informers = array();
    $db->query("SELECT * FROM " . PREFIX . "_rssinform ORDER BY id ASC");
    while ($row_b = $db->get_row()) {
        $informers[$row_b['id']] = array();
        foreach ($row_b as $key => $value) {
            $informers[$row_b['id']][$key] = stripslashes($value);
        }
    }
    set_vars("informers", $informers);
    $db->free();
}
$allow_cache = $config['allow_cache'];
$config['allow_cache'] = 1;
$temp = array();
$i = 0;
if (count($informers)) {
    foreach ($informers as $name => $value) {
        if ($value['approve']) {
            //если активный
            if ($value['category']) {
                $value['category'] = explode(',', $value['category']);
                if (!in_array($category_id, $value['category'])) {
                    $value['url'] = "";
                }
开发者ID:Gordondalos,项目名称:union,代码行数:31,代码来源:rssinform.php


示例16: Cookies

<?php

require_once __DIR__ . '/../all.php';
$cookies = new Cookies();
$user = $cookies->user_from_cookie();
$vars = array("type", "name");
$vars1 = array("name");
if (set_vars($_POST, $vars) && $user !== 0) {
    $type = $_POST["type"];
    if ($user->data["permission"] == 4) {
        if ($type === "1" && set_vars($_POST, $vars1)) {
            $name = $_POST["name"];
            $value = $_POST["value"];
            $setting = DB::queryOneRow("SELECT * FROM settings WHERE name=%s", $name);
            if (DB::count() !== 0) {
                // valid
                if ($setting["value"] !== $value) {
                    // change it
                    DB::update("settings", array("value" => $value), "name=%s", $name);
                    echo json_array(1, array("name" => $name, "value" => $value), "successfully changed");
                    return;
                }
                echo json_array(0, null, "no change made");
                return;
            }
            echo json_array(0, null, "invalid setting");
            return;
        }
        if ($type === "2") {
            $f = $_FILES['settingsfile'];
            $loc = uploadImage($f);
开发者ID:soengle,项目名称:BringIt,代码行数:31,代码来源:exec-admin-change-setting.php


示例17: page

function page($pagename = 'main', $pagetitle = 'Enter a new testimonial')
{
    global $G;
    set_vars();
    $G['pageTitle'] = $pagetitle;
    foreach (array('header', $pagename, 'footer') as $p) {
        require_once ASSETDIR . "/{$p}.php";
    }
    exit;
}
开发者ID:hassanazimi,项目名称:PostgreSQL,代码行数:10,代码来源:db.php


示例18: intval

} else {
    $vote_id = 0;
}
if (isset($_REQUEST['vote_check'])) {
    $vote_check = intval($_REQUEST['vote_check']);
} else {
    $vote_check = 0;
}
$vote_info = get_vars("vote");
if (!is_array($vote_info)) {
    $vote_info = array();
    $db->query("SELECT id, title, category, body, vote_num, start, end, grouplevel FROM " . PREFIX . "_vote WHERE approve");
    while ($row = $db->get_row()) {
        $vote_info[$row['id']] = array('id' => $row['id'], 'title' => $row['title'], 'category' => $row['category'], 'body' => $row['body'], 'vote_num' => $row['vote_num'], 'start' => $row['start'], 'end' => $row['end'], 'grouplevel' => $row['grouplevel']);
    }
    set_vars("vote", $vote_info);
    $db->free();
}
if (!$vote_id or $vote_info[$vote_id]['id'] == "") {
    $find_vote = array();
    $find_cats = array();
    foreach ($vote_info as $votes) {
        if ($votes['start'] and $_TIME < $votes['start']) {
            continue;
        }
        if ($votes['end'] and $_TIME > $votes['end']) {
            continue;
        }
        $votes['grouplevel'] = explode(',', $votes['grouplevel']);
        if ($votes['grouplevel'][0] != "all" and !in_array($member_id['user_group'], $votes['grouplevel'])) {
            continue;
开发者ID:Zzepish,项目名称:IvanShikalovWebSIte,代码行数:31,代码来源:vote.php


示例19: dle_session

dle_session();
require_once ENGINE_DIR . '/classes/parse.class.php';
require_once ENGINE_DIR . '/modules/sitelogin.php';
require_once ROOT_DIR . '/language/' . $config['langs'] . '/website.lng';
//################# Определение групп пользователей
$user_group = get_vars("usergroup");
if (!$user_group) {
    $user_group = array();
    $db->query("SELECT * FROM " . USERPREFIX . "_usergroups ORDER BY id ASC");
    while ($row = $db->get_row()) {
        $user_group[$row['id']] = array();
        foreach ($row as $key => $value) {
            $user_group[$row['id']][$key] = stripslashes($value);
        }
    }
    set_vars("usergroup", $user_group);
    $db->free();
}
if (!$is_logged) {
    die("error");
}
if (!$user_group[$member_id['user_group']]['allow_all_edit']) {
    die("error");
}
$parse = new ParseFilter();
$parse->safe_mode = true;
$parse->allow_url = $user_group[$member_id['user_group']]['allow_url'];
$parse->allow_image = $user_group[$member_id['user_group']]['allow_image'];
$id = intval($_POST['id']);
$text = convert_unicode($_POST['text'], $config['charset']);
if (!$id or !$text) {
开发者ID:Zzepish,项目名称:IvanShikalovWebSIte,代码行数:31,代码来源:message.php


示例20: array

<?php

require_once __DIR__ . '/includes/all.php';
$vars = array("page", "userid", "carttype");
if (!set_vars($_GET, $vars)) {
    echo '<script>$.featherlight.close(); //tryharder.jpg</script>';
}
$cookies = new Cookies();
$usr = $cookies->user_from_cookie();
$page = $_GET['page'];
$uid = $_GET['userid'];
$ctype = $_GET['carttype'];
$name = $usr->data['name'];
$email = $usr->data['email'];
$phone = $usr->data['phone'];
$has_addr = 0;
$total = 0;
if ($page === "1") {
    $address = $usr->getAddress();
    if ($address) {
        $has_addr = 1;
        $changeaddr = sprintf("<p>\n                    <a href='profile.php?p=2&return=1,%s,%s'>Change Address</a>\n                </p>", $_GET["carttype"], $_GET["pid"]);
        $address_str = sprintf("%s (%s) <br>%s, %s. %s", $address["street"], $address["apartment"], $address["city"], $address["state"], $address["zip"]) . $changeaddr;
    } else {
        $has_addr = 0;
        $address_str = "You have no address saved, please visit <a href='profile.php?p=2'>your account</a> to add one";
    }
    $html = "<div data-remodal-id='modal2'>\n              <h1>Place order (details)</h1>\n              <div class='section group'>\n                  <div class='col span_1_of_3 selected'><div class='step'>1. DETAILS</div></div>\n                  <div class='col span_1_of_3'><div class='step'>2. PAYMENT</div></div>\n                  <div class='col span_1_of_3'><div class='step'>3. CONFIRM</div></div>\n              </div>\n              <p>{$name}</p>\n              <p>{$email}</p>\n              <p>{$phone}</p>\n              <p>{$address_str}</p><br>\n              <a id='orderflow1_next' class='remodal-confirm' href='#'>NEXT</a>\n            </div>\n            ";
    echo $html;
}
$default_source = '';
开发者ID:soengle,项目名称:BringIt,代码行数:31,代码来源:order_flow.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP setcache函数代码示例发布时间:2022-05-15
下一篇:
PHP set_var函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap