$response = "entered"; if (isset($_GET['remove'])) { $user = $_SESSION['user']; $id = $_GET['remove']; $count = $_GET['quantity']; if ($count <= 1) { $query = "DELETE FROM cart WHERE user_id = '{$user}' and product_id = '{$id}'"; } else { $count = $count - 1; $query = "UPDATE cart SET quantity= '{$count}' WHERE user_id = '{$user}' and product_id = '{$id}'"; } mysql_query($query); header('location: cart.php'); } if (isset($_GET['checkout'])) { checkout($_SESSION['user']); header('location: test.php'); } } ?> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> <meta name="author" content=""> <title>Eshop Mania</title>
<?php include 'config.php'; if (isset($_POST['action'])) { if ($_POST['action'] == "addToCart") { addToCart($_POST["id"], $_POST["qty"]); } else { if ($_POST['action'] == "checkout") { checkout(); } } } function credentialCheck($u, $q) { $con = connect(); // $query="select * from userData"; // // $result = $con->query($query); // // echo mysqli_num_rows($result); // // $row = mysqli_fetch_row($result); if ($stmt = $con->prepare("select id,FirstName from userData where userName=? and Personal_ans=?")) { $stmt->bind_param("ss", $u, $q); $stmt->execute(); $stmt->store_result(); $stmt->bind_result($id, $fname); $stmt->fetch(); if ($stmt->num_rows > 0) { setcookie("ccookie", encrypt_decrypt('encrypt', $id), time() + 86400 * 30, "/", null, null, true); return false;
} function getToken() { if (isset($_COOKIE['token'])) { return $_COOKIE['token']; } else { header('location:/SimpleCart/login/'); } } ?> <!DOCTYPE html> <html> <head> <title>Checkout</title> </head> <body> <div> <a href="/SimpleCart">Home</a> <a href="/SimpleCart/login">Login</a> <a href="/SimpleCart/register">Register</a> <a href="/SimpleCart/cart">Cart</a> </div><br><br> <div> <?php if (isset($_POST['checkout'])) { checkout($dbh); } ?> </div> </body> </html>
$cvs_access = true; } if ($cvs_access) { echo "<!-- Start browsecvs -->"; require_once "theme.php"; // echo $theme->header(); $rgb_top = $theme->bgcolor3; $rgb_sub = $theme->bgcolor2; $rgb_off = $theme->bgcolor1; $dirs = listdirs($path, array(".", "..", "CVSROOT", "Attic")); $files = listfiles($path); sort($dirs); sort($files); echo $theme->opentable(); if (isset($file) && $file != "") { checkout($path . $file, $file); } else { if (count($conf['cvsreps']) > 1) { echo $htmlform->start($modulehref); for ($i = 0; $i < count($conf['cvsreps']); $i++) { $data[] = array(urlencode($conf['cvsreps'][$i]), htmlspecialchars($conf['cvsreps'][$i])); } echo $htmlform->selectlist("cvsrep", $data, urlencode($cvsrep)); echo $htmlform->input("submit", " Go ", "submit"); echo $htmlform->stop(); echo "</center>"; } drawtop($dirs, $dir); drawbottom($files, $dir, $path); drawstats($files, $dirs, $path); }
unset($row2); } $res3 = sql_query("SELECT users.id AS userid, users.username AS username, 0 AS torrent_count, 0 AS torrent_size FROM users WHERE class = " . $uploader . (count($hasupuserid) ? " AND users.id NOT IN (" . implode(",", $hasupuserid) . ")" : "") . " ORDER BY username ASC") or sqlerr(__FILE__, __LINE__); while ($row = mysql_fetch_array($res3)) { $res2 = sql_query("SELECT torrents.id, torrents.name, torrents.added FROM torrents WHERE owner=" . $row['userid'] . " ORDER BY id DESC LIMIT 1"); $row2 = mysql_fetch_array($res2); print "<tr>"; print "<td class=\"colfollow\">" . get_username($row['userid'], false, true, true, false, false, true) . "</td>"; print "<td class=\"colfollow\">" . ($row['torrent_size'] ? mksize($row['torrent_size']) : "0") . "</td>"; print "<td class=\"colfollow\">" . $row['torrent_count'] . "</td>"; print "<td class=\"colfollow\">" . ($row2['added'] ? gettime($row2['added']) : $lang_uploaders['text_not_available']) . "</td>"; //print("<td class=\"colfollow\">".($row2['name'] ? "<a href=\"details.php?id=".$row2['id']."\">".htmlspecialchars($row2['name'])."</a>" : $lang_uploaders['text_not_available'])."</td>"); print "<td class=\"colfollow\">" . (checkout($row['torrent_size'], $row['torrent_count']) ? "<b style=\"color:green\">合格</b>" : "<b style=\"color:red\">不合格</b>"); if (get_user_class() >= UC_SYSOP) { $username = get_username($row['userid'], false, false, false, false, false, false, false, false, true); if (checkout($row['torrent_size'], $row['torrent_count'])) { if ($extrasalary = extrasalary($row['torrent_size'], $row['torrent_count'])) { print "<td class=\"colfollow\"><form method=\"post\" action=\"amountbonus.php\" ><input type='text' value={$extrasalary} name='seedbonus'/><input type='hidden' value='{$username}' name='username'/><br/><input type='text' value='{$date} 月发种非常给力,感谢贡献~额外奖励奉上~工资计算公式非常好玩哦' name='reason_1'/><br/><input type=\"submit\" value=\"单独给他发工资\" class=\"btn\"/></form></td>"; } else { print "<td calss=\"colfollow\">最后统一发</td>"; $usernameall .= $username . ","; } } else { print "<td class=\"colfollow\">不给他发工资</td>"; $unpassuser .= $username . ","; } } print "</tr>"; $count++; unset($row2); }
$total->setClass("input.textPriceTotal"); //$total -> setLabelPosition("Left"); //$total -> setLabelCaption("$"); $subtotal = new InputText(10); $subtotal->setReadOnly(true); $subtotal->setClass("input.textPrice"); $shipping = new InputText(10); $shipping->setReadOnly(true); $shipping->setClass("input.textPrice"); $tax = new InputText(10); $tax->setReadOnly(true); $tax->setClass("input.textPrice"); $btn_checkout = new Button(); $btn_checkout->setClass("buttonred"); $btn_checkout->setCaption("CHECKOUT NOW"); $btn_checkout->onTap(checkout()); $table_total = new Table(); $table_total->setColumnsStyle("70%;30%"); $table_total->setRowsStyle("25dip;25dip;25dip;40dip"); $table_total->addControl($lbl_sub_total, 1, 1, 1, 1, "Left", "Middle"); $table_total->addControl($subtotal, 1, 2, 1, 1, "Right", "Middle"); $table_total->addControl($lbl_tax, 2, 1, 1, 1, "Left", "Middle"); $table_total->addControl($tax, 2, 2, 1, 1, "Right", "Middle"); $table_total->addControl($lbl_shipping, 3, 1, 1, 1, "Left", "Middle"); $table_total->addControl($shipping, 3, 2, 1, 1, "Right", "Middle"); $table_total->addControl($lbl_total, 4, 1, 1, 1, "Left", "Middle"); $table_total->addControl($total, 4, 2, 1, 1, "Right", "Middle"); $table_result->addControl($table_total, 1, 1); $table_result->addControl($btn_checkout, 2, 1, 1, 1, "Left", "Top"); $table->addControl($list, 1, 1); $table->addControl($table_result, 2, 1, 1, 1, "Left", "Bottom");
// Full path to git binary is required if git is not in your PHP user's path. Otherwise just use 'git'. $git_bin_path = '/usr/bin/git'; function checkout($commit_hash) { global $repo_dir, $web_root_dir, $git_bin_path, $branch; // Do a git checkout to the web root shell_exec('cd ' . $repo_dir . ' && ' . $git_bin_path . ' fetch'); shell_exec('cd ' . $repo_dir . ' && GIT_WORK_TREE=' . $web_root_dir . ' ' . $git_bin_path . ' checkout -f'); shell_exec('cd ' . $repo_dir . ' && GIT_WORK_TREE=' . $web_root_dir . ' GIT_DIR=' . $repo_dir . ' ' . $git_bin_path . ' pull origin ' . $branch); file_put_contents('deploy.log', date('m/d/Y h:i:s a') . " Deployed branch: " . $branch . " Commit: " . $commit_hash . "\n", FILE_APPEND); } $update = false; // Parse data from Bitbucket hook payload $payload = json_decode(file_get_contents("php://input")); $push = $payload->push; $pullrequest = $payload->pullrequest; if (!empty($push) && !empty($push->changes[0])) { $new = $push->changes[0]->new; if (!empty($new)) { if ($new->name === $branch) { checkout($new->target->hash); } } } elseif (!empty($pullrequest) && strtoupper($pullrequest->state) == 'MERGED') { $destination = $pullrequest->destination; if (!empty($destination)) { if ($destination->branch->name === $branch) { checkout($destination->commit->hash); } } }
public function checkOut() { $postData = $_POST['txt_json']; echo urldecode(json_encode(checkout($postData))); }
<tr> <th>ランク</th> <th>名前</th> <th>合計</th> <th>最終履歴</th> <th>#</th> </tr> </thead> <tbody> <?php require "logic.php"; if (isset($_GET["name_id"])) { $result = checkin($_GET["name_id"]); } else { if (isset($_GET["id"])) { $result = checkout($_GET["id"]); } } $result = getNames(); $time_add = array(); $start = array(); $end = array(); $flag = array(); $ids = array(); while ($row = mysql_fetch_assoc($result)) { $time_result = getTimes($row["id"]); $time_add[$row["name"]] = 0; $flag[$row["name"]] = 0; $ids[$row["name"]] = $row["id"]; while ($time_row = mysql_fetch_assoc($time_result)) { if ($time_row["end"] === NULL) {