Jump to content
MakeWebGames

Coly010

Members
  • Posts

    912
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by Coly010

  1. [MENTION=68406]-BRAIDZ-[/MENTION] http://www.pcworld.com/article/241032/how_to_enter_your_pcs_bios.html http://pcsupport.about.com/od/tipstricks/ht/bootusbflash.htm   FYI they were from two quick google searches. The first: access bios The second: set boot from usb Point being, Google is your best friend, ask it questions (sensibly) it'll give you millions of possible answers with the ones at the top of the first page being most likely to help cant believe I just explained how to use Google....
  2. Does that mean [MENTION=69001]Zettieee[/MENTION] is to blame if you bought it from him?
  3. If he doesn't have an OS I don't know if he'll be able to use his laptop to download it, also he might find Linux difficult to use to begin with if used to windows
  4. [MENTION=69823]jcvenom[/MENTION] learning from an engine isn't always the best idea. You can pick up a lot of bad practices and techniques. Also it's all procedural... A lot of the power of php comes from OOP PHP, imo anyway. It's best to learn the fundamentals like you said from places such as codeacademy.com etc then maybe futter around with some php source, engines and the like. Most of your learning will be done when you try to fix errors and problems you have with your code.
  5. I don't think he coded any of this mod, he just tried, and somewhat failed so far to convert it from one engine to the RC engine
  6. [MENTION=68406]-BRAIDZ-[/MENTION] as long as the VALUES() of the INSERT sql has the same number of parameters as columns in the table then it'll work. Have you tried learning anything about php and even SQL ? Are you sure you have the table set up correctly in the database? And if you think that the INSERT sql is wrong, why haven't you tried fix it yourself?
  7. Not exactly, but does your mysql_query() 's need the connection passed to them? I'm not too sure on that though. Can I also just point out that the html in this is horrible? at the start of the file there are 9 elements sharing the one ID...   also [MENTION=68406]-BRAIDZ-[/MENTION] line 7 of your function file : ini_set('display_errors', 0); change it to ini_set('display_errors', true); and see what comes up
  8. Line 150: You bet ".money_alter($steaks+$scraps)."(".money_alter($st eaks)." effective) should be: You bet ".money_alter($steaks+$scraps)."(".money_alter($steaks)." effective) this should work, i think: <?php include('func_file.php'); if($_SERVER['HTTP_REFERER'] == $referer) { page_access($_SERVER['PHP_SELF']); echo "<p_title>Bookies</p_title><hr width = '800px'>"; if($_SESSION['myid'] == '1' || $_SESSION['myid'] == '2') { echo "><span class = 'loader:bookies.php?action=panel' id = 'linkage'>Manage games</span><hr width = '800px'>"; } echo "[<span class = 'loader:bookies.php?action=cat&cat_id=1' id = 'linkage'>Football</span>] [<span class = 'loader:bookies.php?action=cat&cat_id=2' id = 'linkage'>Hockey</span>] [<span class = 'loader:bookies.php?action=cat&cat_id=3' id = 'linkage'>Baseball</span>] [<span class = 'loader:bookies.php?action=cat&cat_id=4' id = 'linkage'>Soccer</span>] [<span class = 'loader:bookies.php?action=cat&cat_id=5' id = 'linkage'>Boxing</span>] [<span class = 'loader:bookies.php?action=cat&cat_id=6' id = 'linkage'>Cricket</span>] [<span class = 'loader:bookies.php?action=cat&cat_id=7' id = 'linkage'>Basketball</span>] [<span class = 'loader:bookies.php?action=cat&cat_id=8' id = 'linkage'>All</span>] [<span class = 'loader:bookies.php?action=mybets' id = 'linkage'>Your bets</span>]<hr width = '800px'>"; $_GET['action'] = preg_replace('/[^a-z]/', '', $_GET['action']); if(!$_GET['action']) { $_GET['action'] = 'cat'; $_GET['cat_id'] = 8; } if(in_array($_GET['action'], array('panel','cat','bet','mybets'))) { echo "<table width = '800px' class = 'display-stripes'> <tr> <td align = 'center'>"; switch($_GET['action']) { case 'panel' : b_panel(); break; case 'cat' : view_cat(); break; case 'bet' : place_bet(); break; case 'mybets' : view_bets(); break; } echo "</td></tr></table> <hr width = '800px'> ><span class = 'loader:casino.php' id = 'linkage'>Casino</span> <hr width = '800px'>"; } } function b_panel() { global $user; if($_SESSION['myid'] == '1' || $_SESSION['myid'] == '2') { echo "<p_title>Bookies panel</p_title><hr>"; if($_GET['type']=='add') { $_POST['team1'] = preg_replace('/[^a-zA-Z0-9]/', '', $_POST['team1']); $_POST['team2'] = preg_replace('/[^a-zA-Z0-9]/', '', $_POST['team2']); $_POST['gtype'] = preg_replace('/[^0-9]/', '', $_POST['gtype']); if(!in_array($_POST['gtype'], array(1,2,3,4,5,6,7))) { $_POST['gtype'] = 1; } $_POST['t1oddsmax'] = preg_replace('/[^0-9]/', '', $_POST['t1oddsmax']); $_POST['t1oddsmin'] = preg_replace('/[^0-9]/', '', $_POST['t1oddsmin']); $_POST['t2oddsmax'] = preg_replace('/[^0-9]/', '', $_POST['t2oddsmax']); $_POST['t2oddsmin'] = preg_replace('/[^0-9]/', '', $_POST['t2oddsmin']); $_POST['gmonth'] = preg_replace('/[^a-zA-Z]/', '', $_POST['gmonth']); $_POST['gday'] = preg_replace('/[^0-9]/', '', $_POST['gday']); $_POST['gyear'] = preg_replace('/[^0-9]/', '', $_POST['gyear']); $_POST['ghrs'] = preg_replace('/[^0-9]/', '', $_POST['ghrs']); $_POST['gmins'] = preg_replace('/[^0-9]/', '', $_POST['gmins']); if($_POST['team1']!='' && $_POST['team2']!='' && $_POST['t1oddsmax'] && $_POST['t1oddsmin'] && $_POST['t2oddsmax'] && $_POST['t2oddsmin'] && $_POST['gmonth'] && $_POST['gday'] && $_POST['gyear']) { $title = $_POST['team1']." VS ".$_POST['team2']; $odds1 = $_POST['t1oddsmax'].":".$_POST['t1oddsmin']; $odds2 = $_POST['t2oddsmax'].":".$_POST['t2oddsmin']; $ending=strtotime($_POST['gday']." ".$_POST['gmonth']." ".$_POST['gyear']." ".$_POST['ghrs']." hours ".$_POST['gmins']." minutes"); $cat_name = array('Football','Hockey','Baseball','Soccer','Box ing','Cricket','Basketball','All'); if(!$_GET['step']) { echo "Are you sure you wish to add the <b>".$cat_name[$_POST['gtype']-1]."</b> game(<b>".$title."</b>) with the following: Team one: <b>".$_POST['team1']."[".$odds1."]</b> - Team two: <b>".$_POST['team2']."[".$odds2."]</b> End date: ".date('F j Y', $ending)." - ".date('g:i:s a', $ending)." <form name = 'add-g' id = 'add-g'>"; foreach($_POST AS $key => $val) { echo "<input type = 'hidden' name = '".$key."' id = '".$key."' value = '".$val."'>"; } echo "<button class = 'submit:add-g:bookies.php?action=panel&type=add&step=1' id = 'linkage'>Confirm</button></form>"; } else { $odds = $odds1."-".$odds2; $sql = "INSERT INTO `bookie_games` VALUES('NULL', '".mysql_real_escape_string($title)."', '".mysql_real_escape_string($_POST['gtype'])."', '".mysql_real_escape_string($odds)."', '".mysql_real_escape_string($ending)."')"; mysql_query($sql); echo "You added the game successfully!"; } } else { echo warn("Error adding the game!"); } } else { if($_GET['type']=='results') { $_GET['id'] = preg_replace('/[^0-9]/', '', $_GET['id']); $_POST['score1'] = preg_replace('/[^0-9]/', '', $_POST['score1']); $_POST['score2'] = preg_replace('/[^0-9]/', '', $_POST['score2']); if($_GET['id'] && $_POST['score1'] && $_POST['score2']) { $sql = "SELECT * FROM `bookie_games` WHERE `bg_id` = '".mysql_real_escape_string($_GET['id'])."' AND `bg_time` <= '".mysql_real_escape_string(time())."'"; $sql = mysql_query($sql); if(mysql_num_rows($sql)) { $tg = mysql_fetch_array($sql); $odds = explode("-", $tg['bg_odds']); $teamn = explode(" VS ", $tg['bg_title']); $cat_name = array('Football','Hockey','Baseball','Soccer','Box ing','Cricket','Basketball','All'); $oddsone = explode(":", $odds[0]); $oddsmax[1] = $oddsone[0]; $oddsmin[1] = $oddsone[1]; $oddstwo = explode(":", $odds[1]); $oddsmax[2] = $oddstwo[0]; $oddsmin[2] = $oddstwo[1]; if($_POST['score1'] > $_POST['score2']) { $winner = 1; $scoring = "The score was <b>".$_POST['score1']." - ".$_POST['score2']."</b> to <b>".$teamn[$winner-1]."</b>"; } else { if($_POST['score2'] > $_POST['score1']) { $winner = 2; $scoring = "The score was <b>".$_POST['score1']." - ".$_POST['score2']."</b> to <b>".$teamn[$winner-1]."</b>"; } else { $winner = 0; $scoring = "The score was <b>".$_POST['score1']." - ".$_POST['score2']."</b>"; } } $sql = "SELECT * FROM `bookie_bets` WHERE `bb_game` = '".mysql_real_escape_string($_GET['id'])."'"; $sql = mysql_query($sql); if(mysql_num_rows($sql)) { while($gp = mysql_fetch_array($sql)) { if($gp['bb_team'] == $winner) { //they won $times = floor($gp['bb_bet']/$oddsmin[$gp['bb_team']]); $steaks = $times*$oddsmin[$gp['bb_team']]; $scraps = $gp['bb_bet']-$steaks; $prize = ($times*$oddsmax[$gp['bb_team']]) + $scraps; $msg = $teamn[$gp['bb_team']-1]." won the ".$cat_name[$gp['bb_team']-1]." game you bet on. ".$scoring." You bet ".money_alter($steaks+$scraps)."(".money_alter($steaks)." effective) with the odds of [".$oddsmax[$gp['bb_team']].":".$oddsmin[$gp['bb_team']]."]. You have won ".money_alter($prize)."!"; in_event($gp['bb_user'], $msg); credit_money($gp['bb_user'], $prize); } else { //they lost $times = floor($gp['bb_bet']/$oddsmin[$gp['bb_team']]); $steaks = $times*$oddsmin[$gp['bb_team']]; $scraps = $gp['bb_bet']-$steaks; $prize = ($times*$oddsmax[$gp['bb_team']]) + $scraps; if($winner == '0') { $wintype = 'drawn'; } else { $wintype = 'lost'; } $msg = $teamn[$gp['bb_team']-1]." ".$wintype." the ".$cat_name[$gp['bb_team']-1]." game you bet on. ".$scoring." You bet ".money_alter($gp['bb_bet'])."(".money_alter($steaks)." effective) with the odds of [".$oddsmax[$gp['bb_team']].":".$oddsmin[$gp['bb_team']]."]. You have lost ".money_alter($steaks); if($scraps) { $msg.=" and your ".money_alter($scraps)." was returned!"; credit_money($gp['bb_user'], $scraps); } in_event($gp['bb_user'], $msg); } } } $sql = "DELETE FROM `bookie_games` WHERE `bg_id` = '".mysql_real_escape_string($tg['bg_id'])."'"; mysql_query($sql); $sql = "DELETE FROM `bookie_bets` WHERE `bb_game` = '".mysql_real_escape_string($tg['bg_id'])."'"; mysql_query($sql); echo "Game <b>\"".$tg['bg_title']."\"</b> ended successfully!"; } else { echo warn("Error ending the game!"); } } else { echo warn("Error ending the game!"); } } else { echo "<b>Add a game:</b><hr width = '650px'>"; echo "<form name = 'addg' id = 'addg'> <table width = '650px' class = 'display-stripes' bgcolor = '#b8b8b8'> <tr> <td align = 'right' width = '45%' bgcolor = '#b8b8b8'> <b>Game teams:</b> </td> <td bgcolor = '#b8b8b8'> </td> <td align = 'left' width = '45%' bgcolor = '#b8b8b8'> <input type = 'text' style = 'width: 90px;' name = 'team1' id = 'team1'> <b>VS</b> <input type = 'text' style = 'width: 90px;' name = 'team2' id = 'team2'> </td> </tr> <tr> <td align = 'right' width = '45%' bgcolor = '#b8b8b8'> <b>Game type:</b> </td> <td bgcolor = '#b8b8b8'> </td> <td align = 'left' width = '45%' bgcolor = '#b8b8b8'> <select name = 'gtype' id = 'gtype'> <option value = '1'> Football </option> <option value = '2'> Hockey </option> <option value = '3'> Baseball </option> <option value = '4'> Soccer </option> <option value = '5'> Boxing </option> <option value = '6'> Cricket </option> <option value = '7'> Basketball </option> </select> </td> </tr> <tr> <td align = 'right' width = '45%' bgcolor = '#b8b8b8'> <b>Team one odds:</b> </td> <td bgcolor = '#b8b8b8'> </td> <td align = 'left' width = '45%' bgcolor = '#b8b8b8'> <select name = 't1oddsmax' id = 't1oddsmax'>"; for($i = 1; $i <=99; $i++) { echo "<option value = '".$i."'> ".$i." </option>"; } echo "</select><b>:</b><select name = 't1oddsmin' id = 't1oddsmin'>"; for($i = 1; $i <=99; $i++) { echo "<option value = '".$i."'> ".$i." </option>"; } echo "</select> </td> </tr> <tr> <td align = 'right' width = '45%' bgcolor = '#b8b8b8'> <b>Team two odds:</b> </td> <td bgcolor = '#b8b8b8'> </td> <td align = 'left' width = '45%' bgcolor = '#b8b8b8'> <select name = 't2oddsmax' id = 't2oddsmax'>"; for($i = 1; $i <=99; $i++) { echo "<option value = '".$i."'> ".$i." </option>"; } echo "</select><b>:</b><select name = 't2oddsmin' id = 't2oddsmin'>"; for($i = 1; $i <=99; $i++) { echo "<option value = '".$i."'> ".$i." </option>"; } echo "</select> </td> </tr> <tr> <td align = 'right' width = '45%' bgcolor = '#b8b8b8' valign = 'top'> <b>Date betting ends:</b> </td> <td bgcolor = '#b8b8b8'> </td> <td align = 'left' width = '45%' bgcolor = '#b8b8b8'>"; $year = date('o'); $day = date('d'); $month = date('F'); $months = array('january','february','march','april','may',' june', 'july','august','september','october','november',' december'); echo "<table><tr><td align = 'left' style = 'background: #E3E3E3;'><i>Date:</i> <select name = 'gmonth' id = 'gmonth'>"; for($i = 0; $i < count($months); $i++) { $selected = ''; if(ucfirst($months[$i]) == $month) { $selected = ' SELECTED'; } echo "<option value = '".$months[$i]."'".$selected."> ".ucfirst($months[$i])." </option>"; } echo "</select><b>/</b><select name = 'gday' id = 'gday'>"; for($i = 1; $i <=31; $i++) { $selected = ''; if($i == $day) { $selected = ' SELECTED'; } echo "<option value = '".$i."'".$selected."> ".$i." </option>"; } echo "</select><b>/</b><select name = 'gyear' id = 'gyear'>"; for($i = $year; $i <=$year+1; $i++) { echo "<option value = '".$i."'".$selected."> ".$i." </option>"; } echo "</select> <i>Time:</i> <select name = 'ghrs' id = 'ghrs'>"; for($i = 0; $i <=24; $i++) { echo "<option value = '".$i."'>"; if($i < 10) { echo "0"; } echo $i." </option>"; } echo "</select><b>:</b><select name = 'gmins' id = 'gmins'>"; for($i = 0; $i <=59; $i++) { echo "<option value = '".$i."'>"; if($i < 10) { echo "0"; } echo $i." </option>"; } echo "</select></td></tr></table> </td> </tr> <tr> <td align = 'center' bgcolor = '#b8b8b8' colspan = '3'> <button class = 'submit:addg:bookies.php?action=panel&type=add' id = 'linkage'>Add game</button> </td> </tr> </table> </form>"; echo "<hr width = '650px'><b>End a game:</b><hr width = '650px'>"; echo "<table width = '650px' class = 'display-stripes' bgcolor = '#b8b8b8'> <tr> <th> <b>Game title</b> </th> <th> <b>Date ended</b> </th> <th> <b>Post results</b> </th> </tr>"; $sql = "SELECT * FROM `bookie_games` WHERE `bg_time` <= '".mysql_real_escape_string(time())."'"; $sql = mysql_query($sql); if(!mysql_num_rows($sql)) { echo "<tr><td align = 'center' colspan = '3'><b>No games to show</b></td></tr>"; } else { $num = 0; while($eg = mysql_fetch_array($sql)) { $teams = explode(" VS ", $eg['bg_title']); echo "<tr bgcolor = '".stripe($num)."' valign = 'top'> <td align = 'left'> ".$eg['bg_title']." </td> <td align = 'left'> ".date('F j Y', $eg['bg_time'])."".date('g:i:s a', $eg['bg_time'])." </td> <td align = 'right'> <form name = 'score-".$num."' id = 'score-".$num."'> <i>".$teams[0]." score:</i> <input type = 'text' style = 'width: 25px;' name = 'score1' id = 'score1'> <i>".$teams[1]." score:</i> <input type = 'text' style = 'width: 25px;' name = 'score2' id = 'score2'> <button class = 'submit:score-".$num.":bookies.php?action=panel&type=results&id= ".$eg['bg_id']."' id = 'linkage'>Confirm</button> </form> </td> </tr>"; $num++; } } echo "</table>"; echo "<hr width = '650px'><b>Games ending soon(12hrs or less):</b><hr width = '650px'>"; echo "<table width = '650px' class = 'display-stripes' bgcolor = '#b8b8b8'> <tr> <th> <b>Game title</b> </th> <th> <b>Date ending</b> </th> </tr>"; $time_soon = time()+43200; $sql = "SELECT * FROM `bookie_games` WHERE `bg_time` <= '".mysql_real_escape_string($time_soon)."' AND `bg_time` > '".mysql_real_escape_string(time())."'"; $sql = mysql_query($sql); if(!mysql_num_rows($sql)) { echo "<tr><td align = 'center' colspan = '2'><b>No games to show</b></td></tr>"; } else { $num = 0; while($eg = mysql_fetch_array($sql)) { echo "<tr bgcolor = '".stripe($num)."'> <td align = 'left'> ".$eg['bg_title']." </td> <td align = 'left'> ".date('F j Y', $eg['bg_time'])." - ".date('g:i:s a', $eg['bg_time'])." </td> </tr>"; } } echo "</table>"; } } } else { echo "You really should not be here!"; } } function view_cat() { global $user; $_GET['cat_id'] = preg_replace('/[^0-9]/', '', $_GET['cat_id']); if(!in_array($_GET['cat_id'], array(1,2,3,4,5,6,7,8))) { echo warn("Invalid cat ID!"); } else { $cat_name = array('Football','Hockey','Baseball','Soccer','Box ing','Cricket','Basketball','All'); echo "<p_title>".ucfirst($cat_name[$_GET['cat_id']-1])." games</p_title><hr>"; echo "<table width = '650px' class = 'display-stripes' bgcolor = '#b8b8b8'> <tr> <th colspan = '2'> <b>Game title</b> </th> <th style = 'text-align: center;'> <b>Date ending</b> </th> <th style = 'text-align: right;'> <b>Place bet(s)</b> </th> </tr>"; $sql = "SELECT * FROM `bookie_games` WHERE `bg_time` > '".mysql_real_escape_string(time())."'"; if($_GET['cat_id'] < 8) { $sql.="AND `bg_type` = '".mysql_real_escape_string($_GET['cat_id'])."'"; } $sql.="ORDER BY `bg_time` ASC"; $sql = mysql_query($sql); if(!mysql_num_rows($sql)) { echo "<tr><td align = 'center' colspan = '4'><b>No ".ucfirst($cat_name[$_GET['cat_id']-1])." games to show</b></td></tr>"; } else { $num = 0; while($eg = mysql_fetch_array($sql)) { echo "<tr> <td align = 'center' colspan = '4'> <form name = 'bet-".$num."' id = 'bet-".$num."'> <table width = '100%' cellspacing = '0'> <tr bgcolor = '".stripe($num)."' valign = 'top'> <td align = 'left' width = '50px'> <img src = 'images/css/casino/game-".$eg['bg_type'].".png'> </td> <td align = 'left'>"; $title_odds = explode(" VS ", $eg['bg_title']); $odds = explode("-", $eg['bg_odds']); echo "<b>".$title_odds[0]."[".$odds[0]."]</b> VS <b>".$title_odds[1]."[".$odds[1]."]</b> ".ucfirst($cat_name[$eg['bg_type']-1])." </td> <td align = 'center'> ".date('F j Y', $eg['bg_time'])."".date('g:i:s a', $eg['bg_time'])." </td> <td align = 'right'> <i>Team to win:</i><select name = 'team'> <option value = '1'> ".ucfirst($title_odds[0])." </option> <option value = '2'> ".ucfirst($title_odds[1])." </option> </select> <i>Bet:</i><input type = 'text' style = 'width: 50px;' value = '0' name = 'bet' id = 'bet'> </td> </tr> <tr bgcolor = '#000000' height = '30px'> <td colspan = '4' align = 'center'> <button class = 'submit:bet-".$num.":bookies.php?action=bet&id=".$eg['bg_id']."' id = 'linkage'>Place bet</button> </td> </tr> <tr> <td colspan = '4' height = '5px'> </td> </tr> </table> </form> </td> </tr>"; $num++; } } echo "</table>"; } } function place_bet() { global $user; echo "<p_title>Place bet</p_title><hr>"; $_GET['id'] = preg_replace('/[^0-9]/', '', $_GET['id']); $_POST['bet'] = preg_replace('/[^0-9]/', '', $_POST['bet']); $_POST['team'] = preg_replace('/[^0-9]/', '', $_POST['team']); if($_GET['id'] && $_POST['bet'] && $_POST['team']) { $sql = "SELECT * FROM `bookie_games` WHERE `bg_id` = '".mysql_real_escape_string($_GET['id'])."' AND `bg_time` > '".mysql_real_escape_string(time())."'"; $sql = mysql_query($sql); if(mysql_num_rows($sql)) { if($user['usr_money'] >= $_POST['bet']) { $bg = mysql_fetch_array($sql); $teamname = explode(" VS ", $bg['bg_title']); $teamname = $teamname[$_POST['team']-1]; $oddsmin = explode("-", $bg['bg_odds']); $odds = $oddsmin[$_POST['team']-1]; $oddsmin = explode(":", $oddsmin[$_POST['team']-1]); $oddsmin = $oddsmin[1]; $betting = floor($_POST['bet']/$oddsmin); $betting*=$oddsmin; if(!$_GET['step']) { echo "You are betting <b>".money_alter($_POST['bet'])."</b>(".money_alter($betting)." effective) on team <b>".$teamname."</b> to win with the odds of [".$odds."]. Are you sure you wish to place this bet? <form name = 'bet-c' id = 'bet-c'> <input type = 'hidden' name = 'bet' id = 'bet' value = '".$_POST['bet']."'> <input type = 'hidden' name = 'team' id = 'team' value = '".$_POST['team']."'> <button class = 'submit:bet-c:bookies.php?action=bet&id=".$_GET['id']."&step=1' id = 'linkage'>Confirm bet</button> </form>"; } else { $sql = "INSERT INTO `bookie_bets` VALUES('NULL', '".mysql_real_escape_string($_SESSION['myid'])."', '".mysql_real_escape_string($_GET['id'])."', '".mysql_real_escape_string($_POST['team'])."', '".mysql_real_escape_string($_POST['bet'])."')"; mysql_query($sql); echo min_money($_POST['bet']); echo "Your bet has been placed for a total of <b>".money_alter($_POST['bet'])."</b>. You can view your bets from the top of this page. You will receive an event with the results shortly after the game has ended."; } } else { echo warn("You dont have enough money to make this bet!"); } } else { echo warn("This game does not exist!"); } } else { echo warn("This game does not exist!"); } } function view_bets() { global $user; echo "<p_title>Your bets</p_title><hr>"; echo "<table width = '100%' class = 'display-stripes'> <tr> <th colspan = '2'> Team betting on/Type </th> <th> Odds </th> <th> Ending date </th> <th> Total bet </th> </tr>"; $sql = "SELECT bb.*,bg.* FROM `bookie_bets` bb LEFT JOIN `bookie_games` bg ON bb.bb_game = bg.bg_id WHERE bb.bb_user = '".mysql_real_escape_string($_SESSION['myid'])."'"; $sql = mysql_query($sql); if(mysql_num_rows($sql)) { $num = 0; $cat_name = array('Football','Hockey','Baseball','Soccer','Box ing','Cricket','Basketball','All'); while($mb = mysql_fetch_array($sql)) { $teamname = explode(" VS ", $mb['bg_title']); $teamname = $teamname[$mb['bb_team']-1]; $oddsmin = explode("-", $mb['bg_odds']); $odds = $oddsmin[$mb['bb_team']-1]; $oddsmin = explode(":", $oddsmin[$mb['bb_team']-1]); $oddsmin = $oddsmin[1]; $betting = floor($mb['bb_bet']/$oddsmin); $betting*=$oddsmin; echo "<tr bgcolor = '".stripe($num)."' valign = 'top'> <td width = '50px'> <img src = 'images/css/casino/game-".$mb['bg_type'].".png'> </td> <td> ".$teamname." - ".ucfirst($cat_name[$mb['bg_type']-1])." </td> <td> [".$odds."] </td> <td> ".date('F j Y', $mb['bg_time'])."".date('g:i:s a', $mb['bg_time'])." </td> <td> ".money_alter($mb['bb_bet'])."(".money_alter($betting)." effective) </td> </tr>"; $num++; } } else { echo "<tr><td colspan = '5'>You have no bets at this time.</td></tr>"; } echo "</table>"; } ?>
  9. Hi, just wanted to make a more formal post saying that I am available as a freelance developer. I've been programming and designing websites for the past 6 years, constantly increasing my knowledge of HTML(5), CSS(3), Javascript, jQuery and PHP so that I can provide my clients with the best piece of software. I started off developing mods for Mccodes and have since branched out into developing other web apps. Soon I was creating Content Management Systems to suit certain needs of clients, whether it simply be to dynamically add photos to an image gallery, or full site customisation. I pride myself in the readability of any file I code and therefore I make it easy for a client to change or edit the code of the files I give them, by coding in a consistent, fluid manner, providing comments to explain what is happening in each file. I work on a cost per time spent coding basis, but it still ends up working out cheap enough. If you're interested in having additions made to your game, or to have a full game made from scratch feel free to send me a Private Message. We can work something out. Testimony (Thanks Aaron :) ) : http://makewebgames.io/showthread.php/46292-Coly010-Colum-Ferry
  10. Coly010

    PHP Streaming

    [MENTION=64684]Dayo[/MENTION] yeah I think streaming it might be an effective way of doing it, just so it seems like there is something actually happening lol
  11. [MENTION=68406]-BRAIDZ-[/MENTION] I can't help without seeing the rest of how the engine is set up. put this at the top of the file just beneath <?php and tell me what comes up when you try load a game etc:   error_reporting(E_ALL); ini_set('error_reporting', E_ALL);
  12. remove anything that has echo warn(); min_money(); and money_alter() unless you know that your engine has though functions available.
  13. Coly010

    PHP Streaming

    I like being able to see the folder structure and simply clicking on a file in the tree to open it. I only have one monitor so it helps.
  14. Coly010

    PHP Streaming

    Can I just point out, the code stays the same, the structure of the code changes.
  15. Coly010

    PHP Streaming

    I was doing some background reading on some features and techniques in PHP (I do this every so often when I get bored... Lol) and I came across an article about streaming in PHP. When I saw the title I expected it to be about using AJAX or some other JavaScript library to fetch data processed and generated by a PHP script to display content on the web page. Halfway through the article I realised that it was a lot more informative than I thought it would be and that AJAX was only mentioned at the end. The article is here: http://www.sitepoint.com/php-streaming-output-buffering-explained/ Some of you may have seen it already, if not I think it's definitely worth a read, especially for people starting off in PHP. It highlights the connection between PHP and the webserver, and demonstrates that there is more going on behind the scenes than you think. I personally think this is vital for newcomers to PHP because to be a good developer, you need to understand how your code is being executed and the resources it is using, the back end stuff, the part that you don't see happening but still have control over. Anyway, take a read and tell me what you think. [MENTION=68406]-BRAIDZ-[/MENTION] im tagging you in this because I feel you need to do a bit more reading on PHP if you want to be able to develop mods etc with it. Whilst this won't directly help you with mod creation I think it might show you more of what's going on in PHP.
  16. It's all there... In the code... Simply var_dump($b) and it will show you all the data stored in the fields and what type they are, the code then makes references to the names of these fields or more easily use array_keys($b), then just use phpmyadmin's table creator to recreate it. you also realise your game is stealing images from torn for that script ? And you're using mysql_* where you should now be using mysqli_* ?
  17. Lol the mapping sounds like the feature I installed onto Military RPG. I have experience doing that. As for the rest, sounds interesting, hope it goes well for you
  18. or just change it in authenticate.php when they first log in. does Opera not allow you to set your User Agent to what you want also? And firefox allows you change headers no?
  19. Lol, i dont think that is supposed to be part of the mod I think user agent tracking might be useful if you want to see the population of your game that use mobile devices and use that to decide whether or not to build either a mobile app or mobile site, but then you could just make a poll.
  20. everything you need to know about php is on google too.
  21. so would that not mean throwing together a massive amount of find and replaces? How would you handle this though:   <dialog-box box-title='Title' box-button='Close' box-button-action='SomeAction();'> Content goes here </dialog-box>   to this:   <div class='window'> <span class='title'>Title</span> <span class='content'>Content goes here</content> <span class='buttons'><button onclick='SomeAction();'>Close</button></span> </div>   You method also depends on PHP to parse the code otherwise it fails. I will still admit its a good solution, I just want to see where it can be taken to.
  22. Thats an interesting way of doing it through PHP, but I think it would hang if you tried to do it for a large scale application that contains many custom elements? It's also a straight replace, with if your <red-dialog> was more than just a div with a class? [MENTION=1]a_bertrand[/MENTION] pointed me to something that seems to match what i was looking for perfectly despite relying on JS: https://www.polymer-project.org/1.0/ I think its quite interesting and could be a must-have for large applications that reuse a lot elements for the one component, and therefore to save you from writing a lot of the same code over and over. Basically implementing D.R.Y into HTML.
  23. No offence, but I've watched [MENTION=68406]-BRAIDZ-[/MENTION] struggle to learn PHP when a number of people have tried to help him, have told him to read articles and tutorials and he refused to take the advice. Learning to set up and run a server is a lot more complicated than php is, and by referring him to DigitalOcean he will need to learn how to use a vps. He's going to need to learn about connecting to one, most likely from windows, therefore he'll need to learn how to use putty or something similar, he's going to need to learn how to use Linux commands, if he wants to secure it, ssh keys. He's going to need to learn how to upload files without cpanel, unless he buys a license for that and installs it. He will most likely want phpmyadmin, again going to have to learn how to install it. Even the initial set up for mysql will be done through Linux commands most likely. [MENTION=68406]-BRAIDZ-[/MENTION] if your willing to learn how, then digitalocean will be one of the best hosting services you'll work with. If you don't want to learn then you'll struggle with it and are probably better using shared hosting or maybe even dedicated hosting
  24. So I made this post over on GMF but I thought I might as well post it here too to see what people think. I've recently purchased an rpg graphic set from Graphic River and I've been trying to create things like dialog boxes, main page styles and user data sections, exp bars etc. Whilst doing this I've realised that I'm using a lot of html elements for individual things. A simple example: <div class='dialog'> <span class='title'>Title</span> <span class='actionButtons'><button>Close</button></span> <p class='text-content'>Some amount of text relating to the dialog box</p> </div> Then I use CSS to position and style everything. I saw [MENTION=1]a_bertrand[/MENTION] make a post about LESS on GMF and I thought, hey, that could be useful. I can use the one class over and over again for similar elements but change maybe one thing: [css] .window { background: #303030 url("../img/window-bk.png"); border-image: url("../img/border/fancy.png") 25 25 25 25; border-radius: 8px; border-width: 6px; padding: 2px; color: #fff; font-size: 14px; word-spacing: 3px; letter-spacing: 1.5px; } .red_window { .window; color: red; } [/css] etc, therefore saving me writing a lot of css for similar elements like that. Great, that saves me a bit of time. My thoughts now brought me to something else though. If we can have a precompiler for CSS, can we have the same for HTML? What if we were able to create and define our own HTML elements, that are formed from various standard HTML elements. What if I could turn: <div class='dialog'> <span class='title'>Title</span> <span class='actionButtons'><button>Close</button></span> <p class='text-content'>Some amount of text relating to the dialog box</p> </div> into <dialog-box window-title='Title' action-button='Close' action-button-click='CloseDialog();'> Some amount of text relating to the dialog box </dialog-box> then simply define my CSS styles as: [css] dialog-box { background: #303030 url("../img/window-bk.png"); border-image: url("../img/border/fancy.png") 25 25 25 25; border-radius: 8px; border-width: 6px; padding: 2px; color: #fff; font-size: 14px; word-spacing: 3px; letter-spacing: 1.5px; } [/css] then if need be, I assign the <dialog-box></dialog-box> a class of red-window to override the font-color. Possibly have a file where you define the HTML elements: [js] DEFINE <dialog-box></dialog-box> { markup { <div class='dialog'> <span class='title'>@param(window-title)</span> <span class='actionButtons'> <button onclick='@param(action-button-click)'>@param(action-button)</button> </span> <p class='text-content'>@param(innerHTML);</p> </div> } params { window-title, action-button, action-button-click } css { .dialog { // basic standard css } .title { // basic styling and positioning } .actionButtons { // basic styling and positioning } } } [/js] I did a quick search and found this: http://www.html5rocks.com/en/tutorials/webcomponents/customelements/ From looking at it quickly, I think it may do what I've written about, but it does so with JS. I was thinking having it more like LESS, where you compile your final code and it converts the custom element tags back to their standard markup, making it compatible for every user, whether they have JS turned on or not. Rather than leaving it to chance that every user will have JS turned on to convert your custom elements. Any opinions, or do any of you know of something like this?
  25. The one I created was hella advanced. Took about 4/5 hours to program initially and then about a week after to iron out bugs. But it turned out quite well
×
×
  • Create New...