コード例 #1
0
function insert($s)
{
    if (!checkexist($s)) {
        $mysqli = new mysqli(DBSERVER, DBUSER, DBPWD, DB);
        ////set the query
        $query = sprintf("INSERT INTO `services` (`designation`) VALUES ('%s')", $s);
        $mysqli->query($query);
        $mysqli->close();
        return $query;
    }
}
コード例 #2
0
ファイル: functions.php プロジェクト: istrwei/vpn
function usekey($name, $key)
{
    if (verifykey($key) == TRUE) {
        if (checkexist($name) == TRUE) {
            selfenauth($name, $key);
        } else {
            exit("Account Does Not Exist, Register First.");
        }
    } else {
        exit("This Key Is Not Correct Or Used.");
    }
    echo "Account " . $name . " Activited.";
}
コード例 #3
0
/*if (isset($_POST['btnBuymore'])) echo "<script>window.location='./'</script>";
	
if (isset($_POST['btnDeleteAll'])) unset($_SESSION['cart']);*/
if (isset($_REQUEST['idPro'])) {
    if (!isset($_SESSION['cart'])) {
        $pro = killInjection($_REQUEST['idPro']);
        $cart = array();
        $size = killInjection($_REQUEST['size']) != '1' ? killInjection($_REQUEST['size']) : '1';
        $color = killInjection($_REQUEST['color']) != '1' ? killInjection($_REQUEST['color']) : '1';
        $quantity = $_REQUEST['quantity'] != '' ? $_REQUEST['quantity'] : 1;
        $cart[] = array($pro, $quantity, $size, $color);
        $_SESSION['cart'] = $cart;
    } else {
        $pro = killInjection($_REQUEST['idPro']);
        $cart = $_SESSION['cart'];
        if (countRecord($tableNew, "id_code='" . killInjection($_REQUEST['idPro']) . "'") > 0 && checkexist() == false) {
            $quantity = $_REQUEST['quantity'] != '' ? $_REQUEST['quantity'] : 1;
            $size = killInjection($_REQUEST['size']) != '1' ? killInjection($_REQUEST['size']) : '1';
            $color = killInjection($_REQUEST['color']) != '1' ? killInjection($_REQUEST['color']) : '1';
            $cart[] = array($pro, $quantity, $size, $color);
            $_SESSION['cart'] = $cart;
        }
    }
} else {
    $cart = $_SESSION['cart'];
}
$Unit = "VNĐ";
if (!isset($_SESSION['cart'])) {
    $showHtmlHomeConnert = "\n<div class=\"clear\"></div>\n<section class=\"main\">\n<section id=\"content\">\n                <div class=\"content-items\">\n                <div class=\"content-items-content-01\">\n <section class=\"slider-content-1\"> <em class=\"bt-1\"><b>&nbsp;</b></em>\n      <div class=\"anythingSlider-1\">\n      <h2 class=\"subtitle-1\">" . $titlePage . "</h2>\n<link href=\"" . $serverName . "css/cart.css\" rel=\"stylesheet\" type=\"text/css\" />\n<br>\n\n\t<table align=\"center\" border=\"0\" width=\"98%\" cellpadding=\"0\" cellspacing=\"0\">\n\t<tr><td height=\"5\"></td></tr>\n\t<tr>\n\t\t<td>\n\t\t\t<table align=\"center\" border=\"0\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">\n\t\t\t\t<tr>\n\t\t\t\t\t<td align=\"center\">\n\t\t\t\t\t\t<br>\n\t\t\t\t\t\t<font color=\"#FF0000\" size=\"2\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n\t\t\t\t\t\t\t<b>Không tìm thấy sản phẩm nào trong giỏ hàng của bạn.</b>\n\t\t\t\t\t\t</font>\n\t\t\t\t\t\t<br><br><br>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t</td>\n\t</tr>\n\t<tr><td height=\"5\"></td></tr>\n</table>\n</div>\n      <div class=\"clear\"></div>\n      <em class=\"bb\"><b>&nbsp;</b></em>\n      </section>\n       </div>\n                </div>\n\n</section>\n    </section>\n";
} else {
    $cnt = 0;
コード例 #4
0
ファイル: registration.php プロジェクト: Aky22/over30
<?php

$_error = "";
$varname = array('name', 'nick', 'phone', 'email', 'state', 'city', 'age', 'height', 'weight', 'hobby', 'about');
$messagename = array('Név', 'Becenév', 'Telefonszám', 'Email cím', 'Megye', 'Város', 'Életkor', 'Magasság', 'Súly', 'Hobbi', 'Bemutatkozás');
if (isset($_POST['submit'])) {
    if (checkexist($varname, $messagename) == 'true') {
        $name = addslashes(stripslashes($_POST['name']));
        $nick = addslashes(stripslashes($_POST['nick']));
        $phone = addslashes(stripslashes($_POST['phone']));
        $email = addslashes(stripslashes($_POST['email']));
        $state = addslashes(stripslashes($_POST['state']));
        $city = addslashes(stripslashes($_POST['city']));
        $age = addslashes(stripslashes($_POST['age']));
        $height = addslashes(stripslashes($_POST['height']));
        $weight = addslashes(stripslashes($_POST['weight']));
        $hobby = addslashes(stripslashes($_POST['hobby']));
        $about = addslashes(stripslashes($_POST['about']));
    } else {
        $_error = checkexist($varname, $messagename);
    }
}
コード例 #5
0
ファイル: checkstate.php プロジェクト: istrwei/vpn
<?php

require "functions.php";
if (filter_var($_POST['name'], FILTER_VALIDATE_EMAIL) == TRUE) {
    if (checkexist($_POST['name']) == TRUE) {
        checkstate($_POST['name']);
    } else {
        echo "ERROR, Account Does Not Exist.";
    }
} else {
    echo "ERROR, Information Provided Is Not Correct.";
}
?>


コード例 #6
0
ファイル: cart.php プロジェクト: ece4u/ece4cWeb
if (isset($_POST['btnBuymore'])) {
    echo "<script>window.location='./'</script>";
}
if (isset($_POST['btnDeleteAll'])) {
    unset($_SESSION['cart']);
}
if (isset($_REQUEST['p'])) {
    if (!isset($_SESSION['cart'])) {
        $pro = $_REQUEST['p'];
        $cart = array();
        $cart[] = array($pro, 1);
        $_SESSION['cart'] = $cart;
    } else {
        $pro = $_REQUEST['p'];
        $cart = $_SESSION['cart'];
        if (countRecord("tbl_product", "id='" . $_REQUEST['p'] . "'") > 0 && checkexist() == false) {
            $cart[] = array($pro, 1);
            $_SESSION['cart'] = $cart;
        }
    }
} else {
    $cart = $_SESSION['cart'];
}
?>


<?php 
if (!isset($_SESSION['cart'])) {
    ?>
<table align="center" border="0" width="98%" cellpadding="0" cellspacing="0">
	<tr><td height="5"></td></tr>