Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #8  
Old 02-02-2011, 05:34 PM
PTGigi's Avatar
PTGigi PTGigi is offline
Crazily Friendly~HoF
 
Join Date: Jul 2009
Location: Somewhere >.>
Posts: 370
Gender: Female
Credits: 35,885
PTGigi
Default

Alright let's hope I don't fail and forget something XD I didn't know what you were using for cash so I just used $cash2 for everything X3 Change as you like

Admin.php should read like this for the cash:
PHP Code:
  <p><strong>Adoptables Pricing Settings:</strong></p>
  <
p>This section allows you to set if you want to enable pricing for this adoptablePlease either disable this option or enter a positive number here.. </p>
  <
p><strong>
   <
input name='pricestatus' type='checkbox' id='pricestatus' value='enabled'>
  </
strong>Set a price for this adoptable</p>
  <
p>You can now decide how much money to charge for this particular adoptable:</p>
  <
input name='pricevalue' type='text' id='pricevalue' size='10' maxlength='10'>Cash 1<br>
  <
input name='pricevalue2' type='text' id='pricevalue2' size='10' maxlength='10'>Cash 2<br>
<
p
The cash check in doadopt should read:
PHP Code:
// Now we determine if the user has enough cash left to purchase an adoptable, if its price status is enabled.

$pris getpricestatus($id); 
$priv getpricevalue($id);
$priv2 getpricevalue2($id);
$mycash getcash($loggedinname);
$mycash2 getcash2($loggedinname);

$cashleft $mycash $priv;
$casj2left $mycash2 $priv;

if(
$cashleft or $cash2left 0){
  
$article_title $name." cannot be adopted";
  
$article_content "It appears that you do not have enough money to acquire this adoptable, please come back later.";

And just a couple lines below that should read:
PHP Code:
//Next, the user's lost an amount of money equal to the adoptable's price value.
$query "UPDATE ".$prefix."users SET dollar='".$cashleft."' WHERE username='".$loggedinname."'";
mysql_query($query);
$query "UPDATE ".$prefix."users SET cash2='".$cash2left."' WHERE username='".$loggedinname."'";
mysql_query($query); 
And in functions you need to add:
PHP Code:
function getcash2($loggedinname){

include(
"config.php");

//First we see if we are logged in or not

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

$query "SELECT * FROM ".$prefix."users WHERE username = '$loggedinname'";
$result = @mysql_query($query);
$num = @mysql_numrows($result);

//Loop out code
$i=0;
while (
$i 1) {

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

$i++;
}

return 
$cash2;


And

PHP Code:
function getpricevalue2($aid){

include(
"config.php");

//This function retrieves an adoptable's price from sql database.

$pricestatus "no";

$query "SELECT * FROM ".$prefix."adoptables WHERE id='$aid'";
$result mysql_query($query);
$num mysql_numrows($result);

//Loop out code
$i=0;
while (
$i 1) {

$pricestatus=@mysql_result($result,$i,"pricestatus");
$pricevalue2=@mysql_result($result,$i,"pricevalue2");
$i++;
}

if(
$pricestatus == "enabled"){
$priceval2 $pricevalue2;
}
else{
$priceval2 0;
}

return 
$priceval2;


And I'm going to have to double check those other files in a bit, I have to eat dinner soon. D:

EDIT: Durr forgot nadopt XD Give me a minute and I'll have that up XD

EDIT2:

nadopt.php: Find the 'pricestats = $_Post" part and replace with this:
PHP Code:
$pricestatus $_POST["pricestatus"];
$pricestatus secure($pricestatus);

$pricevalue $_POST["pricevalue"];
$pricevalue secure($pricevalue);

$pricevalue2 $_POST["pricevalue2"];
$pricevalue2 secure($pricevalue2); 
__________________


"I see now that the circumstances of one's birth are irrelevant; it is what you do with the gift of life that determines who you are."~Mewtwo
My Adoptables|Nuzlocke Webcomic

Last edited by PTGigi; 02-02-2011 at 05:36 PM.
Reply With Quote
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
New Currency Question ilrak Questions and Supports 1 03-09-2015 11:47 AM
Mysidia Currency question. Phoeniix Questions and Supports 6 02-02-2015 02:38 PM
Second Currency and Currency icon Rovick Suggestions and Feature Requests 14 11-11-2014 05:29 PM
AEF Multi AllMw2 Other Chat 5 06-02-2010 12:30 PM
Multi Account jcga Questions and Supports 3 11-12-2009 12:39 PM


All times are GMT -5. The time now is 05:52 AM.

Currently Active Users: 5785 (0 members and 5785 guests)
Threads: 4,081, Posts: 32,032, 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 - 2025, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636