
Shades
Members-
Posts
52 -
Joined
-
Last visited
-
Days Won
5
Content Type
Profiles
Forums
Events
Everything posted by Shades
-
Hey DJKanna, I opened the link again and the dropdown pretty much is not working on my laptop?
- 6 replies
-
- mccode-v2
- mccode-lite
-
(and 3 more)
Tagged with:
-
Hello, so I just need a simple IPN for me to credit an item. If anyone has an example or would be able to help would be amazing! So with my donator page people would be able to purchase the item however there is different options for different quantity’s however it’s the same item if that makes sense
-
WOW! You legend! You made it look so easy man thanks for that I appreciate that man
- 6 replies
-
- 2
-
-
- mccode-v2
- mccode-lite
-
(and 3 more)
Tagged with:
-
Thanks for the advice! Was not sure how I would have been able to do that! Now I know thank you @Magictallguy
-
How about creating a function? function username($userid) { global $db, $ir; if(!$userid) { return 'N/A'; } $colours = array( 1 => 'brown', 2 => 'gold', 3 => 'blue' ); $select = mysql_query("SELECT `username`, `user_level` FROM `users` WHERE `userid` = " . $userid); if(!$mysql_num_rows($select)) { return 'N/A'; } $user = mysql_fetch_array($select); $ret = ''; if($user['user_level'] > 1) { $ret = "<a href='viewuser.php?u=".$userid."' style='color:".$colours[$user['user_level']].";'>".$user['username']."</a>"; } else if(!$user['user_level']) { $ret = "<a href='viewuser.php?u=".$userid."' style='color:brown;' title='NPC'>".$user['username']."</a>"; } return $ret; } Add that to global functions and when you want to a username to display use e.g. - <?php echo username($r['userid']); ?> You can still add on to this to show donator users and etc.
-
Finally, after awhile I have acquired Samurai Assault's Template which use to be owned by @Samurai Legend The reason why I want to open a Samurai theme game is because when I use to play Samurai Assault it was a successful game and there was about 70+ users playing online daily. Now, I am looking for someone who would be able to help me create a successful game. I have good knowledge and background with PHP & MySQLi. I believe I could run a game with no problems if I have a good partner. Key to Successful Game - Not making the game donator bias, by doing so will allow non-donators too also have a chance and not quit the game quickly. Having items, shops, locations, houses and a lot of content for the users to be able to do will also keep the users occupied. Economy needs to somehow be balanced which I have no clue to do. If the game economy is way over-hill people will not like it because it's something many people don't want to see. Making sure the game is updated and there is no errors. Daily, Weekly, Monthly competitions and etc. Game being mobile optimised Android & IOS applications (Further in the future) If there is anything else you want to add in please comment below as your opinions matter to me! If anyone wants to have a partnership with me please send me a message. I will get back to you ASAP.
-
Do you have a link? I wouldn't mind helping out.
-
Aha didn’t realise. Since my broadband is down! EE Fibre Optic taking the piss once again seriously second time this month my broadband has been down. I would have converted it for you as I am on my phone it would be very difficult for me to convert it. I shall however later convert it for you. Or if you can not wait I believe there is a conversion tutorial made by MTG somewhere
- 17 replies
-
- mccode-v2
- mccode-lite
-
(and 3 more)
Tagged with:
-
Add this in your hospital page - $healcost = $r['level'] * 500; $cf = money_formatter($healcost); echo "[<a href='hospitalheal.php?ID={$r['userid']}'>Heal for {$healcost}</a>]"; create hospitalheal.php <?php define('PAGE_HEADER', 'Hospital: Heal'); require_once('globals.php'); echo "<h3><u>Hospital: Heal</u></h3>"; if ($ir['hopsital']) { echo "You cannot heal while in hospital."; exit($h->endpage()); } $_GET['ID'] = (isset($_GET['ID']) && is_numeric($_GET['ID'])) ? abs(intval($_GET['ID'])) : 0; $hospital_q = $db->query( "SELECT `userid`, `hospital`, `level`, `username` FROM `users` WHERE `userid` = {$_GET['ID']}"); if ($db->num_rows($hospital_q) == 0) { $db->free_result($hospital_q); echo "Invalid user."; exit($h->endpage()); } $r = $db->fetch_row($hospital_q); $db->free_result($hospital_q); if (!$r['hospital']) { echo "That user is not in hospital!"; exit($h->endpage()); } $cost = $r['level'] * 500; $cf = money_formatter($r['level'] * 500); if ($ir['money'] < $cost) { echo "Sorry, you do not have enough money to heal out {$r['username']}. You need {$cf}."; } echo "You successfully healed {$r['username']} out of hospital for {$cf}."; $db->query( "UPDATE `users` SET `money` = `money` - {$cost} WHERE `userid` = $userid"); $db->query( "UPDATE `users` SET `hospital` = 0 WHERE `userid` = {$r['userid']}"); event_add($r['userid'], "<a href='viewuser.php?u={$ir['userid']}'>{$ir['username']}</a> healed you out of hospital.", $c); $h->endpage(); ?> Hope this helps.
- 17 replies
-
- 1
-
-
- mccode-v2
- mccode-lite
-
(and 3 more)
Tagged with:
-
Hello, from the help of @Magictallguy. THANK YOU!I have finally created two drop down lists which show the make and model of the vehicles from the database. However, know when I choose the make on the first drop down list I want it dynamically to show the second drop down list only specific for the make which has been chosen! However, I seem to be getting this wrong. If someone could help me out here would be appreciated search.php - <!DOCTYPE HTML> <head> <title>Car Search</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script> $(document).ready(function(){ $('#cmMAKE').on('change', function(){ var cmMAKE = $(this).val(); if(cmMAKE){ $.ajax({ type:'POST', url:'searchAjax.php', data:'cmMAKE='+cmMAKE, success:function(html){ $('#cmMAKE').html(html); $('#cmMODEL').html('<option value="">Select make first</option>'); } }); }else{ $('#cmMAKE').html('<option value="">Select make first</option>'); $('#cmMODEL').html('<option value="">Select model first</option>'); } }); </script> </head> <?php error_reporting(E_ALL & ~E_NOTICE); require("config/config.php"); try { $database = new Connection(); $db = $database->openConnection(); $q = $db->prepare("SELECT COUNT(`avail`.`cID`) AS `total`, `make`.`cmMAKE` FROM `cars_available` AS `avail` INNER JOIN `car_makes` AS `make` ON `avail`.`cMAKE` = `make`.`cmID` GROUP BY `avail`.`cMAKE` ORDER BY `total` DESC, `make`.`cmMAKE` ASC"); $q->execute(); $data = $q->fetchAll(); ?> <table width = "50%"> <tr> <th><h3>SEARCH OUR CARS</h3></th> <th><h4>Make:</h4></th> <!-- <form name="searchcars" method="POST" action="searchsubmit.php"> --> <th> <select name="cmMAKE" id="cmMAKE"> <option value="">MAKE</option> <?php foreach ($data as $row): ?> <option><?=$row["cmMAKE"]?> (<?=$row["total"]?>)</option> <?php endforeach ?> </select> </th> <?php $q2 = $db->prepare("SELECT COUNT(`avail`.`cMODEL`) AS `total`, `model`.`cmoMODEL` FROM `cars_available` AS `avail` INNER JOIN `car_models` AS `model` ON `avail`.`cMODEL` = `model`.`cmoID` GROUP BY `avail`.`cMODEL` ORDER BY `total` DESC, `model`.`cmoMODEL` ASC"); $q2->execute(); $data2 = $q2->fetchAll(); ?> <th><h4>Model:</h4></th> <th> <select name="cmoMODEL" id="cmoMODEL"> <option value="">MODEL</option> <?php foreach ($data2 as $row2): ?> <option><?=$row2["cmoMODEL"]?> (<?=$row2["total"]?>)</option> <?php endforeach ?> </select> </th> <th><input type="submit" value="Submit"></th> </form> </tr> <table> <?php $database->closeConnection(); } catch (PDOException $e) { echo "There is some problem in connection: " . $e->getMessage(); } ?> </html> searchAjax.php - <?php error_reporting(E_ALL & ~E_NOTICE); require("config/config.php"); $cmMAKE = $_POST["cmMAKE"]; try { $database = new Connection(); $db = $database->openConnection(); if(!empty($_POST["cmMAKE"])) { // Fetch model data based on the specific make $q2 = $db->prepare("SELECT COUNT(`avail`.`cMODEL`) AS `total`, `model`.`cmoMODEL` FROM `cars_available` AS `avail` INNER JOIN `car_models` AS `model` ON `avail`.`cMODEL` = :cmMAKE GROUP BY `avail`.`cMODEL` ORDER BY `total` DESC, `model`.`cmoMODEL` ASC"); $q2->bindParam(":cmMAKE", $cmMAKE); $q2->execute(); $data2 = $q2->fetchAll(); ?> //$query = "SELECT * FROM states WHERE country_id = ".$_POST['country_id']." AND status = 1 ORDER BY state_name ASC"; //$result = $db->query($query); > // Generate HTML of state options list <?php foreach ($data as $row): ?> <option><?=$data2["cmoMODEL"]?> (<?=$row["total"]?>)</option> <?php endforeach ?> <? } $database->closeConnection(); } catch (PDOException $e) { echo "There is some problem in connection: " . $e->getMessage(); } ?>
- 6 replies
-
- 1
-
-
- mccode-v2
- mccode-lite
-
(and 3 more)
Tagged with:
-
That's amazing Cruzer!
-
It's alright anyway, I found my account details.
-
The current providers have disappeared
-
Does anyone have the latest files? I lost my account with the license. I can't get hold of it anymore ?
-
Website, I registered twice...cause the first email wasn't appearing. I validated the account after the second signup. I can not login.
- 4 replies
-
- mccode-v2
- mccode-lite
-
(and 3 more)
Tagged with:
-
Thank you so much! That works perfectly!!!
-
DROP TABLE IF EXISTS `car_makes`; CREATE TABLE `car_makes` ( `cmID` int(11) NOT NULL AUTO_INCREMENT, `cmMAKE` varchar(50) NOT NULL DEFAULT '', PRIMARY KEY (`cmID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; LOCK TABLES `car_makes` WRITE; /*!40000 ALTER TABLE `car_makes` DISABLE KEYS */; INSERT INTO `car_makes` (`cmID`, `cmMAKE`) VALUES (1,'BMW'), (2,'Merc'), (3,'Toyoto'); /*!40000 ALTER TABLE `car_makes` ENABLE KEYS */; UNLOCK TABLES; # Dump of table car_models # ------------------------------------------------------------ DROP TABLE IF EXISTS `car_models`; CREATE TABLE `car_models` ( `cmoID` int(11) NOT NULL AUTO_INCREMENT, `cmoMODEL` varchar(50) NOT NULL DEFAULT '', PRIMARY KEY (`cmoID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; LOCK TABLES `car_models` WRITE; /*!40000 ALTER TABLE `car_models` DISABLE KEYS */; INSERT INTO `car_models` (`cmoID`, `cmoMODEL`) VALUES (1,'4 Series'); /*!40000 ALTER TABLE `car_models` ENABLE KEYS */; UNLOCK TABLES; # Dump of table cars_available # ------------------------------------------------------------ DROP TABLE IF EXISTS `cars_available`; CREATE TABLE `cars_available` ( `cID` int(11) NOT NULL AUTO_INCREMENT, `cMAKE` int(11) NOT NULL, `cMODEL` int(11) NOT NULL, PRIMARY KEY (`cID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; LOCK TABLES `cars_available` WRITE; /*!40000 ALTER TABLE `cars_available` DISABLE KEYS */; INSERT INTO `cars_available` (`cID`, `cMAKE`, `cMODEL`) VALUES (1,1,1), (2,2,1), (3,1,1); /*!40000 ALTER TABLE `cars_available` ENABLE KEYS */; UNLOCK TABLES;
-
@Magictallguy- Hey, thanks again however, now besides it only shows 0 for each one. <?php error_reporting(E_ALL & ~E_NOTICE); require("config/config.php"); try { $database = new Connection(); $db = $database->openConnection(); $smt = $db->prepare("SELECT cm.cmID, cm.cmMAKE, COUNT(ca.cMAKE) AS total FROM car_makes AS cm LEFT JOIN cars_available AS ca ON cm.cmMAKE = ca.cMAKE GROUP BY cm.cmMAKE ORDER BY total DESC, cm.cmMAKE ASC"); $smt->execute(); $data = $smt->fetchAll(); ?> <select name="cmMAKE" id="cmMAKE"> <?php foreach ($data as $row): ?> <option><?=$row["cmMAKE"]?> (<?=$row["total"]?>)</option> <?php endforeach ?> </select> <?php $database->closeConnection(); } catch (PDOException $e) { echo "There is some problem in connection: " . $e->getMessage(); } ?>
-
Hello @Magicaltallguy, thanks for the response. I still receive an error There is some problem in connection: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'cnt' in 'order clause'
-
Hello all, so here I have is a drop down list of the `car_makes` e.g. BMW, Mercedes, Nissan, Audi and etc. So from another table called `cars_available` I want it to show the total of `car_makes` available. In the `cars_available` it has `cID`, `cMAKE`, `cMODEL` So where it says $total_rows I want it to show how many cars is available for each make. Please let me know how I would be able to do this or give me an example. <?php error_reporting(E_ALL & ~E_NOTICE); require("config/config.php"); try { $database = new Connection(); $db = $database->openConnection(); $smt = $db->prepare("SELECT * From `car_makes`"); $smt->execute(); $data = $smt->fetchAll(); ?> <select name="cmMAKE" id="cmMAKE"> <?php foreach ($data as $row): ?> <option><?=$row["cmMAKE"]?> (<?=$total_rows?>)</option> <?php endforeach ?> </select> <?php $database->closeConnection(); } catch (PDOException $e) { echo "There is some problem in connection: " . $e->getMessage(); } ?> <?php error_reporting(E_ALL & ~E_NOTICE); require("config/config.php"); try { $database = new Connection(); $db = $database->openConnection(); $smt = $db->prepare("SELECT * From `car_makes`"); $smt->execute(); $data = $smt->fetchAll(); $q = $db->prepare("SELECT `cmID`, `cMAKE`, COUNT(`ca`.`cMAKE`) AS `total` FROM `car_makes` AS `cm` INNER JOIN `cars_available` AS `ca` ON `cm`.`cmID` = `ca`.`cMAKE`"); $q->execute(); $query = $q->fetchAll(); ?> <?php foreach ($query as $info): ?> <?$count = $info["total"];?></option> <?php endforeach ?> <select name="cmMAKE" id="cmMAKE"> <?php foreach ($data as $row): ?> <option><?=$row["cmMAKE"]?> (<?=$count?>)</option> <?php endforeach ?> </select> <?php $database->closeConnection(); } catch (PDOException $e) { echo "There is some problem in connection: " . $e->getMessage(); } ?> Now I updated it, besides the car models it shows all of them as 2 available however, it should only be 2 available for one car model and the rest 0
-
Try this, came across something similar to this. However, I don't know what I have outputted below will work. - <?php error_reporting(E_ALL & ~E_NOTICE); require("configuration/connect.php"); // Start XML file, create parent node $doc = new DOMDocument('1.0', 'UTF-8'); $node = $doc->createElement("markers"); try { $database = new Connection(); $db = $database->openConnection(); ///$sql = 'SELECT * FROM markers'; // Set the appropriate content-type header and output the XML //header('Content-type: text/xml'); $stmt = $db->prepare('SELECT * FROM markers'); $stmt->setFetchMode(PDO::FETCH_ASSOC); $stmt->execute(); $result = $stmt->fetchAll(); // Iterate through the rows, adding XML nodes for each foreach ($result as $row) { $entry = $doc->createElement('markers'); $entry->setAttribute('name', $row['bNAME']); $node->appendChild($entry); } $doc->appendChild($node); echo $doc->saveXML(); $database->closeConnection(); } catch (PDOException $e) { echo "There is some problem in connection: " . $e->getMessage(); } ?>
-
Okay, seems like it would be better of with starting this myself. Would anyone give me advice or recommendations of how to start this off. I seriously want to get this done. If someone can just help me on how to start and what too look at to create a system like this. I would appericate if someone can help. Thank you, Shades.
-
Is there still a market for this? Is there potential of making money?
-
Hello, I require a developer who would be able to create a website for me at a price. Unless someone can lead me to the right directions to create it, I am a 15 year old with big dreams and ambitions. Project Name: Locator In this case, there will be three types of users: admin, object and user. Admin - Do everything. Object - Set availability to be booked. Accept, decline or refund booking. Check their timetable or helps create a timetable for object. Set prices of their services. Uploaded previous work. Verified User - Locate Object via postcode or title. View Objects profile. Book an appointment with Object. (Requires a payment). Leave a rating and review after each booking. Content - Login, Registration and Forgotten Password. -> Registration will need mobile number to be verified. Object Registration -> There will also need to be a separate registration for Object users to register. When registration complete, administration will have to verify the user. Objects users are also require to pay a monthly subscription of the service this locator has provided. Therefore, a payment will also be taken when users are registered. When payment missed, Objects will be temporarily withdrawn from the site along with the tools it is provided with until payment is received. Home Page -> A map (e.g. streets of London) where the user will be able to enter a postcode or a name of an Object and it will show pin points on the map with the relevant search (e.g. Object name or nearest to the Object's postcode). When clicking on the pinpoint information should appear of the object. (e.g. objects timetable/availability along with an option to book an appointment with the object.) The information will be basically the objects profile on the map. Booking Appointments System -> When bookings appointments only verified users will be able to book appointments. When a user has booked an appointment the object which has been booked will be given a notification to either accept or decline the booking. A payment will be then processed with either PayPal or via bank transfer or unless the user has selected cash payment (Only available with trusted users.) The booking system should also have a control panel for each objects account to accept or decline a booking or to post their availability. There should also a be a real-time live chat between the object and the user. Refund option should also be given when object has made a mistake. This is what I mainly need. If someone can help me out or give me a quote it will be great.