• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP tag2value函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: fopen

				<tr class="standard">
					<td align="center" class="standard">
						<a href="#" onclick="status(' . ($map['end'] / 500 - 1) . ', 5);">Kriegsgegner</a>
					</td>
				</tr>
				<tr class="standard">
					<td align="center" class="standard">
						<a href="#" onclick="status(' . ($map['end'] / 500 - 1) . ', 6);">Tr&uuml;mmerfelder</a>
					</td>
				</tr>				
			</table>			
		</td>
	</tr>
</table>';
    $file = fopen($path, 'w');
    fputs($file, $karte);
    fclose($file);
    $karte = str_replace('SID', SID, $karte);
    // $karte = str_replace('%update%',countdown(4*3600),$karte);
    $content .= $karte;
    mysql_query("UPDATE `user` SET `karte` = '" . date('U') . "' WHERE `omni` = '" . $_SESSION['user']['omni'] . "' LIMIT 1 ;");
} else {
    $file = @fopen($path, 'r');
    $size = filesize($path);
    $karte = fread($file, $size);
    $karte = str_replace('SID', SID, $karte);
    // $karte = str_replace('%update%',countdown(($time['karte']+(3600))-date('U')),$karte);
    $content .= $karte;
}
$content = tag2value("onload", '', $content);
echo $content . template('footer');
开发者ID:o-wars,项目名称:o-wars,代码行数:31,代码来源:karte_new.php


示例2: tag2value

<tr>
	<td align="right">
Kosten durch Ankauf 
	</td>
	<td align="right">
<div id="gold_minus">0.00 Gold</div>
	</td>
</tr>
<tr>
	<td align="right">
<b>Endsumme</b> 
	</td>
	<td align="right">
<b><div id="endsumme">0.00 Gold</div></b>
	</td>
	<td>
</tr>
</table>
<br />
<input type="submit" name="bestellen" value="bestellen" />
</form>
<br />
</td></tr></table><br />';
}
$content .= '<img src="eisenstats.png" alt="stats" /><br /><br />
<img src="titanstats.png" alt="stats" /><br /><br />
<img src="oelstats.png" alt="stats" /><br /><br />
<img src="uranstats.png" alt="stats" /><br />';
// generierte seite ausgeben
$content = tag2value('onload', $onload, $content);
echo $content . '<br />' . template('footer');
开发者ID:o-wars,项目名称:o-wars,代码行数:31,代码来源:markt.php


示例3: showcards

} else {
    $content = showcards() . "<br /><b>Derzeitige Punkte: " . score() . '</b><br /><a href="?action=hit&amp;' . SID . '">hit</a> / <a href="?action=stand&amp;' . SID . '">stand</a>';
}
$content = str_replace("%content%", $content, template1());
$content = str_replace("%status%", $_SESSION['game'], $content);
$content = str_replace("%credits%", number_format($ressis['display_gold'], 0, '', '.'), $content);
$content = str_replace("%bet%", $_SESSION['bet'], $content);
mysql_query("UPDATE `ressis` SET `gold` = '" . $_SESSION['credit'] . "' WHERE `omni` = '" . $_SESSION['user']['omni'] . "' LIMIT 1;");
$ressis = ressistand($_SESSION['user']['omni']);
// get playerinfo template and replace tags
$status = template('playerinfo');
$status = tag2value('name', $_SESSION['user']['name'], $status);
$status = tag2value('base', $_SESSION['user']['base'], $status);
$status = tag2value('ubl', $_SESSION['user']['omni'], $status);
$status = tag2value('points', $_SESSION['user']['points'], $status);
echo tag2value('onload', $onload, template('head')) . $status . $ressis['html'] . $content . '</table>' . template('footer');
// debug
// show_vars();
function template1()
{
    // standard xhtml template
    $template = '<br /><br />
	<table width="700px" border="1" cellspacing="0" cellpadding="0" class="standard">
	<tr align="center">
		<th><b>Das O-Wars Offiziers Casino</b></th>
	</tr>
		<tr style="height: 250px;">
			<td valign="top" align="center">
				<table width="99%" border="0" cellspacing="0" cellpadding="0">
					<td width="200px" valign="top">
						Einsatz: <b>%bet% Gold</b><br />
开发者ID:o-wars,项目名称:o-wars,代码行数:31,代码来源:cards.php


示例4: session_start

session_start();
// Basisfunktionen laden
include "admin.php";
// check session
logincheck();
// mit datenbank verbinden
$dbh = db_connect();
if (!$_SESSION['ubl']) {
    die('error');
}
if ($_POST['aendern'] and $_POST['panzerung']) {
    //mysql_query("UPDATE `gebauede` SET `basis` = '".$_POST['basis']."', `forschungsanlage` = '".$_POST['forschungsanlage']."', `fabrik` = '".$_POST['fabrik']."', `raketensilo` = '".$_POST['raketensilo']."', `nbz` = '".$_POST['nbz']."', `hangar` = '".$_POST['hangar']."', `fahrwege` = '".$_POST['fahrwege']."', `missionszentrum` = '".$_POST['missionszentrum']."', `agentenzentrum` = '".$_POST['agentenzentrum']."', `raumstation` = '".$_POST['raumstation']."', `rohstofflager` = '".$_POST['rohstofflager']."', `eisenmine` = '".$_POST['eisenmine']."', `titanmine` = '".$_POST['titanmine']."', `oelpumpe` = '".$_POST['oelpumpe']."', `uranmine` = '".$_POST['uranmine']."' WHERE `omni` = '".$_SESSION['ubl']."' LIMIT 1;");
    mysql_query("UPDATE `forschungen` SET `panzerung` = '" . $_POST['panzerung'] . "',\n`reaktor` = '" . $_POST['reaktor'] . "',\n`panzerketten` = '" . $_POST['panzerketten'] . "',\n`motor` = '" . $_POST['motor'] . "',\n`feuerwaffen` = '" . $_POST['feuerwaffen'] . "',\n`raketen` = '" . $_POST['raketen'] . "',\n`sprengstoff` = '" . $_POST['sprengstoff'] . "',\n`spionage` = '" . $_POST['spionage'] . "',\n`fuehrung` = '" . $_POST['fuehrung'] . "',\n`minen` = '" . $_POST['minen'] . "',\n`cyborgtechnik` = '" . $_POST['cyborgtechnik'] . "',\n`rad` = '" . $_POST['rad'] . "' WHERE `omni` = '" . $_SESSION['ubl'] . "' LIMIT 1;");
}
$temp = template('forschungen');
$fosch = mysql_fetch_array(mysql_query("SELECT * FROM `forschungen` WHERE `omni` = '" . $_SESSION['ubl'] . "';"));
$temp = tag2value('panzerung', $fosch['panzerung'], $temp);
$temp = tag2value('reaktor', $fosch['reaktor'], $temp);
$temp = tag2value('panzerketten', $fosch['panzerketten'], $temp);
$temp = tag2value('rad', $fosch['rad'], $temp);
$temp = tag2value('motor', $fosch['motor'], $temp);
$temp = tag2value('feuerwaffen', $fosch['feuerwaffen'], $temp);
$temp = tag2value('raketen', $fosch['raketen'], $temp);
$temp = tag2value('sprengstoff', $fosch['sprengstoff'], $temp);
$temp = tag2value('spionage', $fosch['spionage'], $temp);
$temp = tag2value('fuehrung', $fosch['fuehrung'], $temp);
$temp = tag2value('minen', $fosch['minen'], $temp);
$content .= template('index');
$content = tag2value('ubl', $_SESSION['ubl'], $content);
$content = tag2value('content', $_SESSION['info'] . $temp, $content);
echo $content;
开发者ID:o-wars,项目名称:o-wars,代码行数:31,代码来源:forschungen.php


示例5: db_connect

$dbh = db_connect();
$select = "UPDATE `user` SET `timestamp` = '" . date(U) . "' WHERE `omni` = '" . $_SESSION['user']['omni'] . "' LIMIT 1 ;";
$result = mysql_query($select);
$select = "SELECT * FROM `missionen` WHERE `ziel` = '" . $_SESSION[user][omni] . "' AND `type` = '1' AND `ankunft` > '" . date(U) . "' AND `parsed` != '1' ORDER BY `ankunft` DESC;";
$result = mysql_query($select);
if (mysql_num_rows($result) > 0) {
    $menu = str_replace('logo.gif', 'attack.gif', $menu);
    $row = mysql_fetch_array($result);
    if ($row['ankunft'] - time() < 600) {
        $refresh = $row['ankunft'] - time();
    }
}
$select = "SELECT * FROM `berichte` WHERE `gelesen` = 0 AND `to` = '" . $_SESSION[user][omni] . "' ORDER BY id DESC;";
$selectResult = mysql_query($select);
$menu = tag2value('berichte', mysql_num_rows($selectResult), $menu);
$select = "SELECT * FROM `nachrichten` WHERE `gelesen` = 0 AND `to` = '" . $_SESSION[user][omni] . "' ORDER BY id DESC;";
$selectResult = mysql_query($select);
$menu = tag2value('nachrichten', mysql_num_rows($selectResult), $menu);
$menu = tag2value('refresh', $refresh, $menu);
$select = "SELECT karte_neu FROM `user` WHERE `omni` = " . $_SESSION['user']['omni'] . " LIMIT 1;";
$result = mysql_query($select);
$row = mysql_fetch_array($result);
if ($row['karte_neu'] == 1) {
    $karte = 'karte_neu.php';
} else {
    $karte = 'karte.php';
}
$menu = tag2value('karte', $karte, $menu);
$casino = mysql_num_rows(mysql_query("SELECT * FROM `cards` WHERE `defender` = '" . $_SESSION['user']['omni'] . "' and `status` = '1';"));
$menu = tag2value('casino', $casino, $menu);
echo $menu;
开发者ID:o-wars,项目名称:o-wars,代码行数:31,代码来源:menu.php


示例6: outbox

function outbox()
{
    // mit datenbank verbinden
    $dbh = db_connect();
    $result = mysql_query("SELECT * FROM `nachrichten` WHERE `from` = '" . $_SESSION['user']['omni'] . "';");
    $count = mysql_num_rows($result) / 20;
    $count = explode('.', $count);
    $c = $count[0];
    if ($count[1] != 0) {
        $c++;
    }
    if (!$_GET['page']) {
        $_GET['page'] = 1;
    }
    $i = 0;
    do {
        $i++;
        if ($_GET['page'] == $i) {
            $pages .= " <b>[" . $i . "]</b>";
        } else {
            $pages .= ' <a href="nachrichten.php?' . SID . '&amp;action=outbox&amp;page=' . $i . '">[' . $i . ']</a>';
        }
    } while ($c > $i);
    $limit = $_GET['page'] * 20 - 20 . ',' . 20;
    // ungelesene nachrichten
    $select = "SELECT * FROM `nachrichten` WHERE `from` = '" . $_SESSION[user][omni] . "' ORDER BY id DESC LIMIT " . $limit . ";";
    $selectResult = mysql_query($select);
    $content .= template('head');
    $content .= template('nachrichten_gesendet');
    $piece = template('nachrichten_gesendet_piece');
    do {
        $row = mysql_fetch_array($selectResult);
        if ($row) {
            $select = "SELECT * FROM `user` WHERE `omni` = '" . $row[to] . "';";
            $selectResult2 = mysql_query($select);
            $row2 = mysql_fetch_array($selectResult2);
            $newpiece = str_replace("%date%", date("H:i d.m.y", $row[timestamp]), $piece);
            $newpiece = str_replace("%omni%", $row[to], $newpiece);
            $newpiece = str_replace("%to%", $row2[name], $newpiece);
            $row['gelesen'] ? $read = 'Ja' : ($read = 'Nein');
            $newpiece = str_replace("%read%", $read, $newpiece);
            $newpiece = str_replace("%subject%", '<a href="javascript:popUp(\'nachricht_lesen.php?' . SID . '&gesendet=1&id=' . $row[id] . '\',600,\'nachricht\')">' . bbcode($row[subject]) . '</a>', $newpiece);
            $newpiece = str_replace("%onclick%", 'javascript:popUp(\'nachricht_lesen.php?' . SID . '&gesendet=1&id=' . $row[id] . '\',600,\'nachricht\')', $newpiece);
            $gelesen .= $newpiece;
        }
    } while ($row);
    $content = tag2value('nachrichten', $gelesen, $content);
    $content = tag2value('pages', $pages, $content);
    return $content;
}
开发者ID:o-wars,项目名称:o-wars,代码行数:50,代码来源:nachrichten.php


示例7: tag2value

        $item = tag2value('tarnung', $row['tarnung'], $item);
        $item = tag2value('preis', $row['preis'], $item);
        $item = tag2value('kaufen', '<a href="agenten.php?' . SID . '&amp;markt=' . $row['id'] . '">kaufen</a>', $item);
        $items .= $item;
    }
} while ($row);
$content = tag2value('items', $items, $content);
// html head setzen
$top = template('head');
$top = tag2value('onload', $onload, $top);
// get playerinfo template and replace tags
$status = template('playerinfo');
$status = tag2value('name', $_SESSION['user']['name'], $status);
$status = tag2value('base', $_SESSION['user']['base'], $status);
$status = tag2value('ubl', $_SESSION['user']['omni'], $status);
$status = tag2value('points', $_SESSION['user']['points'], $status);
$top .= $status;
// ressourcen berechnen
$ressis = ressistand($_SESSION[user][omni]);
$top .= $ressis['html'];
// generierte seite ausgeben
echo $top . $content . template('footer');
// ---------- - - - -  -  -    -
function buy_agent()
{
    $ressis = ressistand($_SESSION['user']['omni']);
    $dbh = db_connect();
    $select = "SELECT * FROM `gebauede` WHERE `omni` = '" . $_SESSION[user][omni] . "';";
    $selectResult = mysql_query($select, $dbh);
    $gebaeude = mysql_fetch_array($selectResult);
    $select = "SELECT * FROM `agenten` WHERE `omni` = '" . $_SESSION['user']['omni'] . "';";
开发者ID:o-wars,项目名称:o-wars,代码行数:31,代码来源:agenten.php


示例8: mysql_query

}
if (!$_POST['tid']) {
    $_POST['tid'] = $_GET['tid'];
}
$select = "SELECT * FROM `clanforum_threads` WHERE `id` = '" . $_POST['tid'] . "';";
$result = mysql_query($select);
$row = mysql_fetch_array($result);
if (!$row) {
    die($content . '<b>Dieser Beitrag existiert nicht.</b>' . template('footer'));
} elseif ($clanid != $row['cid']) {
    die($content . '<b>Dieser Beitrag ist einem anderen Clan.</b>' . template('footer'));
}
if (!$_POST['text']) {
    $content .= template('clanforum_reply');
    $content = tag2value('topic', $row['subject'], $content);
    $content = tag2value('tid', $row['id'], $content);
} else {
    mysql_query("INSERT INTO `clanforum_posts` ( `id` , `tid` , `uid` , `text` , `time` ) VALUES ( '', '" . $_POST['tid'] . "', '" . $_SESSION['user']['omni'] . "', '" . $_POST['text'] . "', '" . date("U") . "');");
    mysql_query("UPDATE `clanforum_threads` SET `time` = '" . date('U') . "' WHERE `id` = '" . $_POST['tid'] . "' LIMIT 1;");
    $content .= '<br />Dein Beitrag wurde hinzugef&uuml;gt.<br /><a href="clanboard.php?' . SID . '">Klicke hier um zur &Uuml;bersicht zur&uuml;ck zu kehren.</a>';
    $content .= '<script language="JavaScript" type="text/javascript">
	<!-- 
	function showthread() {
	setTimeout(\'location.href="clanforum_showthread.php?tid=' . $_POST['tid'] . '&amp;' . SID . '"\',2000); 
	}
	showthread();
	-->
	</script>
	';
}
// generierte seite ausgeben
开发者ID:o-wars,项目名称:o-wars,代码行数:31,代码来源:clanforum_reply.php


示例9: session_name

// Version:          0.0        //
//////////////////////////////////
// starten der session
session_name('SESSION');
session_start();
// Basisfunktionen laden
include "functions.php";
// check session
logincheck();
// get playerinfo template and replace tags
$status = template('playerinfo');
$status = tag2value('name', $_SESSION['user']['name'], $status);
$status = tag2value('base', $_SESSION['user']['base'], $status);
$status = tag2value('ubl', $_SESSION['user']['omni'], $status);
$status = tag2value('points', $_SESSION['user']['points'], $status);
$content .= $status;
// mit datenbank verbinden
$dbh = db_connect();
$ressis = ressistand($_SESSION['user']['omni']);
$result = mysql_query("SELECT * FROM `agenten` WHERE `omni` = '" . $_SESSION['user']['omni'] . "' AND `id` = '" . htmlentities($_GET['id']) . "';");
$row = mysql_fetch_array($result);
$content .= template('agenten_mission');
//$content .= $row['name'];
// html head setzen
$top = template('head');
$top = tag2value('onload', $onload, $top);
// ressourcen berechnen
$ressis = ressistand($_SESSION[user][omni]);
$top .= $ressis['html'];
// generierte seite ausgeben
echo $top . $content . template('footer');
开发者ID:o-wars,项目名称:o-wars,代码行数:31,代码来源:agentenmission.php


示例10: die

    die($content . '<b>Du bist in keinem Clan.</b>' . template('footer'));
}
$content .= template('clanforum_threads');
$piece .= template('clanforum_threads_piece');
$select = "SELECT * FROM `clanforum_threads` WHERE `cid` = '" . $clanid . "' GROUP BY `time` DESC LIMIT 50;";
$result = mysql_query($select);
do {
    $row = mysql_fetch_array($result);
    $select = "SELECT * FROM `user` WHERE 1 AND `omni` = '" . $row['uid'] . "';";
    $result2 = mysql_query($select);
    $user = mysql_fetch_array($result2);
    if ($row) {
        $select = "SELECT * FROM `clanforum_posts` WHERE `tid` = '" . $row['id'] . "' GROUP BY `id` DESC LIMIT 50;";
        $result3 = mysql_query($select);
        $lastpost = mysql_fetch_array($result3);
        $select = "SELECT * FROM `user` WHERE 1 AND `omni` = '" . $lastpost['uid'] . "';";
        $result4 = mysql_query($select);
        $lastuser = mysql_fetch_array($result4);
        $newpiece = tag2value('poster', $user['name'], $piece);
        $newpiece = tag2value('subject', '<a href="clanforum_showthread.php?tid=' . $row['id'] . '&amp;' . SID . '">' . $row['subject'] . '</a>', $newpiece);
        $newpiece = tag2value('replys', mysql_num_rows($result3) - 1, $newpiece);
        $newpiece = tag2value('lastpost', $lastuser['name'] . '<br /><i>' . date('d.m.y - H:i', $lastpost['time']) . '</i>', $newpiece);
        $content .= $newpiece;
    }
} while ($row);
$content .= template('clanforum_threads_end');
if (!$newpiece) {
    die($content . '<b>Das Clanforum ist leer.</b>' . template('footer'));
}
// generierte seite ausgeben
echo $content . template('footer');
开发者ID:o-wars,项目名称:o-wars,代码行数:31,代码来源:clanboard.php


示例11: mysql_query

    if ($row) {
        $select = "SELECT * FROM `clans` WHERE `clanid` =" . $row['clanid'] . ";";
        $result2 = mysql_query($select);
        $members = mysql_numrows($result2);
        if ($clan['clanid']) {
            $select = "SELECT * FROM `clan_info` WHERE `clanid` = '" . $clan['clanid'] . "';";
            $result2 = mysql_query($select);
            $clan = mysql_fetch_array($result2);
        }
        $i++;
        $newpiece = tag2value('name', $row['name'], $piece);
        $newpiece = tag2value('rank', $i, $newpiece);
        $newpiece = tag2value('clanid', $row['clanid'], $newpiece);
        $newpiece = tag2value('members', $members, $newpiece);
        $newpiece = tag2value('tag', $row['tag'], $newpiece);
        $newpiece = tag2value('base', $row['base'], $newpiece);
        $newpiece = tag2value('link', '<a href="claninfo.php?' . SID . '&amp;clan=' . $row['clanid'] . '">mehr</a>', $newpiece);
        $newpiece = tag2value('onclick', 'location.href=\'claninfo.php?' . SID . '&amp;clan=' . $row['clanid'] . '\'', $newpiece);
        $newpiece = tag2value('points', number_format($row['points'], 0, '', '.'), $newpiece);
        $ranking .= $newpiece;
    }
} while ($row);
// get page html
$template .= template('clanrank');
$template = tag2value('ranking', $ranking, $template);
$content .= $template;
$content = tag2value('pages', $pages, $content);
$content = tag2value('update', date('H:i - d.m.y', filectime('temp/timestamps/points')), $content);
// send page to browser
$content = str_replace('%onload%', $onload, $content);
echo $content . template('footer');
开发者ID:o-wars,项目名称:o-wars,代码行数:31,代码来源:clanrank.php


示例12: tag2value

            }
            $newpiece = tag2value('points', '<b>' . number_format($row['plasmapunkte'], 0, '', '.') . '</b>', $newpiece);
            $ranking .= $newpiece;
        } else {
            $newpiece = tag2value('name', $row['name'], $piece);
            $newpiece = tag2value('rank', $i, $newpiece);
            $newpiece = tag2value('ubl', $row['omni'], $newpiece);
            $newpiece = tag2value('base', $row['base'], $newpiece);
            if ($clan['clanid']) {
                $newpiece = tag2value('clan', '<a href="claninfo.php?' . SID . '&amp;clan=' . $clan['clanid'] . '">' . $clan['tag'] . '</a>', $newpiece);
            } else {
                $newpiece = tag2value('clan', '-', $newpiece);
            }
            $newpiece = tag2value('points', number_format($row['plasmapunkte'], 0, '', '.'), $newpiece);
            $ranking .= $newpiece;
        }
    }
} while ($row and $i < 10);
$i = 0;
$ranking3 = $ranking;
$ranking = '';
// get page html
$template .= template('sectorrank');
$template = tag2value('ranking1', $ranking1, $template);
$template = tag2value('ranking2', $ranking2, $template);
$template = tag2value('ranking3', $ranking3, $template);
$template = tag2value('sector', number_format($_GET['sector'], 0), $template);
$content .= $template;
// send page to browser
$content = str_replace('%onload%', $onload, $content);
echo $content . template('footer');
开发者ID:o-wars,项目名称:o-wars,代码行数:31,代码来源:sectorrank.php


示例13: mysql_query

        if ($array[$a[$i]]) {
            $result = mysql_query("SELECT * FROM `user` WHERE `omni` = '" . $a[$i] . "' LIMIT 1;");
            $row = mysql_fetch_array($result);
            if ($_SESSION['ubl'] != $a[$i]) {
                if ($array[$a[$i]] > 2000) {
                    $red = 'class="red"';
                }
                $multi .= '<a ' . $red . ' href="uebersicht.php?ubl=' . $a[$i] . '&amp;' . SID . '">UBL: ' . $a[$i] . '  - &nbsp;' . $row['name'] . ' [' . $array[$a[$i]] . ']</a><br />';
                unset($red);
            }
        }
        $i++;
    } while ($a[$i]);
}
$ressis = template('ressis');
$ress = ressistand($_SESSION['ubl']);
$ressis = tag2value('eisen', number_format($ress['eisen'], 0, ',', '.'), $ressis);
$ressis = tag2value('titan', number_format($ress['titan'], 0, ',', '.'), $ressis);
$ressis = tag2value('oel', number_format($ress['oel'], 0, ',', '.'), $ressis);
$ressis = tag2value('gold', number_format($ress['gold'], 0, ',', '.'), $ressis);
$ressis = tag2value('uran', number_format($ress['uran'], 0, ',', '.'), $ressis);
$ressis = tag2value('chanje', number_format($ress['chanje'], 0, ',', '.'), $ressis);
$sperren = template('sperren');
$content .= template('index');
$content = tag2value('ubl', $_SESSION['ubl'], $content);
$content = tag2value('content', $form . $c1 . '<table cellspacing="0" border="1"><tr valign="top"><td width="254px"><b>Potentielle Multis:</b><br />' . $multi . '</td><td width="254px"><b>Ressis buchen:</b><br />' . $ressis . '</td></tr>
<tr><td><b>Spieler sperren:</b>' . $sperren . '</td>
<td></td>
</tr>
</table>', $content);
echo $content;
开发者ID:o-wars,项目名称:o-wars,代码行数:31,代码来源:uebersicht.php


示例14: template

function template($template)
{
    // gets template and replaces template_path
    $path = './templates/' . $template . '.html';
    $template_path = './templates/';
    $file = @fopen($path, 'r');
    $template = fread($file, filesize($path));
    while (strstr($template, '%template_path%')) {
        $template = str_replace('%template_path%', $template_path, $template);
    }
    while (strstr($template, 'SID')) {
        $template = str_replace('SID', SID, $template);
    }
    $template = tag2value('date', date('M, d Y H:i:s'), $template);
    return $template;
}
开发者ID:o-wars,项目名称:o-wars,代码行数:16,代码来源:admin.php


示例15: tag2value

    $status = tag2value('ubl', $_SESSION['user']['omni'], $status);
    $status = tag2value('points', $_SESSION['user']['points'], $status);
    $content .= $status;
    // ressourcen berechnen und ausgeben
    $ressis = ressistand($_SESSION[user][omni]);
    $content .= $ressis['html'];
    $content_left .= 'Clan: <b>' . $_SESSION['user']['clan'] . '<br /></b>';
    $content_left .= 'Email: <b>' . $_SESSION['user']['mail'] . '<br /></b>';
    $content_left .= 'Logins: <b>' . $logins . '<br /></b>';
    $content_left .= 'Signatur: <b>' . $_SESSION['user']['sig'] . '<br /></b>';
    $content_left .= 'Multis: <b><br />' . $multi . '<br /></b>';
}
$content .= '</center><br /><br /><br /><br />
<table>
	<tr valign="top">
		<td style="width: 230px;">
			' . $content_left . '
		</td>
		<td style="width: 230px;">
			' . $content_center . '
		</td>
		<td style="width: 230px;">
			' . $content_right . '
		</td>
	</tr>
</table>';
$content = tag2value('ubl', '', $content);
$content .= "</form>";
// generierte seite ausgeben
echo template('head') . $content . template('footer');
//show_vars();
开发者ID:o-wars,项目名称:o-wars,代码行数:31,代码来源:admin.php


示例16: die

if (!$row) {
    die($content . '<b>Du bist in keinem Clan.</b>' . template('footer'));
}
if ($_POST['text']) {
    $_POST['text'] = htmlspecialchars(str_replace("'", '`', $_POST['text']));
    $select = "INSERT INTO `clanboard` ( `id` , `userid` , `clanid` , `date` , `text` ) VALUES ('', '" . $_SESSION['user']['omni'] . "', '" . $clanid . "', '" . date('U') . "', '" . $_POST['text'] . "');";
    mysql_query($select);
}
$content .= '<form enctype="multipart/form-data" action="clanboard.php?' . SID . '" method="post">
<textarea name="text" style="width:680px;height:100px"></textarea><br /><input type="submit" name="submit" value="Eintragen!"></form>';
$piece .= template('clanboard');
$select = "SELECT * FROM `clanboard` WHERE `clanid` = '" . $clanid . "' GROUP BY `id` DESC LIMIT 50;";
$result = mysql_query($select);
do {
    $row = mysql_fetch_array($result);
    $select = "SELECT * FROM `user` WHERE 1 AND `omni` = '" . $row['userid'] . "';";
    $result2 = mysql_query($select);
    $user = mysql_fetch_array($result2);
    if ($row) {
        $newpiece = tag2value('name', $user['name'], $piece);
        $newpiece = tag2value('ubl', $row['userid'], $newpiece);
        $newpiece = tag2value('time', date('d.m.Y H:i', $row['date']), $newpiece);
        $newpiece = tag2value('text', nl2br($row['text']), $newpiece);
        $content .= $newpiece;
    }
} while ($row);
if (!$newpiece) {
    die($content . '<b>Das Clanforum ist leer.</b>' . template('footer'));
}
// generierte seite ausgeben
echo $content . template('footer');
开发者ID:o-wars,项目名称:o-wars,代码行数:31,代码来源:clanforum.php


示例17: ressistand


//.........这里部分代码省略.........
        $oel_bonus = $gebaeude[oelpumpe] * 25 / 100 * ($gebaeude['oelpumpe'] * 5);
        $uran_bonus = $gebaeude[uranmine] * 12 / 100 * ($gebaeude['uranmine'] * 5);
        $e = explode('.', $eisen_bonus);
        $eisen_bonus = $e[0];
        $e = explode('.', $titan_bonus);
        $titan_bonus = $e[0];
        $e = explode('.', $oel_bonus);
        $oel_bonus = $e[0];
        $e = explode('.', $uran_bonus);
        $uran_bonus = $e[0];
    }
    // aktuellen ressi stand berechnen
    $eisen = (date('U') - $row['eisentimestamp']) / 60 / 60 * (40 + $gebaeude['eisenmine'] * 30 + $eisen_bonus) + $row['eisen'];
    $titan = (date('U') - $row['titantimestamp']) / 60 / 60 * (20 + $gebaeude['titanmine'] * 20 + $titan_bonus) + $row['titan'];
    $oel = (date('U') - $row['oeltimestamp']) / 60 / 60 * (32 + $gebaeude['oelpumpe'] * 25 + $oel_bonus) + $row['oel'];
    $uran = (date('U') - $row['urantimestamp']) / 60 / 60 * ($gebaeude['uranmine'] * 12 + $uran_bonus) + $row['uran'];
    $gold = (date('U') - $row['goldtimestamp']) / 60 / 60 * (4 + ($gebaeude['eisenmine'] + $gebaeude['titanmine'] + $gebaeude['oelpumpe'] + $gebaeude['uranmine'])) + $row['gold'];
    if ($row['ueberlagerbar'] <= date('U')) {
        if (number_format($eisen, 0, '', '') >= $gebaeude['rohstofflager'] * 7500 + 5000) {
            $eisen = $gebaeude['rohstofflager'] * 7500 + 5000;
            $select = "UPDATE `ressis` SET `eisentimestamp` = '" . date("U") . "', `eisen` = '" . $eisen . "' WHERE `omni` = '" . $omni . "' ;";
            $selectResult = mysql_query($select);
        }
        if (number_format($titan, 0, '', '') >= $gebaeude['rohstofflager'] * 7500 + 5000) {
            $titan = $gebaeude['rohstofflager'] * 7500 + 5000;
            $select = "UPDATE `ressis` SET `titantimestamp` = '" . date("U") . "', `titan` = '" . $titan . "' WHERE `omni` = '" . $omni . "' ;";
            $selectResult = mysql_query($select);
        }
        if (number_format($oel, 0, '', '') >= $gebaeude['rohstofflager'] * 7500 + 5000) {
            $oel = $gebaeude['rohstofflager'] * 7500 + 5000;
            $select = "UPDATE `ressis` SET `oeltimestamp` = '" . date("U") . "', `oel` = '" . $oel . "' WHERE `omni` = '" . $omni . "' ;";
            $selectResult = mysql_query($select);
        }
        if (number_format($uran, 0, '', '') >= $gebaeude['rohstofflager'] * 7500 + 5000) {
            $uran = $gebaeude['rohstofflager'] * 7500 + 5000;
            $select = "UPDATE `ressis` SET `urantimestamp` = '" . date("U") . "', `uran` = '" . $uran . "' WHERE `omni` = '" . $omni . "' ;";
            $selectResult = mysql_query($select);
        }
        if (number_format($gold, 0, '', '') >= $gebaeude['rohstofflager'] * 7500 + 5000) {
            $gold = $gebaeude['rohstofflager'] * 7500 + 5000;
            $select = "UPDATE `ressis` SET `goldtimestamp` = '" . date("U") . "', `gold` = '" . $gold . "' WHERE `omni` = '" . $omni . "' ;";
            $selectResult = mysql_query($select);
        }
    }
    // die neuen ressis speichern
    if (number_format($eisen, 0, '', '') > number_format($row['eisen'], 0, '', '')) {
        $select = "UPDATE `ressis` SET `eisentimestamp` = '" . date("U") . "', `eisen` = '" . $eisen . "' WHERE `omni` = '" . $omni . "' ;";
        $selectResult = mysql_query($select);
    }
    if (number_format($titan, 0, '', '') > number_format($row['titan'], 0, '', '')) {
        $select = "UPDATE `ressis` SET `titantimestamp` = '" . date("U") . "', `titan` = '" . $titan . "' WHERE `omni` = '" . $omni . "' ;";
        $selectResult = mysql_query($select);
    }
    if (number_format($oel, 0, '', '') > number_format($row['oel'], 0, '', '')) {
        $select = "UPDATE `ressis` SET `oeltimestamp` = '" . date("U") . "', `oel` = '" . $oel . "' WHERE `omni` = '" . $omni . "' ;";
        $selectResult = mysql_query($select);
    }
    if (number_format($uran, 0, '', '') > number_format($row['uran'], 0, '', '')) {
        $select = "UPDATE `ressis` SET `urantimestamp` = '" . date("U") . "', `uran` = '" . $uran . "' WHERE `omni` = '" . $omni . "' ;";
        $selectResult = mysql_query($select);
    }
    if (number_format($gold, 0, '', '') > number_format($row['gold'], 0, '', '')) {
        $select = "UPDATE `ressis` SET `goldtimestamp` = '" . date("U") . "', `gold` = '" . $gold . "' WHERE `omni` = '" . $omni . "' ;";
        $selectResult = mysql_query($select);
    }
    // ausgabe
    $ressis['eisen'] = $eisen;
    $ressis['titan'] = $titan;
    $ressis['oel'] = $oel;
    $ressis['uran'] = $uran;
    $ressis['gold'] = $gold;
    $ressis['chanje'] = $row['chanje'];
    $ressis['hangar'] = $free;
    $ressis['ueberlagerbar'] = $row['ueberlagerbar'];
    $ressis_template = template(ressis);
    $eisen_html = explode('.', $ressis['eisen']);
    $eisen_html = $eisen_html[0];
    $titan_html = explode('.', $ressis['titan']);
    $titan_html = $titan_html[0];
    $oel_html = explode('.', $ressis['oel']);
    $oel_html = $oel_html[0];
    $uran_html = explode('.', $ressis['uran']);
    $uran_html = $uran_html[0];
    $gold_html = explode('.', $ressis['gold']);
    $gold_html = $gold_html[0];
    list($ressis['display_eisen']) = explode('.', $ressis['eisen']);
    list($ressis['display_titan']) = explode('.', $ressis['titan']);
    list($ressis['display_oel']) = explode('.', $ressis['oel']);
    list($ressis['display_uran']) = explode('.', $ressis['uran']);
    list($ressis['display_gold']) = explode('.', $ressis['gold']);
    $ressis_template = tag2value('_eisen', number_format($eisen_html, 0), $ressis_template);
    $ressis_template = tag2value('_titan', number_format($titan_html, 0), $ressis_template);
    $ressis_template = tag2value('_oel', number_format($oel_html, 0), $ressis_template);
    $ressis_template = tag2value('_uran', number_format($uran_html, 0), $ressis_template);
    $ressis_template = tag2value('_gold', number_format($gold_html, 0), $ressis_template);
    $ressis_template = tag2value('_chanje', number_format($ressis['chanje'], 0), $ressis_template);
    $ressis_template = tag2value('_hangar', number_format($ressis['hangar'], 0), $ressis_template);
    $ressis['html'] = $ressis_template;
    return $ressis;
}
开发者ID:o-wars,项目名称:o-wars,代码行数:101,代码来源:functions.php


示例18: session_name

<?php

// starten der session
session_name('SESSION');
session_start();
// Basisfunktionen laden
include "admin.php";
// check session
logincheck();
// mit datenbank verbinden
$dbh = db_connect();
if ($_POST['ubl']) {
    $_SESSION['ubl'] = $_POST['ubl'];
}
$content .= template('index');
$content = tag2value('ubl', $_SESSION['ubl'], $content);
$content = tag2value('content', '<img src="img.php" alt="xxx" />', $content);
echo $content;
开发者ID:o-wars,项目名称:o-wars,代码行数:18,代码来源:server.php


示例19: tag2value

    $content = tag2value("dgeinh" . $i, number_format($row["dp" . $i] + $row["dr" . $i] + $row["dk" . $i], 0, '', ','), $content);
    $vp += $row["vp" . $i];
    $vr += $row["vr" . $i];
    $vk += $row["vk" . $i];
    $vg += $row["vp" . $i] + $row["vr" . $i] + $row["vk" . $i];
    $dp += $row["dp" . $i];
    $dr += $row["dr" . $i];
    $dk += $row["dk" . $i];
    $dg += $row["dp" . $i] + $row["dr" . $i] + $row["dk" . $i];
} while ($i < 15);
$content = tag2value("dkg", number_format($dk, 0, '', ','), $content);
$content = tag2value("drg", number_format($dr, 0, '', ','), $content);
$content = tag2value("dpg", number_format($dp, 0, '', ','), $content);
$content = tag2value("dg", number_format($dg, 0, '', ','), $content);
$content = tag2value("vkg", number_format($vk, 0, '', ','), $content);
$content = tag2value("vrg", number_format($vr, 0, '', ','), $content);
$content = tag2value("vpg", number_format($vp, 0, '', ','), $content);
$content = tag2value("vg", number_format($vg, 0, '', ','), $content);
$content = tag2value("f_eisen", number_format($row["farm_eisen"], 0, '', ','), $content);
$content = tag2value("f_titan", number_format($row["farm_titan"], 0, '', ','), $content);
$content = tag2value("f_oel", number_format($row["farm_oel"], 0, '', ','), $content);
$content = tag2value("f_uran", number_format($row["farm_uran"], 0, '', ','), $content);
$content = tag2value("f_gold", number_format($row["farm_gold"], 0, '', ','), $content);
$content = tag2value("r_eisen", number_format($row["ripped_eisen"], 0, '', ','), $content);
$content = tag2value("r_titan", number_format($row["ripped_titan"], 0, '', ','), $content);
$content = tag2value("r_oel", number_format($row["ripped_oel"], 0, '', ','), $content);
$content = tag2value("r_uran", number_format($row["ripped_uran"], 0, '', ','), $content);
$content = tag2value("r_gold", number_format($row["ripped_gold"], 0, '', ','), $content);
// generierte seite ausgeben
$content = str_replace('%onload%', $onload, $content);
echo $content . template('footer');
开发者ID:o-wars,项目名称:o-wars,代码行数:31,代码来源:supporterstats.php


示例20: template

$content .= template('clanforum_showthread');
$piece .= template('clanforum_showthread_piece');
$select = "SELECT * FROM `clanforum_threads` WHERE `id` = '" . $_GET['tid'] . "' LIMIT 1;";
$result = mysql_query($select);
$row = mysql_fetch_array($result);
$content = tag2value('topic', $row['subject'], $content);
$select = "SELECT * FROM `clanforum_posts` WHERE `tid` = '" . $_GET['tid'] . "' ORDER BY `id` ASC;";
$result = mysql_query($select);
do {
    $row = mysql_fetch_array($result);
    $select = "SELECT * FROM `user` WHERE 1 AND `omni` = '" . $row['uid'] . "';";
    $result2 = mysql_query($select);
    $user = mysql_fetch_array($result2);
    if ($row) {
        $select = "SELECT * FROM `clanforum_posts` WHERE `tid` = '" . $row['id'] . "' GROUP BY `id` DESC LIMIT 50;";
        $result3 = mysql_query($select);
        $userinfo = '<b>' . $user['name'] . '</b><br />';
        $userinfo .= 'UBL:  

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP tag_add函数代码示例发布时间:2022-05-23
下一篇:
PHP tag函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap