Jump to content
MakeWebGames

Recommended Posts

Posted

I just reinstalled to find out that its the game theirs something wrong with not the instalation!

And no their is no code missing, I want money back or some one to come and look at it. I click add city and the page flashes as if i pressed F5 refresh!

Posted

Re: City Error, Can not add cities on mccV2!!!! HELP

And I am also looking for a freelancer, a profesional coder who can secure and edit my site later on. I plan on spending 5 000 $ .

Posted

Re: City Error, Can not add cities on mccV2!!!! HELP

if you are planning to spend 5000 then i am sure their are alot of player that would secure you site and fix every bug for you and even add new modifications

Posted

Re: City Error, Can not add cities on mccV2!!!! HELP

<?php

include "sglobals.php";

if($ir['user_level'] > 2)

{

die("403");

}

//This contains city stuffs

switch($_GET['action'])

{

case "addcity": addcity(); break;

case "editcity": editcity(); break;

case "delcity": delcity(); break;

default: print "Error: This script requires an action."; break;

}

function addcity()

{

global $db, $ir, $c, $h, $userid;

$minlevel=abs((int) $_POST['minlevel']);

$name=$_POST['name'];

$desc=$_POST['desc'];

if($minlevel and $desc and $name)

{

$q=$db->query("SELECT * FROM cities WHERE cityname='{$name}'");

if($db->num_rows($q))

{

print "Sorry, you cannot have two cities with the same name.";

$h->endpage();

exit;

}

$db->query("INSERT INTO cities VALUES(NULL, '$name', '$desc', '$minlevel')");

print "City {$name} added to the game.";

stafflog_add("Created City $name");

}

else

{

print "<h3>Add City</h3><hr />

<form action='staff_cities.php?action=addcity' method='post'>

Name: <input type='text' name='name' />

Description: <input type='text' name='desc' />

Minimum Level: <input type='text' name=minlevel' />

 

<input type='submit' value='Add City' /></form>";

}

}

function editcity()

{

global $db, $ir, $c, $h, $userid;

switch($_POST['step'])

{

case "2":

$minlevel=abs((int) $_POST['minlevel']);

$name=$_POST['name'];

$desc=$_POST['desc'];

$q=$db->query("SELECT * FROM cities WHERE cityname='{$name}' AND cityid!={$_POST['id']}");

if($db->num_rows($q))

{

print "Sorry, you cannot have two cities with the same name.";

$h->endpage();

exit;

}

$name=$_POST['name'];

$q=$db->query("SELECT * FROM cities WHERE cityid={$_POST['id']}");

$old=$db->fetch_row($q);

$db->query("UPDATE cities SET cityminlevel=$minlevel, citydesc='$desc', cityname='$name' WHERE cityid={$_POST['id']}");

print "City $name was edited successfully.";

stafflog_add("Edited city $name");

break;

case "1":

$q=$db->query("SELECT * FROM cities WHERE cityid={$_POST['city']}");

$old=$db->fetch_row($q);

print "<h3>Editing a City</h3><hr />

<form action='staff_cities.php?action=editcity' method='post'>

<input type='hidden' name='step' value='2' />

<input type='hidden' name='id' value='{$_POST['city']}' />

Name: <input type='text' name='name' value='{$old['cityname']}' />

Description: <input type='text' name='desc' value='{$old['citydesc']}' />

Minimum Level: <input type='text' name='minlevel' value='{$old['cityminlevel']}' />

<input type='submit' value='Edit City' /></form>";

break;

default:

print "<h3>Editing a City</h3><hr />

<form action='staff_cities.php?action=editcity' method='post'>

<input type='hidden' name='step' value='1' />

City: ".location_dropdown($c, "city")."

<input type='submit' value='Edit City' /></form>";

break;

}

}

function delcity()

{

global $db,$ir,$c,$h,$userid;

if($_POST['city'])

{

$q=$db->query("SELECT * FROM cities WHERE cityid={$_POST['city']}");

$old=$db->fetch_row($q);

if($old['cityid']==1)

{

die("This city cannot be deleted.");

}

$db->query("UPDATE users SET location=1 WHERE location={$old['cityid']}");

$db->query("UPDATE shops SET shopLOCATION=1 WHERE shopLOCATION={$old['cityid']}");

$db->query("DELETE FROM cities WHERE cityid={$old['cityid']}");

print "City {$old['cityname']} deleted.";

stafflog_add("Deleted city {$old['cityname']}");

}

else

{

print "<h3>Delete City</h3><hr />

Deleting a city is permanent - be sure. Any users and shops that are currently in the city you delete will be moved to the default city (ID 1).<form action='staff_cities.php?action=delcity' method='post'>

City: ".location_dropdown($c, "city")."

<input type='submit' value='Delete City' /></form>";

}

}

function report_clear()

{

global $db,$ir,$c,$h,$userid;

if($ir['user_level'] > 3)

{

die("403");

}

$_GET['ID'] = abs((int) $_GET['ID']);

stafflog_add("Cleared player report ID {$_GET['ID']}");

$db->query("DELETE FROM preports WHERE prID={$_GET['ID']}");

print "Report cleared and deleted!

> Back";

}

$h->endpage();

?>

Posted

Re: City Error, Can not add cities on mccV2!!!! HELP

WOW your spending $5000 on securing and editing some people have secured it for free ;) but 5000 you could get someone to make you a new game without mccodes and have it the way you like like it etc

Posted

Re: City Error, Can not add cities on mccV2!!!! HELP

Well I am hoping that I will get the game the way I want it lol..

I need lots done, I want the game turned in to at Networth game and not just simple stats.. :)

Posted

Re: City Error, Can not add cities on mccV2!!!! HELP

Never mind guys I went thro the script my self and found the error at last.... it was missing this : '

thats why it was hard to find!!!!!! xD

Posted

Re: City Error, Can not add cities on mccV2!!!! HELP

 

Never mind guys I went thro the script my self and found the error at last.... it was missing this : '

thats why it was hard to find!!!!!! xD

Well crazyt did tell you that was what was missing...

Posted

Re: City Error, Can not add cities on mccV2!!!! HELP

no because i never saw the sign lmaol.. i was looking for a and an if that was missing LOL

til i saw that ' was missing on the script ^^ any way ty guys

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...