Единый загрузчик файлов
This commit is contained in:
parent
42714daeda
commit
7cfa75f09a
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
/.idea/
|
174
_incl_data/class/Uploader.php
Normal file
174
_incl_data/class/Uploader.php
Normal file
@ -0,0 +1,174 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Åäèíàÿ ôóíêöèÿ äëÿ çàëèâêè ôàéëîâ íà ñåðâåð.
|
||||||
|
*
|
||||||
|
* @version 1
|
||||||
|
* @author Ivor Barhansky <me@lopar.space>
|
||||||
|
*/
|
||||||
|
|
||||||
|
class Uploader
|
||||||
|
{
|
||||||
|
private $width = ['min' => 0, 'max' => 0];
|
||||||
|
private $height = ['min' => 0, 'max' => 0];
|
||||||
|
private $maxFileSizeMb;
|
||||||
|
private $savePath;
|
||||||
|
private $extensions = 'jpg|png|jpeg|gif';
|
||||||
|
private $extMatches = [];
|
||||||
|
private $FILE;
|
||||||
|
private $cnm = null;
|
||||||
|
public static $error;
|
||||||
|
|
||||||
|
public function __construct($name, $cnm = null)
|
||||||
|
{
|
||||||
|
$this->FILE = $_FILES;
|
||||||
|
if (!$this->FILE[$name]) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$this->cnm = $cnm;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param int $max
|
||||||
|
* @param int $min
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function setWidth($max, $min = null)
|
||||||
|
{
|
||||||
|
$this->width['min'] = is_null($min) ? $max : $min;
|
||||||
|
$this->width['max'] = $max;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param int $max
|
||||||
|
* @param int $min
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function setHeight($max, $min = null)
|
||||||
|
{
|
||||||
|
$this->height['min'] = is_null($min) ? $max : $min;
|
||||||
|
$this->height['max'] = $max;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $megabytes
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function setMaxFileSize($megabytes)
|
||||||
|
{
|
||||||
|
$this->maxFileSizeMb = $megabytes * (1024 * 1024);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $path ïóòü îò êîðíÿ äî êîíå÷íîé ïàïêè áåç îòêðûâàþùåãî ñëåøà.
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function setSavePath($path)
|
||||||
|
{
|
||||||
|
$this->savePath = __DIR__ . '/' . $path;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string|array $ext
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function setExtentions($ext)
|
||||||
|
{
|
||||||
|
if (is_array($ext)) {
|
||||||
|
$arr = $ext;
|
||||||
|
} else {
|
||||||
|
$arr[] = $ext;
|
||||||
|
}
|
||||||
|
if (!$arr) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$this->extensions = implode('|', $arr);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param int $width
|
||||||
|
* @param int $height
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function setDimensions($width, $height)
|
||||||
|
{
|
||||||
|
$this->setWidth($width);
|
||||||
|
$this->setHeight($height);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function hasNormalDimensions()
|
||||||
|
{
|
||||||
|
list($width, $height) = getimagesize($this->FILE['tmp_name']);
|
||||||
|
if (
|
||||||
|
$width < $this->width['min'] ||
|
||||||
|
$width > $this->width['max'] ||
|
||||||
|
$height < $this->height['min'] ||
|
||||||
|
$height > $this->height['max']
|
||||||
|
) {
|
||||||
|
self::$error = "Òðåáîâàíèÿ ê ðàçìåðó [{$this->width['max']}x{$this->height['max']}] íå ñîáëþäåíû.";
|
||||||
|
if ($this->width['min'] !== $this->width['max'] || $this->height['min'] !== $this->height['max']) {
|
||||||
|
self::$error .= " Ìèíèìóì [{$this->width['min']}x{$this->height['min']}].";
|
||||||
|
}
|
||||||
|
self::$error .= " <span style='color:red;'>[{$width}x$height]</span>";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function hasNormalFileSize()
|
||||||
|
{
|
||||||
|
if (!$this->maxFileSizeMb) {
|
||||||
|
$this->setMaxFileSize(2);
|
||||||
|
}
|
||||||
|
if ($this->FILE['size'] > $this->maxFileSizeMb || $this->FILE['size'] <=0) {
|
||||||
|
self::$error = 'Íåâåðíûé ðàçìåð ôàéëà. Ìàêñèìàëüíûé ðàçìåð ôàéëà ' . $this->maxFileSizeMb . ' ÌÁ';
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function hasNormalType()
|
||||||
|
{
|
||||||
|
if (
|
||||||
|
!preg_match('/\.(' . $this->extensions . ')$/i', $this->FILE['name'], $this->extMatches) ||
|
||||||
|
!preg_match('/image/i', $this->FILE['type'])
|
||||||
|
) {
|
||||||
|
self::$error = 'Íåâåðíûé òèï ôàéëà. Äîïóñòèìûå òèïû : ' . $this->extensions;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function hasNormalFilePath()
|
||||||
|
{
|
||||||
|
if (!$this->savePath || !is_dir($this->savePath)) {
|
||||||
|
self::$error = 'Îøèáêà çàãðóçêè: íåò òàêîé ïàïêè.';
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function upload()
|
||||||
|
{
|
||||||
|
$this->extMatches[1] = strtolower($this->extMatches[1]);
|
||||||
|
$fn = uniqid('f_', true) . '.' . $this->extMatches[1];
|
||||||
|
$fn2 = uniqid('f_', true) . '.gif';
|
||||||
|
if ($this->cnm) {
|
||||||
|
$fn = $this->cnm;
|
||||||
|
$fn2 = $this->cnm;
|
||||||
|
}
|
||||||
|
if (!move_uploaded_file($this->FILE['tmp_name'], $this->savePath . $fn)) {
|
||||||
|
self::$error = 'Îøèáêà çàãðóçêè ôàéëà';
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return [$fn2, $fn, $this->savePath . $fn];
|
||||||
|
}
|
||||||
|
|
||||||
|
function saveimg()
|
||||||
|
{
|
||||||
|
return $this->hasNormalFilePath() &&
|
||||||
|
$this->hasNormalDimensions() &&
|
||||||
|
$this->hasNormalFileSize() &&
|
||||||
|
$this->hasNormalType() ? $this->upload() : false;
|
||||||
|
}
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,83 +1,31 @@
|
|||||||
<?
|
<?php
|
||||||
if(!defined('GAME'))
|
if (!defined('GAME')) {
|
||||||
{
|
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
if($u->room['file']=='a_clanreg')
|
if ($u->room['file'] != 'a_clanreg') {
|
||||||
{
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
function alignc($al)
|
function alignc($al)
|
||||||
{
|
{
|
||||||
if ($al==1){$value="(ñâåòëûé)";}
|
if ($al == 1) {
|
||||||
elseif ($al==3){$value="(òåìíûé)";}
|
$value = "(ñâåòëûé)";
|
||||||
elseif ($al==7){$value="(íåéòðàëüíûé)";}
|
} elseif ($al == 3) {
|
||||||
else {$value="(ñåðûé)";}
|
$value = "(òåìíûé)";
|
||||||
|
} elseif ($al == 7) {
|
||||||
|
$value = "(íåéòðàëüíûé)";
|
||||||
|
} else {
|
||||||
|
$value = "(ñåðûé)";
|
||||||
|
}
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
// êëàññ çàãðóçêè ôàéëîâ
|
|
||||||
|
|
||||||
class upload {
|
$lzv = mysql_fetch_array(
|
||||||
|
mysql_query('SELECT * FROM `_clan` WHERE `uid` = "' . $u->info['id'] . '" AND `admin_time` = "0" LIMIT 1')
|
||||||
protected function __construct() { }
|
);
|
||||||
|
|
||||||
static $save_path = 'clan_prw/';
|
|
||||||
static $error = '';
|
|
||||||
|
|
||||||
static function saveimg($name,$max_mb = 2,$exts = 'jpg|png|jpeg|gif',$cnm = '',$mnw = 0,$mxw = 0,$mnh = 0,$mxh = 0) {
|
|
||||||
if (isset($_FILES[$name])) {
|
|
||||||
$f = &$_FILES[$name];
|
|
||||||
|
|
||||||
if(isset($f['tmp_name'])) {
|
|
||||||
$width = 0;
|
|
||||||
$height = 0;
|
|
||||||
list($width, $height) = getimagesize($f['tmp_name']);
|
|
||||||
}
|
|
||||||
|
|
||||||
if( $mnw != 0 && $mnw > $width ) {
|
|
||||||
self::$error = 'Ìèíèìàëüíàÿ øèðèíà êàðòèíêè '.$mnw.' ïèêñåëåé. (Ðàçìåð ýòîé êàðòèíêè '.$width.'x'.$height.')';
|
|
||||||
}elseif( $mxw != 0 && $mxw < $width ) {
|
|
||||||
self::$error = 'Ìàêñèìàëüíàÿ øèðèíà êàðòèíêè '.$mxw.' ïèêñåëåé. (Ðàçìåð ýòîé êàðòèíêè '.$width.'x'.$height.')';
|
|
||||||
}elseif( $mnh != 0 && $mnh > $height ) {
|
|
||||||
self::$error = 'Ìèíèìàëüíàÿ âûñîòà êàðòèíêè '.$mnh.' ïèêñåëåé. (Ðàçìåð ýòîé êàðòèíêè '.$width.'x'.$height.')';
|
|
||||||
}elseif( $mxh != 0 && $mxh < $height ) {
|
|
||||||
self::$error = 'Ìàêñèìàëüíàÿ âûñîòà êàðòèíêè '.$mxh.' ïèêñåëåé. (Ðàçìåð ýòîé êàðòèíêè '.$width.'x'.$height.')';
|
|
||||||
}elseif (($f['size'] <= $max_mb*1024*1024) && ($f['size'] > 0)) {
|
|
||||||
if (
|
|
||||||
(preg_match('/\.('.$exts.')$/i',$f['name'],$ext))&&
|
|
||||||
(preg_match('/image/i',$f['type']))
|
|
||||||
) {
|
|
||||||
|
|
||||||
$ext[1] = strtolower($ext[1]);
|
|
||||||
$fn = uniqid('f_',true).'.'.$ext[1];
|
|
||||||
$fn2 = uniqid('f_',true).'.gif';
|
|
||||||
if (move_uploaded_file($f['tmp_name'], self::$save_path . $fn)) {
|
|
||||||
// ñèñòåìà èçìåíåíèÿ ðàçìåðà , òðåáóåòñÿ Rimage
|
|
||||||
//Rimage::resize(self::$save_path . $fn, self::$save_path . $fn2);
|
|
||||||
//@unlink(self::$save_path . $fn); // óäàëåíèå ôàéëà
|
|
||||||
return array($fn2,$fn,self::$save_path . $fn);
|
|
||||||
} else {
|
|
||||||
self::$error = 'Îøèáêà çàãðóçêè ôàéëà';
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
self::$error = 'Íåâåðíûé òèï ôàéëà. Äîïóñòèìûå òèïû : <b>'.$exts.'</b>';
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
self::$error = 'Íåâåðíûé ðàçìåð ôàéëà. Ìàêñèìàëüíûé ðàçìåð ôàéëà <b>'.$max_mb.' ÌÁ</b>';
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
self::$error = 'Ôàéë íå íàéäåí';
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
} // end saveimg
|
|
||||||
} // end class
|
|
||||||
|
|
||||||
$lzv = mysql_fetch_array(mysql_query('SELECT * FROM `_clan` WHERE `uid` = "'.$u->info['id'].'" AND `admin_time` = "0" LIMIT 1'));
|
|
||||||
/*Çàÿâêà íà âñòóïëåíèå*/
|
/*Çàÿâêà íà âñòóïëåíèå*/
|
||||||
|
|
||||||
if(isset($_POST['clan_enter']))
|
if (isset($_POST['clan_enter'])) {
|
||||||
{
|
|
||||||
|
|
||||||
mysql_query('UPDATE `users` SET `clan_zv`= "' . $_POST['clan_enter'] . '" WHERE `id` = "' . $u->info['id'] . '" ');
|
mysql_query('UPDATE `users` SET `clan_zv`= "' . $_POST['clan_enter'] . '" WHERE `id` = "' . $u->info['id'] . '" ');
|
||||||
|
|
||||||
@ -85,9 +33,6 @@ if(isset($_POST['clan_enter']))
|
|||||||
|
|
||||||
/* Ðåãèñòðàöèÿ êëàíà */
|
/* Ðåãèñòðàöèÿ êëàíà */
|
||||||
if (isset($_POST['clan_name'])) {
|
if (isset($_POST['clan_name'])) {
|
||||||
/*if($_POST['clan_align'] != 0) {
|
|
||||||
$_POST['clan_align'] = 0;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
$tr_money2 = 0;
|
$tr_money2 = 0;
|
||||||
if ($_POST['clan_align'] == 1) {
|
if ($_POST['clan_align'] == 1) {
|
||||||
@ -101,18 +46,22 @@ if(isset($_POST['clan_name'])) {
|
|||||||
$_POST['clan_align'] = 7;
|
$_POST['clan_align'] = 7;
|
||||||
}
|
}
|
||||||
|
|
||||||
$clan_name = substr(htmlspecialchars($_POST['clan_name'],NULL,'cp1251'), 0, 30);
|
$clan_name = substr(htmlspecialchars($_POST['clan_name'], null, 'cp1251'), 0, 30);
|
||||||
|
|
||||||
$cnt = mysql_fetch_array(mysql_query('SELECT * FROM `clan` WHERE `name` = "'.mysql_real_escape_string($clan_name).'" LIMIT 1'));
|
$cnt = mysql_fetch_array(
|
||||||
|
mysql_query('SELECT * FROM `clan` WHERE `name` = "' . mysql_real_escape_string($clan_name) . '" LIMIT 1')
|
||||||
|
);
|
||||||
|
|
||||||
|
$upload = new Uploader($clan_name);
|
||||||
|
$upload->setMaxFileSize(.3);
|
||||||
|
$upload->setDimensions(24, 15);
|
||||||
|
$upload->setExtentions('gif');
|
||||||
|
$upload->setSavePath('clan_prw/');
|
||||||
|
|
||||||
if (isset($cnt['id'])) {
|
if (isset($cnt['id'])) {
|
||||||
$re = 'Êëàí ñ íàçâàíèåì "' . $cnt['name'] . '" óæå çàðåãèñòðèðîâàí.';
|
$re = 'Êëàí ñ íàçâàíèåì "' . $cnt['name'] . '" óæå çàðåãèñòðèðîâàí.';
|
||||||
}elseif(true == false) {
|
|
||||||
$re = 'Ðåãèñòðàöèÿ êëàíîâ âðåìåííî íå ðàáîòàåò.';
|
|
||||||
} elseif (isset($lzv['id'])) {
|
} elseif (isset($lzv['id'])) {
|
||||||
$re = 'Âû óæå ïîäàëè çàÿâêó íà ðåãèñòðàöèþ êëàíà, îæèäàéòå îòâåòà îò àäìèíèñòðàöèè';
|
$re = 'Âû óæå ïîäàëè çàÿâêó íà ðåãèñòðàöèþ êëàíà, îæèäàéòå îòâåòà îò àäìèíèñòðàöèè';
|
||||||
//}elseif( $u->testAlign($_POST['clan_align'],$u->info['id']) == 0 ) {
|
|
||||||
//$re = 'Âû íå ìîæåòå çàðåãèñòðèðîâàòü êëàí ñ äàííîé ñêëîííîñòüþ. (Äåéñòâóåò îãðàíè÷åíèå íà âûáîð ñêëîííîñòè äëÿ âàøåãî ïåðñîíàæà)';
|
|
||||||
} elseif ($tr_money2 > $u->info['money2']) {
|
} elseif ($tr_money2 > $u->info['money2']) {
|
||||||
$re = 'Ó âàñ íå õâàòàåò äåíåã, òðåáóåòñÿ ' . $tr_money2 . 'åêð.';
|
$re = 'Ó âàñ íå õâàòàåò äåíåã, òðåáóåòñÿ ' . $tr_money2 . 'åêð.';
|
||||||
} elseif ($u->info['clan'] > 0) {
|
} elseif ($u->info['clan'] > 0) {
|
||||||
@ -121,103 +70,118 @@ if(isset($_POST['clan_name'])) {
|
|||||||
$re = 'Ïåðñîíàæè ñî ñêëîííîñòüþ íå ìîãóò ñîçäàâàòü êëàí, èçáàâüòåñü îò íå¸';
|
$re = 'Ïåðñîíàæè ñî ñêëîííîñòüþ íå ìîãóò ñîçäàâàòü êëàí, èçáàâüòåñü îò íå¸';
|
||||||
} else {
|
} else {
|
||||||
/* çàíîñèì äàííûå â áàçó */
|
/* çàíîñèì äàííûå â áàçó */
|
||||||
//$clan_name = str_replace('.','',$clan_name);
|
|
||||||
//$clan_name = str_replace(' ','',$clan_name);
|
|
||||||
//$clan_name = str_replace(' ','',$clan_name);
|
|
||||||
if (!preg_match("/^[-a-zA-Z0-9]+$/", $clan_name)) {
|
if (!preg_match("/^[-a-zA-Z0-9]+$/", $clan_name)) {
|
||||||
$re = 'Â íàçâàíèè êëàíà ïðèñóòñòâóþò çàïðåùåííûå ñèìâîëû.';
|
$re = 'Â íàçâàíèè êëàíà ïðèñóòñòâóþò çàïðåùåííûå ñèìâîëû.';
|
||||||
}elseif($file = upload::saveimg('clan_img1',0.3,'gif',$clan_name,24,24,15,15)) {
|
} elseif ($file = $upload->saveimg()) {
|
||||||
//if($file2 = upload::saveimg('clan_img2',0.5,'gif',$clan_name)) {
|
|
||||||
if ($tr_money2 < 0) {
|
if ($tr_money2 < 0) {
|
||||||
$tr_money2 = 0;
|
$tr_money2 = 0;
|
||||||
}
|
}
|
||||||
$u->info['money2'] -= $tr_money2;
|
$u->info['money2'] -= $tr_money2;
|
||||||
|
|
||||||
mysql_query('UPDATE `users` SET `money2` = "'.$u->info['money2'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
mysql_query(
|
||||||
mysql_query('INSERT INTO `_clan` (`uid`,`time`,`city`,`name`,`name2`,`site`,`img1`,`img2`,`info`,`money`,`align`) VALUES (
|
'UPDATE `users` SET `money2` = "' . $u->info['money2'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'
|
||||||
|
);
|
||||||
|
mysql_query(
|
||||||
|
'INSERT INTO `_clan` (`uid`,`time`,`city`,`name`,`name2`,`site`,`img1`,`img2`,`info`,`money`,`align`) VALUES (
|
||||||
"' . $u->info['id'] . '","' . time() . '",
|
"' . $u->info['id'] . '","' . time() . '",
|
||||||
"' . $u->info['city'] . '",
|
"' . $u->info['city'] . '",
|
||||||
"'.mysql_real_escape_string(htmlspecialchars($_POST['clan_name'],NULL,'cp1251')).'",
|
"' . mysql_real_escape_string(htmlspecialchars($_POST['clan_name'], null, 'cp1251')) . '",
|
||||||
"'.mysql_real_escape_string(htmlspecialchars($_POST['clan_name'],NULL,'cp1251')).'",
|
"' . mysql_real_escape_string(htmlspecialchars($_POST['clan_name'], null, 'cp1251')) . '",
|
||||||
"'.mysql_real_escape_string(htmlspecialchars($_POST['clan_site'],NULL,'cp1251')).'",
|
"' . mysql_real_escape_string(htmlspecialchars($_POST['clan_site'], null, 'cp1251')) . '",
|
||||||
"'.mysql_real_escape_string(htmlspecialchars($file[1],NULL,'cp1251')).'",
|
"' . mysql_real_escape_string(htmlspecialchars($file[1], null, 'cp1251')) . '",
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
"' . $tr_money2 . '",
|
"' . $tr_money2 . '",
|
||||||
"'.mysql_real_escape_string(htmlspecialchars($_POST['clan_align'],NULL,'cp1251')).'"
|
"' . mysql_real_escape_string(htmlspecialchars($_POST['clan_align'], null, 'cp1251')) . '"
|
||||||
)');
|
)'
|
||||||
$lzv = array(
|
|
||||||
'id' => mysql_insert_id(),
|
|
||||||
'name' => htmlspecialchars($_POST['clan_name'],NULL,'cp1251'),
|
|
||||||
'time' => time()
|
|
||||||
);
|
);
|
||||||
$re = 'Âû óñïåøíî ïîäàëè çàÿâêó íà ðåãèñòðàöèþ êëàíà "'.htmlspecialchars($_POST['clan_name'],NULL,'cp1251').'". ('.$tr_money2.'åêð.)';
|
$lzv = [
|
||||||
//}else{
|
'id' => mysql_insert_id(),
|
||||||
// @unlink($file[2]); // óäàëåíèå ôàéëà
|
'name' => htmlspecialchars($_POST['clan_name'], null, 'cp1251'),
|
||||||
// $re = 'Áîëüøîé çíà÷îê: '.upload::$error;
|
'time' => time(),
|
||||||
//}
|
];
|
||||||
|
$re = 'Âû óñïåøíî ïîäàëè çàÿâêó íà ðåãèñòðàöèþ êëàíà "' . htmlspecialchars(
|
||||||
|
$_POST['clan_name'], null, 'cp1251'
|
||||||
|
) . '". (' . $tr_money2 . 'åêð.)';
|
||||||
} else {
|
} else {
|
||||||
$re = 'Ìàëåíüêèé çíà÷îê: '.upload::$error;
|
$re = 'Ìàëåíüêèé çíà÷îê: ' . Uploader::$error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<style>
|
<style>
|
||||||
body
|
body {
|
||||||
{
|
|
||||||
background-color: #E2E2E2;
|
background-color: #E2E2E2;
|
||||||
background-image: url(https://img.new-combats.com/i/misc/showitems/dungeon.jpg);
|
background-image: url(https://img.new-combats.com/i/misc/showitems/dungeon.jpg);
|
||||||
background-repeat:no-repeat;background-position:top right;
|
background-repeat: no-repeat;
|
||||||
|
background-position: top right;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td><div style="padding-left:0px;" align="center">
|
<td>
|
||||||
|
<div style="padding-left:0px;" align="center">
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<h3>Çàÿâêà íà ðåãèñòðàöèþ êëàíà</h3>
|
<h3>Çàÿâêà íà ðåãèñòðàöèþ êëàíà</h3>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
</div>
|
</div>
|
||||||
<?
|
<?php
|
||||||
if ($re != '') {
|
if ($re != '') {
|
||||||
echo '<font style="float:left" color="red"><b>' . $re . '</b></font>';
|
echo '<font style="float:left" color="red"><b>' . $re . '</b></font>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
<td width="200"><div align="right">
|
<td width="200">
|
||||||
|
<div align="right">
|
||||||
<table cellspacing="0" cellpadding="0">
|
<table cellspacing="0" cellpadding="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td width="100%"> </td>
|
<td width="100%"> </td>
|
||||||
<td><table border="0" cellpadding="0" cellspacing="0">
|
<td>
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0">
|
||||||
<tr align="right" valign="top">
|
<tr align="right" valign="top">
|
||||||
<td><!-- -->
|
<td><!-- -->
|
||||||
<? echo $goLis; ?>
|
<?php echo $goLis; ?>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<table border="0" cellspacing="0" cellpadding="0">
|
<table border="0" cellspacing="0" cellpadding="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td nowrap="nowrap"><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DEDEDE">
|
<td nowrap="nowrap">
|
||||||
|
<table width="100%" border="0" cellpadding="0" cellspacing="1"
|
||||||
|
bgcolor="#DEDEDE">
|
||||||
<tr>
|
<tr>
|
||||||
<td bgcolor="#D3D3D3"><img src="https://img.new-combats.com/i/move/links.gif" width="9" height="7" /></td>
|
<td bgcolor="#D3D3D3"><img
|
||||||
<td bgcolor="#D3D3D3" nowrap="nowrap"><a href="javascript:void(0)" id="greyText" class="menutop" onClick="location='main.php?loc=1.180.0.11&rnd=<? echo $code; ?>';" title="<? thisInfRm('1.180.0.11',1); ?>">Ñòðàøèëêèíà óëèöà</a></td>
|
src="https://img.new-combats.com/i/move/links.gif"
|
||||||
</tr>
|
width="9" height="7"/></td>
|
||||||
</table></td>
|
<td bgcolor="#D3D3D3" nowrap="nowrap"><a
|
||||||
</tr>
|
href="javascript:void(0)" id="greyText"
|
||||||
</table></td>
|
class="menutop"
|
||||||
</tr>
|
onClick="location='main.php?loc=1.180.0.11&rnd=<?php echo $code; ?>';"
|
||||||
</table></td>
|
title="<?php thisInfRm(
|
||||||
|
'1.180.0.11', 1
|
||||||
|
); ?>">Ñòðàøèëêèíà óëèöà</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div></td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<?
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<?php
|
||||||
if ($u->info['clan'] > 0) {
|
if ($u->info['clan'] > 0) {
|
||||||
$clan = mysql_fetch_array(mysql_query('SELECT * FROM `clan` WHERE `id` = "' . $u->info['clan'] . '" LIMIT 1'));
|
$clan = mysql_fetch_array(mysql_query('SELECT * FROM `clan` WHERE `id` = "' . $u->info['clan'] . '" LIMIT 1'));
|
||||||
?>
|
?>
|
||||||
Âû óæå ñîñòîèòå â êëàíå <b><?= $clan['name'] ?></b> è íå ìîæåòå ïîäàòü çàÿâêó íà ðåãèñòðàöèþ íîâîãî êëàíà.<br><br>
|
Âû óæå ñîñòîèòå â êëàíå <b><?= $clan['name'] ?></b> è íå ìîæåòå ïîäàòü çàÿâêó íà ðåãèñòðàöèþ íîâîãî êëàíà.<br><br>
|
||||||
<fieldset style="line-height:1.5em;border-color:#fff;">
|
<fieldset style="line-height:1.5em;border-color:#fff;">
|
||||||
<legend><h3>Êëàíîâûå âîéíû</h3></legend>
|
<legend><h3>Êëàíîâûå âîéíû</h3></legend>
|
||||||
<?
|
<?php
|
||||||
if ($u->info['clan_prava'] == 'glava') {
|
if ($u->info['clan_prava'] == 'glava') {
|
||||||
echo 'Íåò íè îäíîé âîéíû, íî âû ìîæåòå îáüÿâèòü å¸!';
|
echo 'Íåò íè îäíîé âîéíû, íî âû ìîæåòå îáüÿâèòü å¸!';
|
||||||
} else {
|
} else {
|
||||||
@ -225,15 +189,18 @@ if( $u->info['clan'] > 0 ) {
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<? }else{ ?>
|
<?php } else { ?>
|
||||||
<table width="100%" border="0" cellspacing="0" cellpadding="10">
|
<table width="100%" border="0" cellspacing="0" cellpadding="10">
|
||||||
<tr>
|
<tr>
|
||||||
<td><p>Òðåáîâàíèÿ ê çíà÷êó: ðàçìåð (Øõ â ïèêñåëÿõ) 24õ15, ãðàôè÷åñêèé òèï GIF, ðàçìåð äî 30êá.</p>
|
<td><p>Òðåáîâàíèÿ ê çíà÷êó: ðàçìåð (Øõ â ïèêñåëÿõ) 24õ15, ãðàôè÷åñêèé òèï GIF, ðàçìåð äî 30êá.</p>
|
||||||
<p>
|
<p>
|
||||||
Ñòîèìîñòü ðåãèñòðàöèè êëàíîâ:<br>
|
Ñòîèìîñòü ðåãèñòðàöèè êëàíîâ:<br>
|
||||||
<img src="https://img.new-combats.com/i/align/align7.gif" width="12" height="15"> íåéòðàëüíûé - 50 åêð.<br>
|
<img src="https://img.new-combats.com/i/align/align7.gif" width="12" height="15"> íåéòðàëüíûé - 50
|
||||||
<img src="https://img.new-combats.com/i/align/align1.gif" width="12" height="15"> ñâåòëûé - 50 åêð.<br>
|
åêð.<br>
|
||||||
<img src="https://img.new-combats.com/i/align/align3.gif" width="12" height="15"> ò¸ìíûé - 50 åêð.<br>
|
<img src="https://img.new-combats.com/i/align/align1.gif" width="12" height="15"> ñâåòëûé - 50
|
||||||
|
åêð.<br>
|
||||||
|
<img src="https://img.new-combats.com/i/align/align3.gif" width="12" height="15"> ò¸ìíûé - 50
|
||||||
|
åêð.<br>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Çàÿâêà íà ðåãèñòðàöèþ ïîäàåò áóäóùèé ãëàâà êëàíà, ó êîòîðîãî äîëæíà áûòü ïðè ñåáå íåîáõîäèìàÿ ñóììà.
|
Çàÿâêà íà ðåãèñòðàöèþ ïîäàåò áóäóùèé ãëàâà êëàíà, ó êîòîðîãî äîëæíà áûòü ïðè ñåáå íåîáõîäèìàÿ ñóììà.
|
||||||
@ -246,12 +213,13 @@ if( $u->info['clan'] > 0 ) {
|
|||||||
<fieldset style="line-height:1.5em;border-color:#fff;">
|
<fieldset style="line-height:1.5em;border-color:#fff;">
|
||||||
<legend><h3>Çàÿâêà íà ðåãèñòðàöèþ êëàíà</h3>
|
<legend><h3>Çàÿâêà íà ðåãèñòðàöèþ êëàíà</h3>
|
||||||
</legend>
|
</legend>
|
||||||
<? if(!isset($lzv['id'])) { ?>
|
<?php if (!isset($lzv['id'])) { ?>
|
||||||
Íàçâàíèå êëàíà (òîëüêî àíãëèéñêèå áóêâû èëè öèôðû, îäíî ñëîâî):
|
Íàçâàíèå êëàíà (òîëüêî àíãëèéñêèå áóêâû èëè öèôðû, îäíî ñëîâî):
|
||||||
<input class="rd4" name="clan_name" type="text" value="" size="50" maxlength="50"/>
|
<input class="rd4" name="clan_name" type="text" value="" size="50" maxlength="50"/>
|
||||||
<br/>
|
<br/>
|
||||||
Êëàí ñàéò (íåîáÿçàòåëüíî Ïðèìåð https://new-combats.com/):
|
Êëàí ñàéò (íåîáÿçàòåëüíî Ïðèìåð https://new-combats.com/):
|
||||||
<input class="rd4" name="clan_site" type="text" value="https://new-combats.com/" size="50" maxlength="50" />
|
<input class="rd4" name="clan_site" type="text" value="https://new-combats.com/" size="50"
|
||||||
|
maxlength="50"/>
|
||||||
<br/>
|
<br/>
|
||||||
Çíà÷îê
|
Çíà÷îê
|
||||||
<input type="file" name="clan_img1" id="clan_img1"/>
|
<input type="file" name="clan_img1" id="clan_img1"/>
|
||||||
@ -264,9 +232,12 @@ if( $u->info['clan'] > 0 ) {
|
|||||||
</select>
|
</select>
|
||||||
<br/>
|
<br/>
|
||||||
<input type="submit" name="button" id="button" class="btn" value="Ïîäàòü çàÿâêó"/>
|
<input type="submit" name="button" id="button" class="btn" value="Ïîäàòü çàÿâêó"/>
|
||||||
<? }else{ ?>
|
<?php } else { ?>
|
||||||
<?=date('d.m.Y H:i',$lzv['time'])?> Âû óæå ïîäàëè çàÿâêó íà ðåãèñòðàöèþ êëàíà "<b><?=$lzv['name']?></b>". Îæèäàéòå îòâåòà îò Àäìèíèñòðàöèè.
|
<?= date(
|
||||||
<? } ?>
|
'd.m.Y H:i', $lzv['time']
|
||||||
|
) ?> Âû óæå ïîäàëè çàÿâêó íà ðåãèñòðàöèþ êëàíà "
|
||||||
|
<b><?= $lzv['name'] ?></b>". Îæèäàéòå îòâåòà îò Àäìèíèñòðàöèè.
|
||||||
|
<?php } ?>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
@ -274,24 +245,30 @@ if( $u->info['clan'] > 0 ) {
|
|||||||
<form action="main.php?go_psh=1" method="post" enctype="multipart/form-data" name="form2" id="form1">
|
<form action="main.php?go_psh=1" method="post" enctype="multipart/form-data" name="form2" id="form1">
|
||||||
<fieldset style="line-height:1.5em;border-color:#fff;">
|
<fieldset style="line-height:1.5em;border-color:#fff;">
|
||||||
<legend><h3>Çàÿâêà íà âñòóïëåíèå â êëàí</h3> <!--ÒÓÒ--></legend>
|
<legend><h3>Çàÿâêà íà âñòóïëåíèå â êëàí</h3> <!--ÒÓÒ--></legend>
|
||||||
<?
|
<?php
|
||||||
$clnt = mysql_fetch_array(mysql_query('SELECT `clan_zv` FROM `users` WHERE `id` = "'.$u->info['id'].'" LIMIT 1'));
|
$clnt = mysql_fetch_array(
|
||||||
if ($clnt['clan_zv']!=0)
|
mysql_query('SELECT `clan_zv` FROM `users` WHERE `id` = "' . $u->info['id'] . '" LIMIT 1')
|
||||||
{
|
);
|
||||||
$clnn = mysql_fetch_array(mysql_query('SELECT * FROM `clan` WHERE `id` = "'.$clnt['clan_zv'].'" LIMIT 1'));
|
if ($clnt['clan_zv'] != 0) {
|
||||||
echo 'Âû ïîäàëè çàÿâêó â êëàí '.$clnn['name'].' '.alignc($clnn['align']).' '.$tmpc.'<br>';
|
$clnn = mysql_fetch_array(
|
||||||
|
mysql_query('SELECT * FROM `clan` WHERE `id` = "' . $clnt['clan_zv'] . '" LIMIT 1')
|
||||||
|
);
|
||||||
|
echo 'Âû ïîäàëè çàÿâêó â êëàí ' . $clnn['name'] . ' ' . alignc(
|
||||||
|
$clnn['align']
|
||||||
|
) . ' ' . $tmpc . '<br>';
|
||||||
echo 'Îæèäàéòå ðàññìîòðåíèÿ âàøåé çàÿâêè. Åñëè ðåøåíèÿ äîëãî íåò ïðîñòî âûáèðèòå èç ñïèñêà äðóãîé êëàí.<br>';
|
echo 'Îæèäàéòå ðàññìîòðåíèÿ âàøåé çàÿâêè. Åñëè ðåøåíèÿ äîëãî íåò ïðîñòî âûáèðèòå èç ñïèñêà äðóãîé êëàí.<br>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
Âûáèðèòå êëàí:
|
Âûáèðèòå êëàí:
|
||||||
<br>
|
<br>
|
||||||
<select class="rd4" name="clan_enter">
|
<select class="rd4" name="clan_enter">
|
||||||
<?
|
<?php
|
||||||
$sp = mysql_query('SELECT * FROM `clan` WHERE 1 ORDER BY `clan`.`exp` DESC');
|
$sp = mysql_query('SELECT * FROM `clan` WHERE 1 ORDER BY `clan`.`exp` DESC');
|
||||||
while($pl = mysql_fetch_array($sp))
|
while ($pl = mysql_fetch_array($sp)) {
|
||||||
{
|
|
||||||
|
|
||||||
echo '<option name="'.$pl['id'].'" value="'.$pl['id'].'">'.$pl['name'].' '.alignc($pl['align']).'</option>';
|
echo '<option name="' . $pl['id'] . '" value="' . $pl['id'] . '">' . $pl['name'] . ' ' . alignc(
|
||||||
|
$pl['align']
|
||||||
|
) . '</option>';
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@ -308,7 +285,7 @@ if( $u->info['clan'] > 0 ) {
|
|||||||
Ïðè ïîäà÷å çàÿâêè ñ âàñ ñíèìàåòñÿ ñóììà íåîáõîäèìàÿ äëÿ ðåãèñòðàöèè êëàíà.<br>
|
Ïðè ïîäà÷å çàÿâêè ñ âàñ ñíèìàåòñÿ ñóììà íåîáõîäèìàÿ äëÿ ðåãèñòðàöèè êëàíà.<br>
|
||||||
 ñëó÷àè îòêàçà â ðåãèñòðàöèè êëàíà (ïî ëþáîé ïðè÷èíå), åâðîêðåäèòû âîçâðàùàþòñÿ ïåðñîíàæó.<br>
|
 ñëó÷àè îòêàçà â ðåãèñòðàöèè êëàíà (ïî ëþáîé ïðè÷èíå), åâðîêðåäèòû âîçâðàùàþòñÿ ïåðñîíàæó.<br>
|
||||||
Àäìèíèñòðàöèÿ âïðàâå îòêàçàòü â ðåãèñòðàöèè áåç îáúÿñíåíèÿ ïðè÷èí.<br>
|
Àäìèíèñòðàöèÿ âïðàâå îòêàçàòü â ðåãèñòðàöèè áåç îáúÿñíåíèÿ ïðè÷èí.<br>
|
||||||
<b>Ïðè ðåãèñòðàöèè êëàíà, ãëàâà êëàíà â òå÷åíèè 60 äíåé íå èìååò ïðàâî ïåðåäàâàòü ñâî¸ ãëàâåíñòâî äðóãîìó èãðîêó.</b>
|
<b>Ïðè ðåãèñòðàöèè êëàíà, ãëàâà êëàíà â òå÷åíèè 60 äíåé íå èìååò ïðàâî ïåðåäàâàòü ñâî¸ ãëàâåíñòâî äðóãîìó
|
||||||
|
èãðîêó.</b>
|
||||||
</p>
|
</p>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
<? } ?>
|
|
Loading…
Reference in New Issue
Block a user