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
  #1  
Old 11-11-2011, 11:49 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 113,229
SilverDragonTears is on a distinguished road
Default Influence

So I thought my influence script was working but now that I've released it, it isn't functioning properly. When $lastinfluence is inserted, it inserts into ALL the adopts and not just the adopt doing the influence.

HELP!
PHP Code:
else if($act == "influence"){


if(
is_numeric($id)){

// Now we see if the adoptable actually exists...

$query "SELECT * FROM ".$prefix."owned_adoptables WHERE owner='$loggedinname' and aid='$id'";
$result runquery($query);
$num mysql_numrows($result);

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

$aid=@mysql_result($result,$i,"aid"); //The adoptable's ID
$currentlevel=@mysql_result($result,$i,"currentlevel");
$type=@mysql_result($result,$i,"type");
$name=@mysql_result($result,$i,"name");
$totalclicks=@mysql_result($result,$i,"totalclicks");
$isfrozen=@mysql_result($result,$i,"isfrozen");
$lastinfluence=@mysql_result($result,$i,"lastinfluence");

$i++;
}

if(
$aid == $id){


$time time();
$image getcurrentimage($id); // Get the image for the adopt...

if($more == ""){

$article_title "Allow an adopt to be influenced female by ".stripslashes($name);
$article_content "<center><img src='".$image."'><br>"
$lastweek time() - ((grabanysetting('breedinginterval')) * 24 60 60);

if(
$lastinfluence >= '$lastweek'){
$article_content .= "You must wait one week before influencing.<br>";
}else{
$article_content .= "Select an Adoptable<br>";
       
$result runquery("SELECT * FROM {$prefix}owned_adoptables WHERE owner ='{$loggedinname}' and currentlevel <=3 and isfrozen = 'no'");
       while(
$row mysql_fetch_array($result)){
         
$article_content .= " <img src='http://silvadopts.com/get/".$row['aid'].".gif'> {$row['aid']} {$row['name']} <a href='myadopts.php?act=influence&id=".$row['aid']."&more=confirm'>Influence</a><br>";
       
}


       
}

}
else if(
$more == "confirm"){

// Actually run the execution

runquery("UPDATE ".$prefix."owned_adoptables SET gender='f', usealternates='yes' WHERE aid='".$id."'");
runquery("UPDATE ".$prefix."owned_adoptables SET lastinfluence = '$time' WHERE aid='$id'");

$article_title $lang_influence_title_complete;
$article_content $lang_influence_complete;

$article_content $aid." was influenced successfully!";
}

__________________

Check out SilvaTales
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
Last Influence Countdown SilverDragonTears Questions and Supports 2 12-07-2011 10:13 PM


All times are GMT -5. The time now is 06:38 PM.

Currently Active Users: 3394 (0 members and 3394 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