Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Off Topic Discussions > Adoptables Sites Showcase

Notices

Reply
 
Thread Tools Display Modes
  #21  
Old 03-15-2010, 03:31 AM
Missy Master's Avatar
Missy Master Missy Master is offline
Pet-Sim.Online
 
Join Date: Jan 2010
Posts: 475
Gender: Unknown/Other
Credits: 45,017
Missy Master is an unknown quantity at this point
Default RE: Kritter Kingdom

Thanks for the good words, I appreciate that! Yes I actually got the idea for the backgrounds from Mweor, and I'dlike to eventually be able to just change those around. I've been trying very hard to focus on the site and try to get this coding worked out--but my 17 year old Pom had a stroke the night before yesterday, we just found out that's why he was ill. He might recover, but he's pretty ill still, and the timing with my birthday yesterday was not the best.

I will be messing with the image size today, getting them small for the top ten really helped--- I really want to have them large on the profile only. But I have the gist of how now, at least.

I'll take a look at those backgrounds for the site too today, as well as the theme for the SMF forum I am using --- I had set an opening date of March 31st, got enthused and set it to today, only to have my poor dog take ill, and really have to put the attention where the priority is.

Oh I totally understand about the trading system! Magnie has kindly worked out something, we are so close, and hopefully it will be workable! I intend to give full credit there of course, I'm really very grateful for all the mods, and all the extra help! I've made art in Poser for years and years, and the beauty of it is, you can buy models and work with them -- and they are yours to use on your site, which is neat!

I really want to implement an auction system too -- so all in good time :D
Reply With Quote
  #22  
Old 03-15-2010, 10:27 AM
Magnie's Avatar
Magnie Magnie is offline
Pythonic
 
Join Date: Dec 2009
Location: Polaris, the Planet
Posts: 34
Gender: Male
Credits: 4,941
Magnie
Send a message via ICQ to Magnie
Default RE: Kritter Kingdom

What's the exact error? I'm not getting an error when I try it. But you are right it isn't giving the money... ( What's the 'cash' column in the user's table again? But anyways, change all the 'money' to the one in the Database.)

Change givemoney2.php:

PHP Code:
$cashs $cash $gm;
$cashs2 $cash2 $cash;
if(
$gm !> $cash){
$query "UPDATE ".$prefix."users SET money='".$cashs."' WHERE username='".$loggedinname."'";

mysql_query($query);
$query "UPDATE ".$prefix."users SET money='".$cashs2."' WHERE username='".$user."'";

mysql_query($query);
$article_content "[Put a nice message of it's success]";

To:

PHP Code:
$cashs $cash $gm;
$cashs2 $cash2 $gm;
if(
$gm !> $cash){
$query 'UPDATE `'.$dbname.'`.`'.$prefix.'users` SET `money` = \''.$cashs.'\' WHERE `'.$prefix.'users`.`username` = '.$loggedinname.';';
mysql_query($query);

$query 'UPDATE `'.$dbname.'`.`'.$prefix.'users` SET `money` = \''.$cashs2.'\' WHERE `'.$prefix.'users`.`username` = '.$user.';';
mysql_query($query);

$article_content "[Put a nice message of it's success]";

Try that...
Reply With Quote
  #23  
Old 03-15-2010, 10:38 AM
Missy Master's Avatar
Missy Master Missy Master is offline
Pet-Sim.Online
 
Join Date: Jan 2010
Posts: 475
Gender: Unknown/Other
Credits: 45,017
Missy Master is an unknown quantity at this point
Default RE: Kritter Kingdom

For my users table the money is just called money, so that should be right!

got that error:

Parse error: syntax error, unexpected '!' in /home/content/a/n/n/annakk/html/givemoney2.php on line 123

maybe its this part?

if($gm !> $cash){

((thanks again for the help here, gonna really give you massive credit for this!! ))
Reply With Quote
  #24  
Old 03-15-2010, 10:43 AM
Magnie's Avatar
Magnie Magnie is offline
Pythonic
 
Join Date: Dec 2009
Location: Polaris, the Planet
Posts: 34
Gender: Male
Credits: 4,941
Magnie
Send a message via ICQ to Magnie
Default RE: Kritter Kingdom

You could try changing it to:

if($gm <= $cash){

But when I opened my file up and looked at line 123 the code is:

if($isloggedin == 'yes') {

But you might as well try it.
Reply With Quote
  #25  
Old 03-15-2010, 11:04 AM
Missy Master's Avatar
Missy Master Missy Master is offline
Pet-Sim.Online
 
Join Date: Jan 2010
Posts: 475
Gender: Unknown/Other
Credits: 45,017
Missy Master is an unknown quantity at this point
Default RE: Kritter Kingdom

hmmmm that didn't help....or maybe it did, lol, now I get:


Parse error: syntax error, unexpected $end in /home/content/a/n/n/annakk/html/givemoney2.php on line 180

here's my entire givemoney2.php:
Code:
<?php

// **********************************************************************
// Rusnak PHP Adoptables Script
// Copyright 2009 Brandon Rusnak
// For help and support: http://www.rusnakweb.com/forum/
//
// Redistribution prohibited without written permission
// **********************************************************************

// Wake the sleeping giant

// **********************************************************************
// Basic Configuration Info
// **********************************************************************

include("inc/functions.php");
include("inc/config.php");
include("lang/lang.php");

$themeurl = grabanysetting("themeurl");

// **********************************************************************
// Define our top links by calling getlinks()
// **********************************************************************

$links = getlinks();

// **********************************************************************
// Define our ads by calling getads()
// **********************************************************************

$ads = getads("account");

// **********************************************************************
// Grab any dynamic article content from the content table
// **********************************************************************


$article_title = $pagecontent[title];
$article_content = $pagecontent[content];
$article_content = nl2br($article_content);

// **********************************************************************
// Grab any settings that we will need for the current page from the DB
// **********************************************************************

$browsertitle = grabanysetting("browsertitle");
$sitename = grabanysetting("sitename");
$slogan = grabanysetting("slogan");

// **********************************************************************
// Check and see if the user is logged in to the site
// **********************************************************************

$loginstatus = logincheck();
$isloggedin = $loginstatus[loginstatus];
$loggedinname = $loginstatus[username];

// **********************************************************************
// End Prepwork - Output the page to the user
// **********************************************************************



if($isloggedin == 'yes') {
$user = $_GET["user"];

$user = preg_replace("/[^a-zA-Z0-9\\040.]/", "", $user);

$user = secure($user);

$gm = $_GET["gm"];

$gm = secure($gm);

$query = "SELECT * FROM ".$prefix."users WHERE username = '$loggedinname'";

$result = @mysql_query($query);



//Loop out code

$i=0;

while ($i < 1) {



$money=@mysql_result($result,$i,"money");



$i++;

}

$query = "SELECT * FROM ".$prefix."users WHERE username = '$user'";

$result = @mysql_query($query);



//Loop out code

$i=0;

while ($i < 1) {



$money2=@mysql_result($result,$i,"money");



$i++;

}

$cashs = $cash - $gm;
$cashs2 = $cash2 + $gm;
if($gm !> $cash){
$query = 'UPDATE `'.$dbname.'`.`'.$prefix.'users` SET `money` = \''.$cashs.'\' WHERE `'.$prefix.'users`.`username` = '.$loggedinname.';';
mysql_query($query);

$query = 'UPDATE `'.$dbname.'`.`'.$prefix.'users` SET `money` = \''.$cashs2.'\' WHERE `'.$prefix.'users`.`username` = '.$user.';';
mysql_query($query);

$article_content = "[Put a nice message of it's success]";
} 







// **********************************************************************
// Begin Template Definition
// **********************************************************************

//Define our current theme
$file = $themeurl;

// Do the template changes and echo the ready template
$template = file_get_contents($file);

$template = replace(':ARTICLETITLE:',$article_title,$template);
$template = replace(':ARTICLECONTENT:',$article_content,$template);
$template = replace(':ARTICLEDATE:',$article_date,$template);

$template = replace(':BROWSERTITLE:',$browsertitle,$template);
$template = replace(':SITENAME:',$sitename,$template);

//Define our links
$template = replace(':LINKSBAR:',$links,$template);

//Get the content for the side bar...

$sidebar = getsidebar();
$template = replace(':SIDEFEED:',$sidebar,$template);

//Get the ad content...
$template = replace(':ADS:',$ads,$template);

//Get the slogan info
$template = replace(':SLOGAN:',$slogan,$template);


echo $template;

// **********************************************************************
// End Template Definition
// **********************************************************************



?>
Reply With Quote
  #26  
Old 03-15-2010, 11:18 AM
Magnie's Avatar
Magnie Magnie is offline
Pythonic
 
Join Date: Dec 2009
Location: Polaris, the Planet
Posts: 34
Gender: Male
Credits: 4,941
Magnie
Send a message via ICQ to Magnie
Default RE: Kritter Kingdom

Change:

$article_content = "[Put a nice message of it's success]";

To:

$article_content = "[Put a nice message of it's success]";
}

There should be two '}' next to each other instead of one.
Reply With Quote
  #27  
Old 03-15-2010, 11:23 AM
Missy Master's Avatar
Missy Master Missy Master is offline
Pet-Sim.Online
 
Join Date: Jan 2010
Posts: 475
Gender: Unknown/Other
Credits: 45,017
Missy Master is an unknown quantity at this point
Default RE: Kritter Kingdom

I did that, still getting:

Parse error: syntax error, unexpected '!' in /home/content/a/n/n/annakk/html/givemoney2.php on line 123
Reply With Quote
  #28  
Old 03-15-2010, 11:31 AM
Magnie's Avatar
Magnie Magnie is offline
Pythonic
 
Join Date: Dec 2009
Location: Polaris, the Planet
Posts: 34
Gender: Male
Credits: 4,941
Magnie
Send a message via ICQ to Magnie
Default RE: Kritter Kingdom

Change:

PHP Code:
if($isloggedin == 'yes') {
$user $_GET["user"];

$user preg_replace("/[^a-zA-Z0-9\\040.]/"""$user);

$user secure($user);

$gm $_GET["gm"];

$gm secure($gm);

$query "SELECT * FROM ".$prefix."users WHERE username = '$loggedinname'";

$result = @mysql_query($query);



//Loop out code

$i=0;

while (
$i 1) {



$money=@mysql_result($result,$i,"money");



$i++;

}

$query "SELECT * FROM ".$prefix."users WHERE username = '$user'";

$result = @mysql_query($query);



//Loop out code

$i=0;

while (
$i 1) {



$money2=@mysql_result($result,$i,"money");



$i++;

}

$cashs $cash $gm;
$cashs2 $cash2 $gm;
if(
$gm !> $cash){
$query 'UPDATE `'.$dbname.'`.`'.$prefix.'users` SET `money` = \''.$cashs.'\' WHERE `'.$prefix.'users`.`username` = '.$loggedinname.';';
mysql_query($query);

$query 'UPDATE `'.$dbname.'`.`'.$prefix.'users` SET `money` = \''.$cashs2.'\' WHERE `'.$prefix.'users`.`username` = '.$user.';';
mysql_query($query);

$article_content "[Put a nice message of it's success]";

To:

PHP Code:
if($isloggedin == 'yes') {
$user $_GET["user"];

$user preg_replace("/[^a-zA-Z0-9\\040.]/"""$user);

$user secure($user);

$gm $_GET["gm"];

$gm secure($gm);

$query "SELECT * FROM ".$prefix."users WHERE username = '$loggedinname'";

$result = @mysql_query($query);



//Loop out code

$i=0;

while (
$i 1) {



$money=@mysql_result($result,$i,"money");



$i++;

}

$query "SELECT * FROM ".$prefix."users WHERE username = '$user'";

$result = @mysql_query($query);



//Loop out code

$i=0;

while (
$i 1) {



$money2=@mysql_result($result,$i,"money");



$i++;

}

$cashs $cash $gm;
$cashs2 $cash2 $gm;
if(
$gm <= $cash){
$query 'UPDATE `'.$dbname.'`.`'.$prefix.'users` SET `money` = \''.$cashs.'\' WHERE `'.$prefix.'users`.`username` = '.$loggedinname.';';
mysql_query($query);

$query 'UPDATE `'.$dbname.'`.`'.$prefix.'users` SET `money` = \''.$cashs2.'\' WHERE `'.$prefix.'users`.`username` = '.$user.';';
mysql_query($query);

$article_content "[Put a nice message of it's success]";
}

Reply With Quote
  #29  
Old 03-15-2010, 11:31 AM
Arianna's Avatar
Arianna Arianna is offline
Dev Staff
 
Join Date: Sep 2009
Posts: 334
Gender: Female
Credits: 21,267
Arianna will become famous soon enough
Default RE: Kritter Kingdom

Check the line over 123. ;3 That might help. xD Sometimes things like that are annoying. :P
Reply With Quote
  #30  
Old 03-15-2010, 11:34 AM
Missy Master's Avatar
Missy Master Missy Master is offline
Pet-Sim.Online
 
Join Date: Jan 2010
Posts: 475
Gender: Unknown/Other
Credits: 45,017
Missy Master is an unknown quantity at this point
Default RE: Kritter Kingdom

okay I take it back, had to refresh several times, now no error!

Still isnt taking the money out though ... oh Ill try that, thanks!! I'm not sure what to edit there -- well no more syntax error, and it IS showing the "give a nice message" thing!

Just no transfer of the money ...
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 12:44 PM.

Currently Active Users: 9865 (0 members and 9865 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636