当前位置: 首页>>代码示例>>PHP>>正文


PHP playerlog函数代码示例

本文整理汇总了PHP中playerlog函数的典型用法代码示例。如果您正苦于以下问题:PHP playerlog函数的具体用法?PHP playerlog怎么用?PHP playerlog使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了playerlog函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: xenoberegen

function xenoberegen()
{
    global $playerinfo, $xen_unemployment, $xenobeisdead, $db;
    // Xenobe Unempoyment Check
    $playerinfo['credits'] = $playerinfo['credits'] + $xen_unemployment;
    $maxenergy = NUM_ENERGY($playerinfo['power']);
    // Regenerate energy
    if ($playerinfo['ship_energy'] <= $maxenergy - 50) {
        $playerinfo['ship_energy'] = $playerinfo['ship_energy'] + round(($maxenergy - $playerinfo['ship_energy']) / 2);
        // Regen half of remaining energy
        $gene = "regenerated Energy to {$playerinfo['ship_energy']} units,";
    }
    $maxarmor = NUM_ARMOR($playerinfo['armor']);
    // Regenerate armor
    if ($playerinfo['armor_pts'] <= $maxarmor - 50) {
        $playerinfo['armor_pts'] = $playerinfo['armor_pts'] + round(($maxarmor - $playerinfo['armor_pts']) / 2);
        // Regen half of remaining armor
        $gena = "regenerated Armor to {$playerinfo['armor_pts']} points,";
    }
    // Buy fighters & torpedos at 6 credits per fighter
    $available_fighters = NUM_FIGHTERS($playerinfo['computer']) - $playerinfo['ship_fighters'];
    if ($playerinfo['credits'] > 5 && $available_fighters > 0) {
        if (round($playerinfo['credits'] / 6) > $available_fighters) {
            $purchase = $available_fighters * 6;
            $playerinfo['credits'] = $playerinfo['credits'] - $purchase;
            $playerinfo['ship_fighters'] = $playerinfo['ship_fighters'] + $available_fighters;
            $genf = "purchased {$available_fighters} fighters for {$purchase} credits,";
        }
        if (round($playerinfo['credits'] / 6) <= $available_fighters) {
            $purchase = round($playerinfo['credits'] / 6);
            $playerinfo['ship_fighters'] = $playerinfo['ship_fighters'] + $purchase;
            $genf = "purchased {$purchase} fighters for {$playerinfo['credits']} credits,";
            $playerinfo['credits'] = 0;
        }
    }
    // Xenobe pay 3 credits per torpedo
    $available_torpedoes = NUM_TORPEDOES($playerinfo['torp_launchers']) - $playerinfo['torps'];
    if ($playerinfo['credits'] > 2 && $available_torpedoes > 0) {
        if (round($playerinfo['credits'] / 3) > $available_torpedoes) {
            $purchase = $available_torpedoes * 3;
            $playerinfo['credits'] = $playerinfo['credits'] - $purchase;
            $playerinfo['torps'] = $playerinfo['torps'] + $available_torpedoes;
            $gent = "purchased {$available_torpedoes} torpedoes for {$purchase} credits,";
        }
        if (round($playerinfo['credits'] / 3) <= $available_torpedoes) {
            $purchase = round($playerinfo['credits'] / 3);
            $playerinfo['torps'] = $playerinfo['torps'] + $purchase;
            $gent = "purchased {$purchase} torpedoes for {$playerinfo['credits']} credits,";
            $playerinfo['credits'] = 0;
        }
    }
    // Update Xenobe record
    $resg = $db->Execute("UPDATE {$db->prefix}ships SET ship_energy=?, armor_pts=?, ship_fighters=?, torps=?, credits=? WHERE ship_id=?", array($playerinfo['ship_energy'], $playerinfo['armor_pts'], $playerinfo['ship_fighters'], $playerinfo['torps'], $playerinfo['credits'], $playerinfo['ship_id']));
    db_op_result($db, $resg, __LINE__, __FILE__);
    if (!$gene == '' || !$gena == '' || !$genf == '' || !$gent == '') {
        playerlog($db, $playerinfo[ship_id], LOG_RAW, "Xenobe {$gene} {$gena} {$genf} {$gent} and has been updated.");
    }
}
开发者ID:kagetenshi,项目名称:xenoberage,代码行数:58,代码来源:xenobe_regen.php

示例2: message_defence_owner

function message_defence_owner($db, $sector, $message)
{
    $result3 = $db->Execute("SELECT * FROM {$db->prefix}sector_defence WHERE sector_id=?", array($sector));
    db_op_result($db, $result3, __LINE__, __FILE__);
    if ($result3 instanceof ADORecordSet) {
        while (!$result3->EOF) {
            playerlog($db, $result3->fields['ship_id'], LOG_RAW, $message);
            $result3->MoveNext();
        }
    }
}
开发者ID:kagetenshi,项目名称:xenoberage,代码行数:11,代码来源:message_defence_owner.php

示例3: distribute_toll

function distribute_toll($db, $sector, $toll, $total_fighters)
{
    $result3 = $db->Execute("SELECT * FROM {$db->prefix}sector_defence WHERE sector_id=? AND defence_type ='F'", array($sector));
    db_op_result($db, $result3, __LINE__, __FILE__);
    // Put the defence information into the array "defenceinfo"
    if ($result3 > 0) {
        while (!$result3->EOF) {
            $row = $result3->fields;
            $toll_amount = ROUND($row['quantity'] / $total_fighters * $toll);
            $resa = $db->Execute("UPDATE {$db->prefix}ships SET credits=credits + ? WHERE ship_id = ?", array($toll_amount, $row['ship_id']));
            db_op_result($db, $resa, __LINE__, __FILE__);
            playerlog($db, $row['ship_id'], LOG_TOLL_RECV, "{$toll_amount}|{$sector}");
            $result3->MoveNext();
        }
    }
}
开发者ID:kagetenshi,项目名称:xenoberage,代码行数:16,代码来源:distribute_toll.php

示例4: cancel_bounty

function cancel_bounty($db, $bounty_on)
{
    $res = $db->Execute("SELECT * FROM {$db->prefix}bounty,{$db->prefix}ships WHERE bounty_on = ? AND bounty_on = ship_id", array($bounty_on));
    db_op_result($db, $res, __LINE__, __FILE__);
    if ($res) {
        while (!$res->EOF) {
            $bountydetails = $res->fields;
            if ($bountydetails['placed_by'] != 0) {
                $update = $db->Execute("UPDATE {$db->prefix}ships SET credits = credits + ? WHERE ship_id = ?", array($bountydetails['amount'], $bountydetails['placed_by']));
                db_op_result($db, $update, __LINE__, __FILE__);
                playerlog($db, $bountydetails['placed_by'], LOG_BOUNTY_CANCELLED, "{$bountydetails['amount']}|{$bountydetails['character_name']}");
            }
            $delete = $db->Execute("DELETE FROM {$db->prefix}bounty WHERE bounty_id = ?", array($bountydetails['bounty_id']));
            db_op_result($db, $delete, __LINE__, __FILE__);
            $res->MoveNext();
        }
    }
}
开发者ID:kagetenshi,项目名称:xenoberage,代码行数:18,代码来源:cancel_bounty.php

示例5: defence_vs_defence

function defence_vs_defence($db, $ship_id)
{
    global $l;
    $result1 = $db->Execute("SELECT * FROM {$db->prefix}sector_defence WHERE ship_id = ?;", array($ship_id));
    db_op_result($db, $result1, __LINE__, __FILE__);
    if ($result1 instanceof ADORecordSet) {
        while (!$result1->EOF) {
            $row = $result1->fields;
            $deftype = $row['defence_type'] == 'F' ? 'Fighters' : 'Mines';
            $qty = $row['quantity'];
            $result2 = $db->Execute("SELECT * FROM {$db->prefix}sector_defence WHERE sector_id = ? AND ship_id <> ? ORDER BY quantity DESC", array($row['sector_id'], $ship_id));
            db_op_result($db, $result2, __LINE__, __FILE__);
            if ($result2 instanceof ADORecordSet) {
                while (!$result2->EOF && $qty > 0) {
                    $cur = $result2->fields;
                    $targetdeftype = $cur['defence_type'] == 'F' ? $l->get('l_fighters') : $l->get('l_mines');
                    if ($qty > $cur['quantity']) {
                        $resa = $db->Execute("DELETE FROM {$db->prefix}sector_defence WHERE defence_id = ?", array($cur['defence_id']));
                        db_op_result($db, $resa, __LINE__, __FILE__);
                        $qty -= $cur['quantity'];
                        $resb = $db->Execute("UPDATE {$db->prefix}sector_defence SET quantity = ? WHERE defence_id = ?", array($qty, $row['defence_id']));
                        db_op_result($db, $resb, __LINE__, __FILE__);
                        playerlog($db, $cur['ship_id'], LOG_DEFS_DESTROYED, $cur['quantity'] . "|" . $targetdeftype . "|" . $row['sector_id']);
                        playerlog($db, $row['ship_id'], LOG_DEFS_DESTROYED, $cur['quantity'] . "|" . $deftype . "|" . $row['sector_id']);
                    } else {
                        $resc = $db->Execute("DELETE FROM {$db->prefix}sector_defence WHERE defence_id = ?", array($row['defence_id']));
                        db_op_result($db, $resc, __LINE__, __FILE__);
                        $resd = $db->Execute("UPDATE {$db->prefix}sector_defence SET quantity=quantity - ? WHERE defence_id = ?", array($qty, $cur['defence_id']));
                        db_op_result($db, $resd, __LINE__, __FILE__);
                        playerlog($db, $cur['ship_id'], LOG_DEFS_DESTROYED, $qty . "|" . $targetdeftype . "|" . $row['sector_id']);
                        playerlog($db, $row['ship_id'], LOG_DEFS_DESTROYED, $qty . "|" . $deftype . "|" . $row['sector_id']);
                        $qty = 0;
                    }
                    $result2->MoveNext();
                }
            }
            $result1->MoveNext();
        }
        $rese = $db->Execute("DELETE FROM {$db->prefix}sector_defence WHERE quantity <= 0");
        db_op_result($db, $rese, __LINE__, __FILE__);
    }
}
开发者ID:kagetenshi,项目名称:xenoberage,代码行数:42,代码来源:defence_vs_defence.php

示例6: kick_off_planet

function kick_off_planet($db, $ship_id, $whichteam)
{
    $result1 = $db->Execute("SELECT * FROM {$db->prefix}planets WHERE owner = ?", array($ship_id));
    db_op_result($db, $result1, __LINE__, __FILE__);
    if ($result1 instanceof ADORecordSet) {
        while (!$result1->EOF) {
            $row = $result1->fields;
            $result2 = $db->Execute("SELECT * FROM {$db->prefix}ships WHERE on_planet = 'Y' AND planet_id = ? AND ship_id <> ?", array($row['planet_id'], $ship_id));
            db_op_result($db, $result2, __LINE__, __FILE__);
            if ($result2 instanceof ADORecordSet) {
                while (!$result2->EOF) {
                    $cur = $result2->fields;
                    $resa = $db->Execute("UPDATE {$db->prefix}ships SET on_planet = 'N',planet_id = '0' WHERE ship_id=?", array($cur['ship_id']));
                    db_op_result($db, $resa, __LINE__, __FILE__);
                    playerlog($db, $cur['ship_id'], LOG_PLANET_EJECT, $cur['sector'] . "|" . $row['character_name']);
                    $result2->MoveNext();
                }
            }
            $result1->MoveNext();
        }
    }
}
开发者ID:kagetenshi,项目名称:xenoberage,代码行数:22,代码来源:kick_off_planet.php

示例7: addslashes

						$logentry = $logentry."The booming voice speaks again: 'Excellent! We see that you have enough credits to repay the loan. Now why did you make us come all this way?'\n";
						$newsentry = $newsentry.". Thankfully, $playerinfo[character_name] was able to pay them off - phew!";
					}
				}
				//$newsentry = $newsentry.".";				
			} else {
				$logentry = $logentry." The huge ship then vanishes!";
			}
		} else {
			$logentry = "The IGB automatically paid off your loan with your IGB balance.";
		}
		//echo "<hr>LOG ENTRY = $logentry<br>News Entry = $newsentry<br><hr>";
		if ($logentry != "") {
			//echo "Entering log for $playerinfo[player_id] name $playerinfo[character_name]<br>";
			$logentry = addslashes($logentry);
			playerlog($playerinfo[player_id],LOG_RAW,$logentry);
		}
		if ($newsentry != "") {
			$headline = addslashes("IGB takes action on deadbeat ".$playerinfo[character_name]);
			$player_id = $playerinfo[player_id];
			$newstext=addslashes($newsentry);
			$news = $db->Execute("INSERT INTO $dbtables[news] (headline, newstext, user_id, date, news_type) VALUES ('$headline','$newstext','$player_id',NOW(), 'IGB')");
		}
		//echo "Loan is now ".NUMBER($account[loan])."<br>";					
		$account[balance] = -$account[loan]; // Put back the difference
		$account[loan] = 0;
		if ($account[balance]<0) {
			$account[balance] = 0;
		}
		//echo "Balance is now ".NUMBER($account[balance])."<br>";
		//echo "Setting bank account. Balance =".NUMBER($account[balance])."  Loan=".NUMBER($account[loan])."....";
开发者ID:antt1995,项目名称:starkicktraders,代码行数:31,代码来源:sched_IGB.php

示例8: include

<?


include("config.php");
include("languages/$lang");
$title = "Logout";

setcookie("username","",0);
setcookie("password","",0);

include("header.php");

connectdb();

$result = $db->Execute("SELECT * FROM $dbtables[players] WHERE email='$username'");
$playerinfo = $result->fields;

$current_score = gen_score($playerinfo[player_id]);
playerlog($playerinfo[player_id], LOG_LOGOUT, $ip);

bigtitle();
echo "$l_logout_score ".NUMBER($current_score).".<BR>";
$l_logout_text=str_replace("[name]",$username,$l_logout_text);
echo $l_logout_text;

include("footer.php");

?>
开发者ID:antt1995,项目名称:starkicktraders,代码行数:28,代码来源:logout.php

示例9: str_replace

			  case "sectorwmd":
				 {
				 	if ($shipinfo[dev_sectorwmd] == 'Y' && $shipinfo[dev_genesis] > 0) {
						$db->Execute("UPDATE $dbtables[players] SET cleared_defences = ' ' WHERE player_id = $playerinfo[player_id]");
						$ok = 1;
						$db->Execute("UPDATE $dbtables[ships] SET dev_genesis=dev_genesis-1 WHERE player_id = $playerinfo[player_id] AND ship_id = $playerinfo[currentship]");
						// Destroy fighters
						$fighterslost = $total_sector_fighters;
						$l_sf_sendlog = str_replace("[player]", $playerinfo[character_name], $l_sf_sendlog);
						$l_sf_sendlog = str_replace("[lost]", NUMBER($fighterslost), $l_sf_sendlog);
						$l_sf_sendlog = str_replace("[sector]", $sector, $l_sf_sendlog);
						echo "<h1>Sector WMD Attack</h1>";
						echo "You obliterate ".NUMBER($fighterslost)." sector defense fighters!<br>";
						destroy_fighters($sector,$fighterslost);
						message_defence_owner($sector,$l_sf_sendlog);
						playerlog($playerinfo[player_id], LOG_DEFS_DESTROYED_F, NUMBER($fighterslost)."|$sector");
					} else {
						$ok = 0;
					}
				}
				break;
              default:
                 $interface_string = $calledfrom . '?sector='.$sector.'&destination='.$destination.'&engage='.$engage;
                 $db->Execute("UPDATE $dbtables[players] SET cleared_defences = '$interface_string' WHERE player_id = $playerinfo[player_id]");
                 $fighterstoll = $total_sector_fighters * $fighter_price * 0.6;
                 bigtitle();
				 $ok=0;
				 echo "<!-- DEBUG2: OK=$ok-->";
                 echo "<FORM ACTION=$calledfrom METHOD=POST>";
                 $l_chf_therearetotalfightersindest = str_replace("[chf_total_sector_fighters]", NUMBER($total_sector_fighters), $l_chf_therearetotalfightersindest);
                 echo "$l_chf_therearetotalfightersindest<br>";
开发者ID:antt1995,项目名称:starkicktraders,代码行数:31,代码来源:check_fighters2.php

示例10: str_replace

               echo "$l_chm_youlostallyourshields<BR>";
               $mines_left = $mines_left - $playershields;
               if($shipinfo[armour_pts] >= $mines_left)
               {
                  $l_chm_yourarmorhitforminesdmg = str_replace("[chm_mines_left]", $mines_left, $l_chm_yourarmorhitforminesdmg);
                  echo "$l_chm_yourarmorhitforminesdmg<BR>";
                  $result2 = $db->Execute("UPDATE $dbtables[ships] set armour_pts=armour_pts-$mines_left,ship_energy=0,dev_minedeflector=0 where player_id=$playerinfo[player_id] AND ship_id=$playerinfo[currentship]");
                  if($shipinfo[armour_pts] == $mines_left)
                     echo "$l_chm_yourhullisbreached<BR>";
               }
               else
               {
                  // BOOM
                  $pod = $shipinfo[dev_escapepod];

                  playerlog($playerinfo[player_id], LOG_SHIP_DESTROYED_MINES, "$sector|$pod");
                  $l_chm_hewasdestroyedbyyourmines = str_replace("[chm_playerinfo_character_name]", $playerinfo[character_name], $l_chm_hewasdestroyedbyyourmines);
                  $l_chm_hewasdestroyedbyyourmines = str_replace("[chm_sector]", $sector, $l_chm_hewasdestroyedbyyourmines);
                  
                  $killer_id = message_defence_owner($sector,"$l_chm_hewasdestroyedbyyourmines");

                  echo "$l_chm_yourshiphasbeendestroyed<BR><BR>";

                  // Live...

                  if($shipinfo[dev_escapepod] == "Y")

                  {
                     $rating=round($playerinfo[rating]/2);
                     echo "$l_chm_luckescapepod<BR><BR>";
                     $db->Execute("UPDATE $dbtables[players] SET on_planet='N',rating='$rating',cleared_defences=' ' WHERE player_id=$playerinfo[player_id] ");
开发者ID:antt1995,项目名称:starkicktraders,代码行数:31,代码来源:check_mines.php

示例11: mt_rand

                echo "<td>{$sc_dev_emerwarp}</td></tr>";
            } else {
                echo "<td>???</td></tr>";
            }
            echo "<tr><td>{$l_escape_pod}:</td>";
            $roll = mt_rand(1, 100);
            if ($roll < $success) {
                echo "<td>{$targetinfo['dev_escapepod']}</td></tr>";
            } else {
                echo "<td>???</td></tr>";
            }
            echo "<tr><td>{$l_fuel_scoop}:</td>";
            $roll = mt_rand(1, 100);
            if ($roll < $success) {
                echo "<td>{$targetinfo['dev_fuelscoop']}</td></tr>";
            } else {
                echo "<td>???</td></tr>";
            }
            echo "</table><br>";
            playerlog($db, $targetinfo['ship_id'], LOG_SHIP_SCAN, "{$playerinfo['character_name']}");
        }
        $resx = $db->Execute("UPDATE {$db->prefix}ships SET turns=turns-1,turns_used=turns_used+1 WHERE ship_id=?", array($playerinfo['ship_id']));
        db_op_result($db, $resx, __LINE__, __FILE__, $db_logging);
    }
}
echo "<br><br>";
TEXT_GOTOMAIN();
?>
</div></div>
<?php 
include "footer.php";
开发者ID:kagetenshi,项目名称:xenoberage,代码行数:31,代码来源:scan.php

示例12: elseif

if (isset($_GET['sure'])) {
    $sure = $_GET['sure'];
}
if (!isset($sure)) {
    echo "<font color=red><strong>{$l_die_rusure}</strong></font><br><br>";
    echo "Please Note: You will loose all your Planets if you Self-Destruct!.<br>\n";
    echo "<a href='main.php'>{$l_die_nonono}</a> {$l_die_what}<br><br>";
    echo "<a href=self_destruct.php?sure=1>{$l_yes}!</a> {$l_die_goodbye}<br><br>";
} elseif ($sure == 1) {
    echo "<font color=red><strong>{$l_die_check}</strong></font><br><br>";
    echo "Please Note: You will loose all your Planets if you Self-Destruct!.<br>\n";
    echo "<a href='main.php'>{$l_die_nonono}</a> {$l_die_what}<br><br>";
    echo "<a href=self_destruct.php?sure=2>{$l_yes}!</a> {$l_die_goodbye}<br><br>";
} elseif ($sure == 2) {
    echo "{$l_die_count}<br>";
    echo "{$l_die_vapor}<br><br>";
    $l_die_please = str_replace("[logout]", "<a href='logout.php'>" . $l_logout . "</a>", $l_die_please);
    echo $l_die_please . "<br>";
    db_kill_player($playerinfo['ship_id'], true);
    cancel_bounty($db, $playerinfo['ship_id']);
    adminlog($db, LOG_ADMIN_HARAKIRI, "{$playerinfo['character_name']}|{$ip}");
    playerlog($db, $playerinfo['ship_id'], LOG_HARAKIRI, "{$ip}");
    echo "Due to nobody looking after your Planets, all your Planets have reduced into dust and ruble. Your Planets are no more.<br>\n";
} else {
    echo $l_die_exploit . "<br><br>";
}
TEXT_GOTOMAIN();
?>
</div></div>
<?php 
include "footer.php";
开发者ID:kagetenshi,项目名称:xenoberage,代码行数:31,代码来源:self_destruct.php

示例13: AND

$res = $db->Execute("SELECT $dbtables[players].player_id,character_name,hull,$dbtables[ships].sector,$dbtables[universe].zone_id,max_hull,tow,ship_id FROM $dbtables[players],$dbtables[universe],$dbtables[zones],$dbtables[ships] WHERE $dbtables[ships].sector=sector_id AND $dbtables[universe].zone_id=$dbtables[zones].zone_id AND max_hull<>0 AND (($dbtables[ships].hull + $dbtables[ships].engines + $dbtables[ships].power + $dbtables[ships].computer + $dbtables[ships].sensors + $dbtables[ships].beams + $dbtables[ships].torp_launchers + $dbtables[ships].shields + $dbtables[ships].armour + $dbtables[ships].cloak)/10) >max_hull AND ship_destroyed='N' AND ship_id=currentship");
$num_to_tow = $res->RecordCount();
echo "<BR>$num_to_tow players to tow:<BR>";
      while(!$res->EOF)
      {
        $row = $res->fields;
		if ($row[player_id] > 1) {
			echo "...towing $row[character_name] out of $row[sector] ...";
			$newsector = rand(0, $sector_max);
			echo " to sector $newsector.<BR>";
			echo "Moving player<br>";
			//echo "UPDATE $dbtables[players] SET sector=$newsector,cleared_defences=' ' where player_id=$row[player_id]<br>";
			$query = $db->Execute("UPDATE $dbtables[players] SET sector=$newsector,cleared_defences=' ' where player_id=$row[player_id]");
			echo "Moving ship<br>";
			//echo "UPDATE $dbtables[ships] SET sector=$newsector where ship_id=$row[ship_id]<br>";
			$query = $db->Execute("UPDATE $dbtables[ships] SET sector=$newsector where ship_id=$row[ship_id]");
			if ($row[tow] > 0) {
				echo "Moving towed ship<br>";
				//echo "UPDATE $dbtables[ships] SET sector=$newsector where ship_id=$row[tow]";
				$query = $db->Execute("UPDATE $dbtables[ships] SET sector=$newsector where ship_id=$row[tow]");
			}
			playerlog($row[player_id], LOG_TOW, "$row[sector]|$newsector|$row[max_hull]");
			log_move($row[player_id],$newsector);
		}
        $res->MoveNext();
      }
  echo "<BR>";
  
  $multiplier = 0; //no use to run this again
?>
开发者ID:antt1995,项目名称:starkicktraders,代码行数:30,代码来源:sched_tow.php

示例14: htmlspecialchars

   			echo "<INPUT TYPE=SUBMIT VALUE=$l_submit><INPUT TYPE=RESET VALUE=$l_reset>";
   			echo "</FORM>";
   			echo "<BR><BR>";
   		} else {
   		        $teamname = htmlspecialchars($teamname);
                        $teamdesc = htmlspecialchars($teamdesc);
   	                $res = $db->Execute("UPDATE $dbtables[teams] SET team_name='$teamname', description='$teamdesc' WHERE id=$whichteam") or die("<font color=red>error: " . $db->ErrorMSG() . "</font>");
   			echo "$l_team_alliance <B>$teamname</B> $l_team_hasbeenr<BR><BR>";
   			/*
   			   Adding a log entry to all members of the renamed alliance
   			*/
   		   $result_team_name = $db->Execute("SELECT player_id FROM $dbtables[players] WHERE team=$whichteam AND player_id<>$playerinfo[player_id]") or die("<font color=red>error: " . $db->ErrorMsg() . "</font>");
   			playerlog($playerinfo[player_id], LOG_TEAM_RENAME, decodeHTML($teamname));
   			while(!$result_team_name->EOF) {
          $teamname_array = $result_team_name->fields;
   			   playerlog($teamname_array[player_id], LOG_TEAM_M_RENAME, decodeHTML($teamname));
                           $result_team_name->MoveNext();
            }
     		}
   		LINK_BACK();
   		break;
	   }
	   else
	   {
   		echo $l_team_error;
   		LINK_BACK();
   		break;
	   }
	case 10: // Retract Invite
    if ($playerinfo[team] == $team[id])
    {
开发者ID:antt1995,项目名称:starkicktraders,代码行数:31,代码来源:teams.php

示例15: elseif

elseif($sure == 1)
{
  echo "<FONT COLOR=RED><B>$l_die_check</B></FONT><BR><BR>";
  echo "<A HREF=$interface>$l_die_nonono</A> $l_die_what<BR><BR>";
  echo "<H1>Self-destructing has a 1500 turn penalty!</H1>";
  echo "<A HREF=self-destruct.php?sure=2>$l_yes!</A> $l_die_goodbye AND LOOSE 1500 TURNS!!!!!<BR><BR>";
}
elseif($sure == 2)
{
  echo "$l_die_count<BR>";
  echo "$l_die_vapor<BR><BR>";
  echo "$l_die_please.<BR>";
  db_kill_player($playerinfo[player_id],$playerinfo[currentship],-2);
  cancel_bounty($playerinfo[player_id]);
  playerlog(1, LOG_ADMIN_HARAKIRI, "$playerinfo[character_name]|$ip");
  playerlog($playerinfo[player_id], LOG_HARAKIRI, "$ip");
}
else
{
  echo "$l_die_exploit<BR><BR>";
}

if($sure != 2)
{
  TEXT_GOTOMAIN();
}

include("footer.php");

?>
开发者ID:antt1995,项目名称:starkicktraders,代码行数:30,代码来源:self-destruct.php


注:本文中的playerlog函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。