update codes

This commit is contained in:
Amberstone 2024-10-11 14:21:42 +09:00
parent 651e10d47e
commit 7fa0609ac5
Signed by: amber
GPG key ID: 094B0E55F98D8BF1
10 changed files with 3972 additions and 3954 deletions

View file

@ -1,4 +1,12 @@
<?php <?php
/**
* need addon loader
*/
require_once __DIR__ . "/addon.loader.php";
/**
* Addon Struct
*/
class Addon class Addon
{ {
public $name = ""; public $name = "";

View file

@ -1,4 +1,14 @@
<?php <?php
/**
* item class
*/
require_once __DIR__ . "/item.class.php";
/**
* status class
*/
// require_once __DIR__ . "/status.class.php";
class Character extends Module class Character extends Module
{ {
protected $_rawdata; protected $_rawdata;

View file

@ -9,11 +9,9 @@ $is_mine = $ch['mb_id'] == $character['mb_id'] ? true : false;
if (!$in['in_id']) { if (!$in['in_id']) {
echo "<p>아이템 보유 정보를 확인할 수 없습니다.</p>"; echo "<p>아이템 보유 정보를 확인할 수 없습니다.</p>";
} else { } else {
if (defined('G5_THEME_PATH') && is_file(G5_THEME_PATH . "/inventory/item.skin.php")) { if (defined('G5_THEME_PATH') && is_file(G5_THEME_PATH . "/inventory/item.skin.php")) {
include G5_THEME_PATH . "/inventory/item.skin.php"; include G5_THEME_PATH . "/inventory/item.skin.php";
} else { } else {
include G5_PATH . "/inventory/skin/item.skin.php"; include G5_PATH . "/inventory/skin/item.skin.php";
} }
} }

View file

@ -1,9 +1,7 @@
<?php <?php
if (!defined('_GNUBOARD_')) if (!defined('_GNUBOARD_'))
exit; exit;
?> ?><div class="info">
<div class="info">
<div class="ui-thumb"> <div class="ui-thumb">
<img src="<?= $in['it_img'] ?>" /> <img src="<?= $in['it_img'] ?>" />
</div> </div>

View file

@ -1,9 +1,7 @@
<?php <?php
if (!defined('_GNUBOARD_')) if (!defined('_GNUBOARD_'))
exit; exit;
?> ?><div class="info">
<div class="info">
<div class="ui-thumb"> <div class="ui-thumb">
<img src="<?= $in['it_img'] ?>" /> <img src="<?= $in['it_img'] ?>" />
</div> </div>

View file

@ -2,8 +2,6 @@
if (!defined('_GNUBOARD_')) if (!defined('_GNUBOARD_'))
exit; exit;
?> ?>
<div class="info"> <div class="info">
<div class="ui-thumb"> <div class="ui-thumb">
<img src="<?= $in['it_img'] ?>" /> <img src="<?= $in['it_img'] ?>" />

View file

@ -1,10 +1,7 @@
<?php <?php
if (!defined('_GNUBOARD_')) if (!defined('_GNUBOARD_'))
exit; exit;
?> ?><ul class="inventory-list">
<ul class="inventory-list">
<?php <?php
for ($i = 0; $i < count($inven_list); $i++) { ?> for ($i = 0; $i < count($inven_list); $i++) { ?>
<li class="box-line bak"> <li class="box-line bak">
@ -22,11 +19,5 @@ if (!defined('_GNUBOARD_'))
<?php } ?> <?php } ?>
</li> </li>
<?php } <?php }
if ($i == 0) {?><li class="no-data">보유중인 아이템이 없습니다.</li><?php } ?>
if ($i == 0) {
?>
<li class="no-data">
보유중인 아이템이 없습니다.
</li>
<?php } ?>
</ul> </ul>

View file

@ -15,6 +15,7 @@
* @note This program is distributed in the hope that it will be useful - WITHOUT * @note This program is distributed in the hope that it will be useful - WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. * FITNESS FOR A PARTICULAR PURPOSE.
* @suppress PHP0417
*/ */
/** /**
@ -1015,9 +1016,11 @@ class PHPMailer
$address = trim($address); $address = trim($address);
$name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
// Don't validate now addresses with IDN. Will be done in send(). // Don't validate now addresses with IDN. Will be done in send().
if (($pos = strrpos($address, '@')) === false or if (
($pos = strrpos($address, '@')) === false or
(!$this->has8bitChars(substr($address, ++$pos)) or !$this->idnSupported()) and (!$this->has8bitChars(substr($address, ++$pos)) or !$this->idnSupported()) and
!$this->validateAddress($address)) { !$this->validateAddress($address)
) {
$error_message = $this->lang('invalid_address') . " (setFrom) $address"; $error_message = $this->lang('invalid_address') . " (setFrom) $address";
$this->setError($error_message); $this->setError($error_message);
$this->edebug($error_message); $this->edebug($error_message);
@ -1183,16 +1186,20 @@ class PHPMailer
public function punyencodeAddress($address) public function punyencodeAddress($address)
{ {
// Verify we have required functions, CharSet, and at-sign. // Verify we have required functions, CharSet, and at-sign.
if ($this->idnSupported() and if (
$this->idnSupported() and
!empty($this->CharSet) and !empty($this->CharSet) and
($pos = strrpos($address, '@')) !== false) { ($pos = strrpos($address, '@')) !== false
) {
$domain = substr($address, ++$pos); $domain = substr($address, ++$pos);
// Verify CharSet string is a valid one, and domain properly encoded in this CharSet. // Verify CharSet string is a valid one, and domain properly encoded in this CharSet.
if ($this->has8bitChars($domain) and @mb_check_encoding($domain, $this->CharSet)) { if ($this->has8bitChars($domain) and @mb_check_encoding($domain, $this->CharSet)) {
$domain = mb_convert_encoding($domain, 'UTF-8', $this->CharSet); $domain = mb_convert_encoding($domain, 'UTF-8', $this->CharSet);
if (($punycode = defined('INTL_IDNA_VARIANT_UTS46') ? if (
($punycode = defined('INTL_IDNA_VARIANT_UTS46') ?
idn_to_ascii($domain, 0, INTL_IDNA_VARIANT_UTS46) : idn_to_ascii($domain, 0, INTL_IDNA_VARIANT_UTS46) :
idn_to_ascii($domain)) !== false) { idn_to_ascii($domain)) !== false
) {
return substr($address, 0, $pos) . $punycode; return substr($address, 0, $pos) . $punycode;
} }
} }
@ -1295,7 +1302,8 @@ class PHPMailer
} }
// Sign with DKIM if enabled // Sign with DKIM if enabled
if (!empty($this->DKIM_domain) if (
!empty($this->DKIM_domain)
and !empty($this->DKIM_selector) and !empty($this->DKIM_selector)
and (!empty($this->DKIM_private_string) and (!empty($this->DKIM_private_string)
or (!empty($this->DKIM_private) or (!empty($this->DKIM_private)
@ -1444,7 +1452,8 @@ class PHPMailer
protected static function isShellSafe($string) protected static function isShellSafe($string)
{ {
// Future-proof // Future-proof
if (escapeshellcmd($string) !== $string if (
escapeshellcmd($string) !== $string
or !in_array(escapeshellarg($string), array("'$string'", "\"$string\"")) or !in_array(escapeshellarg($string), array("'$string'", "\"$string\""))
) { ) {
return false; return false;
@ -1639,11 +1648,13 @@ class PHPMailer
foreach ($hosts as $hostentry) { foreach ($hosts as $hostentry) {
$hostinfo = array(); $hostinfo = array();
if (!preg_match( if (
!preg_match(
'/^((ssl|tls):\/\/)*([a-zA-Z0-9\.-]*|\[[a-fA-F0-9:]+\]):?([0-9]*)$/', '/^((ssl|tls):\/\/)*([a-zA-Z0-9\.-]*|\[[a-fA-F0-9:]+\]):?([0-9]*)$/',
trim($hostentry), trim($hostentry),
$hostinfo $hostinfo
)) { )
) {
// Not a valid host entry // Not a valid host entry
$this->edebug('Ignoring invalid host: ' . $hostentry); $this->edebug('Ignoring invalid host: ' . $hostentry);
continue; continue;
@ -1703,7 +1714,8 @@ class PHPMailer
$this->smtp->hello($hello); $this->smtp->hello($hello);
} }
if ($this->SMTPAuth) { if ($this->SMTPAuth) {
if (!$this->smtp->authenticate( if (
!$this->smtp->authenticate(
$this->Username, $this->Username,
$this->Password, $this->Password,
$this->AuthType, $this->AuthType,
@ -2074,7 +2086,8 @@ class PHPMailer
} }
// sendmail and mail() extract Bcc from the header before sending // sendmail and mail() extract Bcc from the header before sending
if (( if (
(
$this->Mailer == 'sendmail' or $this->Mailer == 'qmail' or $this->Mailer == 'mail' $this->Mailer == 'sendmail' or $this->Mailer == 'qmail' or $this->Mailer == 'mail'
) )
and count($this->bcc) > 0 and count($this->bcc) > 0
@ -2202,7 +2215,8 @@ class PHPMailer
* Create unique ID * Create unique ID
* @return string * @return string
*/ */
protected function generateId() { protected function generateId()
{
return md5(uniqid(time())); return md5(uniqid(time()));
} }
@ -3465,7 +3479,8 @@ class PHPMailer
if (strlen($directory) > 1 && substr($directory, -1) != '/') { if (strlen($directory) > 1 && substr($directory, -1) != '/') {
$directory .= '/'; $directory .= '/';
} }
if ($this->addEmbeddedImage( if (
$this->addEmbeddedImage(
$basedir . $directory . $filename, $basedir . $directory . $filename,
$cid, $cid,
$filename, $filename,
@ -3815,8 +3830,10 @@ class PHPMailer
} }
//Workaround for missing digest algorithms in old PHP & OpenSSL versions //Workaround for missing digest algorithms in old PHP & OpenSSL versions
//@link http://stackoverflow.com/a/11117338/333340 //@link http://stackoverflow.com/a/11117338/333340
if (version_compare(PHP_VERSION, '5.3.0') >= 0 and if (
in_array('sha256WithRSAEncryption', openssl_get_md_methods(true))) { version_compare(PHP_VERSION, '5.3.0') >= 0 and
in_array('sha256WithRSAEncryption', openssl_get_md_methods(true))
) {
if (openssl_sign($signHeader, $signature, $privKey, 'sha256WithRSAEncryption')) { if (openssl_sign($signHeader, $signature, $privKey, 'sha256WithRSAEncryption')) {
if (PHP_MAJOR_VERSION < 8) { if (PHP_MAJOR_VERSION < 8) {
openssl_pkey_free($privKey); openssl_pkey_free($privKey);