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


PHP Button::printme方法代码示例

本文整理汇总了PHP中Button::printme方法的典型用法代码示例。如果您正苦于以下问题:PHP Button::printme方法的具体用法?PHP Button::printme怎么用?PHP Button::printme使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Button的用法示例。


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

示例1: array

                if ($target->feld[$i]->bauzeit == 0) {
                    echo '<td><img src="images/buildings/', $bild, '" border="0" onmouseover="Tip(', $target->feld[$i]->aktiv > 0 ? $mouse . 'online' : $mouse . 'offline', ')" onmouseout="UnTip()" /></td>';
                }
                if ($target->feld[$i]->bauzeit > 0) {
                    echo '<td><img src="images/buildings/', $bild, '" border="0" onmouseover="Tip(\'', $mouse, ' | Fertig in ', $target->feld[$i]->bauzeit, ' Ticks \')" onmouseout="UnTip()" /></td>';
                }
            }
            if ($i % 10 == 0 && $oflaeche == 50) {
                echo '</tr>';
            }
            if ($i % 6 == 0 && $oflaeche == 24) {
                echo '</tr>';
            }
        }
        echo '</table><hr />';
        echo '<br /><table class="bordered2">';
        $inhalt = array("rohstoffa", "rohstoffb", "rohstoffc", "rohstoffd", "isochips", "tritanium", "dili", "antimaterie", "deuterium", "npcborg", "npcrom", "npcfer", "npcfod", "npckling", "npccard");
        $inhaltcap = array("Baustoff", "Duranium", "Erz", "Sorium", "Isochips", "Tritanium", "Dilithium", "Antimaterie", "Deuterium", "Vinkulum", "Ale", "Latinum", "Château Picard", "Blutwein", "Taspar Eier");
        $inhaltimg = array("baustoff.png", "duranium.png", "erz.png", "sorium.png", "isochips.png", "tritanium.png", "dili.png", "antimaterie.png", "deuterium.png", "vinkulum.png", "ale.png", "latinum.png", "chateau.png", "blutwein.png", "eier.png");
        for ($i = 0; $i < sizeof($inhalt); $i++) {
            if ($target->{$inhalt}[$i] > 0) {
                echo '<tr><td>', $inhaltcap[$i], '</td><td><img src="images/misc/', $inhaltimg[$i], '" border="0" /></td><td>', $target->{$inhalt}[$i], '</td></tr>';
            }
        }
        echo '</table>';
        echo '<br /><br />';
        $but = new Button("schiffe.php?sid=" . $sid, "zur&uuml;ck zum Schiff");
        $but->printme();
    }
}
include "foot.php";
开发者ID:tuxmania87,项目名称:GalaxyAdventures,代码行数:31,代码来源:scanplanet.php

示例2: Button

 }
 if ($schiff->alarmstufe == 'red' && $alarmcheck === false) {
     echo '<img src="images/misc/alarmrg.png" border="0" />';
 } else {
     echo '<a href="flotte.php?fid=', $fid, '&do=6r"><img src="images/misc/alarmrk.png" border="0" /></a>';
 }
 echo '<br />';
 echo '<br />';
 $bu = new Button("flotte.php?do=3&fid=" . $fid, "Schilde aktivieren");
 $bu->printme();
 echo '<br />';
 $bu = new Button("flotte.php?do=4&fid=" . $fid, "Schilde deaktivieren");
 $bu->printme();
 echo '<br /><br />';
 $bu = new Button("flotte.php?do=5&fid=" . $fid, "Energie verteilen");
 $bu->printme();
 echo '</td><td style="vertical-align:top;"><table class="bordered">';
 $nebel = false;
 $gegnerab = mysql_query("SELECT * FROM schiffe WHERE x='" . $schiff->position->x . "' AND y='" . $schiff->position->y . "' AND orbit='" . $schiff->position->orbit . "' AND typ='b'");
 while ($gegner = mysql_fetch_array($gegnerab)) {
     $nebel = true;
 }
 //deutbool
 for ($po = 0; $po < sizeof($schiffe); $po++) {
     $pruf = new Schiffe($schiffe[$po]);
     if ($pruf->skill->deuterium == 1) {
         $deutbool = true;
     }
     if ($pruf->skill->erz == 1) {
         $erzbool = true;
     }
开发者ID:tuxmania87,项目名称:GalaxyAdventures,代码行数:31,代码来源:flotte.php

示例3: navigieren


//.........这里部分代码省略.........
             $erledigt = false;
             if ($this->position->system->id == 0 && !$erledigt) {
                 $abfrage = mysql_query("SELECT * FROM systeme WHERE x='" . $this->position->x . "' AND y='" . $this->position->y . "' LIMIT 1");
                 while ($row = mysql_fetch_array($abfrage)) {
                     $this->energie -= $need;
                     $this->position->system = new System($row["id"]);
                     $this->gondeln++;
                     //Flottenpruefung
                     if ($flotte === true) {
                         $fx = 0;
                         $fy = 0;
                         $testvar1 = mysql_query("SELECT * FROM schiffe WHERE flotte='" . $this->flotte . "' AND id!='" . $this->id . "' AND system='" . $row["id"] . "' LIMIT 1");
                         while ($testrow1 = mysql_fetch_array($testvar1)) {
                             $fx = $testrow1["x"];
                             $fy = $testrow1["y"];
                         }
                     }
                     if ($fx == 0 && $fy == 0) {
                         $flyin = $this->einflugkoordinaten();
                         $this->position->x = $flyin[0];
                         $this->position->y = $flyin[1];
                     } else {
                         $this->position->x = $fx;
                         $this->position->y = $fy;
                     }
                     $erledigt = true;
                 }
             }
             if ($this->position->system->id > 0 && !$erledigt) {
                 $this->gondeln++;
                 $this->energie -= $need;
                 $this->position->x = $this->position->system->x;
                 $this->position->y = $this->position->system->y;
                 $this->position->system = new System('0');
                 $this->position->system->id = 0;
                 $erledigt = true;
             }
         }
         mysql_query("UPDATE schiffe SET gondeln='" . $this->gondeln . "',energie='" . $this->energie . "',system='" . $this->position->system->id . "',x=" . $this->position->x . ",y=" . $this->position->y . ",orbit=" . $this->position->orbit . " WHERE id='{$this->id}'") or die(mysql_error());
         mysql_query("UPDATE counter SET count=count+1 WHERE id=1") or die(mysql_error());
         /* $abfrage2=mysql_query("SELECT * FROM schiffe WHERE id!='$this->id' AND system='".$this->position->system->id."' AND x=".$this->position->x." AND y=".$this->position->y." AND orbit=".$this->position->orbit);
                       while($row2=mysql_fetch_array($abfrage2))
                       {
                       $eintrag=new Logbuch("typ","neu");
                       $eintrag->x=$this->position->x;
                       $eintrag->y=$this->position->y;
                       $eintrag->zeit=date("Y-m-d H:i:s");
                       $eintrag->system=$this->position->system->id;
                       $eintrag->typ="Bewegung";
                       $eintrag->klasse="Eingang";
                       $eintrag->text="Einflug des Schiffes ".$this->name." (".$this->id.")";
                       $eintrag->initiator=$this->besitzer->id;
                       $eintrag->betroffener=$row2["besitzer"];
                       $eintrag->save();
                       }
                       //Horchposten
                       /*
                       $lovevar=$_SESSION["Id"];
                       $horcharray=array();
                       $horchquery=mysql_query("SELECT * FROM schiffe WHERE besitzer!='$lovevar' AND klasse='Horchposten' AND x>=".($this->position->x-5)." AND x<= ".($this->position->x+5) ." AND y>= ".($this->position->y-5) ." AND y<=".($this->position->y+5));
                       while($treffer=mysql_fetch_array($horchquery)) array_push($horcharray,$treffer["id"]);
         
                       $datum=date("Y-m-d H:i:s");
                       for($a=0;$a<sizeof($horcharray);$a++) { $ich=$horcharray[$a]; mysql_query("INSERT INTO horchlog (datum,img,besitzer,klasse,ich,x,y) VALUES ('$datum','$schiff->img','$schiff->besitzer','$schiff->klasse','$ich','$schiff->x','$schiff->y')") or die(mysql_error()); }
         
                       $abfrage=mysql_query("SELECT * FROM weltraum WHERE (typ='b' OR typ='rs' OR typ='bs') AND x=".$this->position->x." AND y=".$this->position->y." AND system=".$this->position->system->id);
                       while($tmp=mysql_fetch_array($abfrage)) $nebel=true;
         
                       $sonnenquery=mysql_query("SELECT * FROM weltraum WHERE (typ='p' OR typ='x' OR typ='r1' OR typ='r2' OR typ='r3' OR typ='r4') AND system=".$this->position->system->id." AND x=".$this->position->x." AND y=".$this->position->y);
                       while($sonne=mysql_fetch_array($sonnenquery))
                       {
                       echo 'Dein Schiff wurde zerst&ouml;rt!'; $this->zerstoerung();
                       }
         
                       mysql_query("UPDATE schiffe SET schildstatus='$this->schildstatus',energie='$this->energie',phaser='$this->phaser',gondeln='$this->gondeln',schilde='$this->schilde' WHERE id='$this->id'");
                      */
         if (!$flotte) {
             $this->kampftick("0", null);
         }
         if (isset($switchvar) && $switchvar->feld->hide && $this->schildstatus == 1) {
             $this->schildstatus = 0;
             mysql_query("update schiffe set schildstatus=0 where id=" . $this->id);
             echo "<span class=\"error\">Du bist in " . $switchvar->name . " eingeflogen: Schilde ausgefallen.</span>";
         }
         if (isset($switchvar) && $switchvar->feld->deadly) {
             if ($this->besitzer->level == 5) {
                 echo "Du bist in " . $switchvar->name . " eingeflogen. Dein Schiff wurde zerstört, zerquetscht und zermalmt.<br /><br />";
                 $this->zerstoerung();
                 $bu = new Button("schiffchoice.php", "zur Schiffsübersicht");
                 $bu->printme();
                 die;
             } else {
                 echo "<span class=\"error\">Normalerweise wäre dein Schiff jetzt zerstört, da du aber noch nicht Level 5 erreicht hast, werden dem Schiff nur 20% der aktuellen Energie abgezogen</span>";
                 $this->energie = floor($this->energie * 0.2 * 100) / 100;
                 mysql_query("update schiffe set energie=" . $this->energie . " where id=" . $this->id);
             }
         }
     }
     return 0;
 }
开发者ID:tuxmania87,项目名称:GalaxyAdventures,代码行数:101,代码来源:klassen.php


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