Exemplo n.º 1
0
<?php

require_once '_session.php';
$id_mi = $_SESSION['id_mi'];
//TODO test uploads
if ($id_mi > 0) {
    require_once '_conn.php';
    $query = mins('items', array('idmi_i'), array($id_mi));
    mquery($query);
    $id_i = mysql_insert_id();
    $title = 'Create - Product';
    $headerstuff = '<link href="http://cdnjs.cloudflare.com/ajax/libs/dropzone/3.7.1/css/dropzone.min.css" rel="stylesheet">
    <script src="http://cdnjs.cloudflare.com/ajax/libs/dropzone/3.7.1/dropzone.js"></script>';
    require_once 'lay/lay.top.php';
    require_once '_genparams.php';
    $bot_script = '		$("#parameters").hide();
var totalparams=1;
		$("#name").focusout(function(data){
			$.post("/update.productname.php",{id_i:' . $id_i . ',name: $(this).val()},function(data){
				$("#name_label").html("Product Name:");
			});
		}).focus(function(){
				$("#name_label").html("<i>* Product Name:</i>");
		});	
					
		$("#price").focusout(function(data){
			$.post("/update.price.php",{id_i:' . $id_i . ',price: $(this).val()},function(data){
				$("#price_label").html("Price:");
			});
		}).focus(function(){
				$("#price_label").html("<i>* Price:</i>");
Exemplo n.º 2
0
             MQuery("DELETE FROM mpp_cards WHERE gid='" . $save['gid'] . "';");
             MQuery("UPDATE mpp_games SET round=round+1, pot=0, dealer=" . min($uids) . ", player_turn=" . $next_uid . " WHERE id='" . $save['gid'] . "';");
             MQuery("UPDATE mpp_players SET /*balance = " . $_START_BALANCE . ",*/ bet = 0, in_or_out = 'in', ready_for_next_round = 'no' WHERE gid = '" . $save['gid'] . "';");
             Header("Location: ?deal=1");
             exit;
         }
     }
     Header("Location: " . BASEPAGE);
     exit;
 } else {
     if (isset($_POST['new_game_name'], $_POST['new_game_small_blind'], $_POST['new_game_big_blind'], $_POST['new_game_comments'], $_POST['new_game_username'])) {
         $_POST['new_game_small_blind'] = max(1, (int) $_POST['new_game_small_blind']);
         $_POST['new_game_big_blind'] = max($_POST['new_game_small_blind'] + 1, (int) $_POST['new_game_big_blind']);
         mquery("insert into mpp_games (name, small_blind, big_blind, comment) values ('" . $_POST['new_game_name'] . "', '" . $_POST['new_game_small_blind'] . "', '" . $_POST['new_game_big_blind'] . "', '" . $_POST['new_game_comments'] . "');");
         $gid = mysql_insert_id();
         mquery("insert into mpp_players (uid, gid, name, in_or_out) values ('1','" . $gid . "','" . $_POST['new_game_username'] . "','out');");
         // Set sessions: uid, gid
         $_SESSION['mpp'] = array("uid" => "1", "gid" => $gid);
         Header("Location: " . BASEPAGE);
         exit;
     }
 }
 print_header(10);
 echo '<script type="text/javascript">if ( top.location != document.location ) top.location="' . BASEPAGE . '";</script>' . EOL;
 echo '<style type="text/css">' . EOL;
 echo "table#mpp_not_logged_in, table#new_game {" . EOL;
 echo "\twidth: 500px;" . EOL;
 echo "\tmargin: 0;" . EOL;
 echo "}" . EOL;
 echo "table#mpp_not_logged_in td, table#new_game td {" . EOL;
 echo "\tborder: solid 1px #777;" . EOL;