本文整理汇总了PHP中main::selectChar方法的典型用法代码示例。如果您正苦于以下问题:PHP main::selectChar方法的具体用法?PHP main::selectChar怎么用?PHP main::selectChar使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类main
的用法示例。
在下文中一共展示了main::selectChar方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: main
require_once "libs/includer.php";
include "translations/conf.php";
if (isset($_SESSION["user"]) && !empty($_SESSION["user"]) && (isset($_SESSION["char"]) && !empty($_SESSION["char"]))) {
$badge = null;
$classup = null;
$classchange = null;
$levelup = null;
$user_session = $_SESSION["user"];
$main = new main($mysql);
$main->getChars($user_session);
$bank = $main->getBank($user_session, "0");
$bank_equiped = $main->getBank($user_session, "1");
$equips = $_SESSION["itens"];
$charClass = new char($_SESSION["char"], $mysql);
if ($charClass->levelUP() == 1) {
$main->selectChar($_SESSION["user"], $_SESSION["char"][0]);
$char = new char($_SESSION["char"], $mysql);
$char->status();
$levelup = '<span class="badge white-text teal lighten-2">' . $trans["levelup"] . '</span>';
}
$char_session = $_SESSION["char"];
$stats = $_SESSION["stats"];
$user = array("username" => $user_session["u_user"], "useremail" => $user_session["u_email"]);
$char = array("charid" => $char_session[0], "charname" => $char_session[1], "charclass" => $char_session[2], "charlevel" => $char_session[3], "charexperience" => $char_session[4], "charpoints" => $char_session[5], "charreborns" => $char_session[6], "charmoney" => $char_session[7]);
if (($char["charclass"] == "warrior" || $char["charclass"] == "mage" || $char["charclass"] == "acolyte" || $char["charclass"] == "thief") && $char["charlevel"] == "20" || ($char["charclass"] == "knight" || $char["charclass"] == "wizard" || $char["charclass"] == "priest" || $char["charclass"] == "rogue") && $char["charlevel"] == "40") {
$badge = '<span class="badge white-text teal lighten-2">' . $trans["classup"] . '</span>';
$classchange = '<h6><a class="waves-effect waves-light btn-large" href="changeClass">' . $trans["classchange"] . '</a></h6>';
}
if ($char["charlevel"] >= 41 && $char["charreborns"] <= 5) {
$badge = '<span class="badge white-text teal lighten-2">' . $trans["reborn"] . '</span>';
$classchange = '<h6><a class="waves-effect waves-light btn-large" onClick="reborn(' . $char["charid"] . ');">' . $trans["reborn"] . '</a></h6>';
示例2: main
<?php
//Select Char lib archive
//Created by: Joao Escudero <joaovescudero@gmail.com>
//Git: http://github.com/joaovescudero/Projeto
//require_once("classes/main.class.php");
require_once "classes/char.class.php";
$id = $_GET["id"];
$main = new main($mysql);
$main->selectChar($_SESSION["user"], $id);
$char = new char($_SESSION["char"], $mysql);
$char->status();
header("Location: ../");