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


PHP setLocation函数代码示例

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


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

示例1: start_chaos

function start_chaos($tur)
{
    global $char;
    //все места заняты - начинаем бой
    //создаем бой
    $combat_type = 11;
    $uid = create_combat($combat_type, $char['map_name'], $char['map_xpos'], $char['map_ypos'], $tur['format']);
    //закидываем туда игроков рандомно
    $sel_users = myquery("SELECT game_users_active_host.host_more,game_users_active.host,game_turnir_users.side,view_active_users.*,game_users_data.sex FROM game_turnir_users,view_active_users,game_users_data,game_users_active,game_users_active_host WHERE game_users_data.user_id=game_turnir_users.user_id AND game_turnir_users.user_id=view_active_users.user_id AND game_turnir_users.turnir_id=" . $tur['id'] . " AND game_users_active.user_id=view_active_users.user_id AND game_users_active_host.user_id=view_active_users.user_id ORDER BY RAND()");
    $user_side = 2;
    while ($us = mysql_fetch_array($sel_users)) {
        $user_side = 3 - $user_side;
        $hod = 1;
        $join = 0;
        $svit = 0;
        $k_komu = 0;
        $k_exp = 1;
        $k_gp = 0;
        $skill = 0;
        $func = 5;
        $delay = 44;
        $no_rejoin = 1;
        combat_insert($us, 0, $uid, $combat_type, $user_side, $hod, $join, $svit, $k_komu, $k_exp, $k_gp, $skill, $func, $delay, $no_rejoin);
        $pismo = iconv("Windows-1251", "UTF-8//IGNORE", "<span style=\"font-style:italic;font-size:12px;color:gold;\">Начинается турнирный хаотичный бой</span>");
        myquery("INSERT INTO game_log (`message`,`date`,`fromm`,`too`,ptype) VALUES ('" . mysql_real_escape_string($pismo) . "'," . time() . ",-1," . $us['user_id'] . ",1)");
    }
    myquery("DELETE game_turnir,game_turnir_users FROM game_turnir,game_turnir_users WHERE (game_turnir.id=" . $tur['id'] . ") AND (game_turnir.id=game_turnir_users.turnir_id) ");
    setLocation("http://" . domain_name . "/combat.php");
}
开发者ID:themiddleearth,项目名称:RPG.SU,代码行数:29,代码来源:turnir.inc.php

示例2: destroy_all

function destroy_all($par = "", $loc = "index.php")
{
    if ($loc == "index.php") {
        $loc = "http://" . domain_name . "/index.php?param={$par}";
    }
    mysql_close();
    session_unset();
    unset($_SESSION);
    setcookie("rpgsu_login", 0, time() - 84000000, "/");
    setcookie("rpgsu_pass", 0, time() - 84000000, "/");
    setcookie("rpgsu_sess", 0, time() - 84000000, "/");
    setcookie("rpgsu_admin", 0, time() - 84000000, "/");
    setLocation($loc);
    die;
}
开发者ID:themiddleearth,项目名称:RPG.SU,代码行数:15,代码来源:lib_session.inc.php

示例3: makeOffersOut

 public function makeOffersOut($offerin)
 {
     $collection = [];
     $errors = [];
     $infos = [];
     $resellers = [];
     $minStartDelay = Config::get('offerin.delay', 115) * 60;
     $model = lib('model')->getStaticModel((int) $offerin->segment_id);
     $isCalendar = isAke($model, 'is_calendar', true);
     $now = time();
     $isPro = false;
     if (!isset($offerin->sellzone_id)) {
         $offerin->sellzone_id = 1;
         $offerin->save();
     }
     if (isset($offerin->company_id)) {
         $address = Model::Companyaddress()->findOrFail((int) $offerin->address_id);
         $isPro = true;
     } else {
         $address = Model::Accountaddress()->findOrFail((int) $offerin->address_id);
     }
     if (true === $isPro) {
         if (!isset($offerin->company_id)) {
             $offerin->company_id = (int) $address->company_id;
             $offerin = $offerin->save();
         }
     } else {
         if (!isset($offerin->account_id)) {
             $offerin->account_id = (int) $address->account_id;
             $offerin = $offerin->save();
         }
     }
     $locationOffer = lib('utils')->remember('get.location.address.' . $address->id, function ($address) {
         return getLocation($address);
     }, $isPro ? Model::Companyaddress()->getAge() : Model::Accountaddress()->getAge(), [$address]);
     if (empty($locationOffer)) {
         $coords = lib('geo')->getCoords($address->address . ' ' . $address->zip . ' ' . $address->city, 250);
         setLocation($address, $coords['lng'], $coords['lat']);
         $locationOffer = ['lng' => $coords['lng'], 'lat' => $coords['lat']];
     }
     $segment_id = (int) $offerin->segment_id;
     $family = repo('segment')->getFamilyfromItem((int) $segment_id);
     if (!empty($family)) {
         $market = current($family);
         $market_id = (int) $market['id'];
     } else {
         $market_id = $segment_id;
     }
     $offer = $offerin->toArray();
     if (isset($offer['date']) && isset($offer['time'])) {
         list($y, $m, $d) = explode('-', $offer['date'], 3);
         list($h, $i, $s) = explode(':', $offer['time'], 3);
         $start = mktime($h, $i, $s, $m, $d, $y);
     } else {
         $start = $offerin->created_at;
     }
     if ($start < $now) {
         $errors['starttime_error'] = 'Start time [' . date('Y-m-d H:i:s', $start) . '] is before now.';
     }
     $delaySeconds = $start - $now;
     $delai = (double) round($delaySeconds / 3600, 2);
     if ($delaySeconds < $minStartDelay) {
         $errors['delay_incorrect'] = 'The delay is incorrect [' . $delaySeconds . ' seconds]. The delay me be at less egual to ' . $minStartDelay . ' seconds.';
         return ['resellers' => $resellers, 'offers' => $collection, 'errors' => $errors, 'infos' => $infos];
     }
     $langue = $offerin->langue;
     if (!strlen($langue) || empty($langue) || strtolower($langue) == 'non') {
         $langue = false;
     }
     if ($langue) {
         $langues = lib('forms')->getLanguagesFromSegmentId($segment_id);
         if (!in_array($langue, $langues)) {
             $langue = false;
         }
     }
     $this->cleanToPay($offerin->segment_id);
     $products = Model::Productdata()->where(['segment_id', '=', (int) $offerin->segment_id])->where(['sellzone_id', '=', (int) $offerin->sellzone_id])->cursor();
     foreach ($products as $product) {
         $item = [];
         $reseller = Model::Reseller()->model($product['reseller']);
         $company = Model::Company()->model($product['company']);
         // $company    = Model::Company()->where(['reseller_id', '=', (int) $product['reseller_id']])->first(true);
         if ($reseller && $company) {
             // $statusId = (int) lib('status')->getId('reseller', 'REGISTER');
             if (false === $product['status']) {
                 $infos[$reseller->id]['status'] = true;
                 continue;
             }
             $infos[$reseller->id] = [];
             $options = $product['options'];
             $hasAgenda = isAke($options, 'has_agenda', false);
             // $hasAgenda = lib('option')->get('agenda.partage', $reseller, false);
             $item['reseller_calendar'] = $hasAgenda;
             $item['reseller_id'] = $reseller->id;
             $item['segment_id'] = $segment_id;
             if (true === $isPro) {
                 $item['company_id'] = $offer['company_id'];
             } else {
                 $item['account_id'] = $offer['account_id'];
             }
//.........这里部分代码省略.........
开发者ID:schpill,项目名称:standalone,代码行数:101,代码来源:offerin.php

示例4: getCityByID

    getCityByID($cityID, $mysqli);
}
if ($functionname == 'delCity') {
    $cityID = $_POST["cityID"];
    delCity($cityID, $mysqli);
}
if ($functionname == 'getCityByStateID') {
    $stateID = $_POST["stateID"];
    getCityByStateID($stateID, $mysqli);
}
/*Location*/
if ($functionname == 'setLocation') {
    $locationID = $_POST["locationID"];
    $locationName = $_POST["locationName"];
    $locationRegionID = $_POST["locationRegionID"];
    setLocation($locationID, $locationName, $locationRegionID, $mysqli);
}
if ($functionname == 'getLocation') {
    getLocation($mysqli);
}
if ($functionname == 'getLocationByID') {
    $locationID = $_POST["locationID"];
    getLocationByID($locationID, $mysqli);
}
if ($functionname == 'delLocation') {
    $locationID = $_POST["locationID"];
    delLocation($locationID, $mysqli);
}
/*Port*/
if ($functionname == 'setPort') {
    $portID = $_POST["portID"];
开发者ID:hefhem,项目名称:TDO,代码行数:31,代码来源:db_connect_functioncall.php

示例5: receiveLocation

 private function receiveLocation($object)
 {
     include "location.php";
     $content = setLocation($object->FromUserName, (string) $object->Location_X, (string) $object->Location_Y);
     $result = $this->transmitText($object, $content);
     return $result;
 }
开发者ID:devsnippet,项目名称:WeChat-2,代码行数:7,代码来源:index.php

示例6: mysqlresult

    if ($_GET['page'] == 45) {
        $check = mysqlresult(myquery("SELECT COUNT(*) FROM bookgame_users_flags WHERE bookgame={$book_id} AND user_id={$user_id} AND (flag=8 OR flag=9)"), 0, 0);
        if ($check != 2) {
            $print_text = 1;
            $alt_text = "«ААА!!!,- крик Аргалакса звенит под потолком.- Я вызываю Жаррадана Мара и Шарелу, Ведьму Снега!!» Ты можешь противиться заклинаниям двух колдунов, только если есть Щит Времени и Лёд. Но их у тебя не оказалось, и ты бесславно погиб на поле боя!";
        }
    }
}
include "quest_bookgame.inc.php";
if (isset($_GET['page']) and $_GET['page'] == 9) {
    /*
    $sel = myquery("SELECT * FROM bookgame_users_flags WHERE bookgame=$book_id AND user_id=$user_id AND flag=1");
    if (mysql_num_rows($sel))
    {
    	$flag = mysql_fetch_array($sel);
    	echo '<br />Ты знаешь пароль! Переходи к <a href="http://'.domain_name.''.$_SERVER['PHP_SELF'].'?page='.$flag['value'].'">'.$flag['value'].'</a><br />';
    }
    */
    if (!isset($_GET['pass'])) {
        echo 'Если ты знаешь пароль, то введи его: <input type="text" size="5" value="0" id="pass">&nbsp;&nbsp;&nbsp;<input type="button" onClick="location.href=\'http://' . domain_name . '' . $_SERVER['PHP_SELF'] . '&page=9&pass=\'+document.getElementById(\'pass\').value+\'\'" value="Ввести пароль">';
    } else {
        $pass = (int) $_GET['pass'];
        if ($pass == 23) {
            myquery("UPDATE bookgame_users SET step=23 WHERE bookgame={$book_id} AND user_id={$user_id}");
        } else {
            myquery("UPDATE bookgame_users SET step=37 WHERE bookgame={$book_id} AND user_id={$user_id}");
        }
        setLocation("http://" . domain_name . '' . $_SERVER['PHP_SELF']);
    }
}
echo '<br /><br /><br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="?exit">Выйти из квеста</a>';
开发者ID:themiddleearth,项目名称:RPG.SU,代码行数:31,代码来源:quest_demon.php

示例7: myquery

                         $sel_usid = myquery("SELECT user_id FROM craft_build_rab WHERE build_id={$build_id} AND eliksir>={$number_shahta_min} AND eliksir<={$number_shahta_max} AND user_id<>{$user_id}");
                         while (list($usid) = mysql_fetch_array($sel_usid)) {
                             //$msg = mysql_real_escape_string("Завал уровня. build=id=$build_id,level=$level,kol_obalov=$kol_obvalov,number_shahta_min=$number_shahta_min,number_shahta_max=$number_shahta_max");
                             //myquery("INSERT DELAYED INTO game_pm (komu, otkogo, theme, post, view, time) VALUES ('612', '".$usid."', 'Завал уровня. Прочие', '$msg','0','".time()."')");
                             exit_from_craft("", 1, $usid);
                         }
                     }
                     exit_from_craft("", 1, $char['user_id'], 1);
                 } else {
                 }
             } else {
                 echo '<br /><br />Указан неправильный код.';
             }
             unset($_SESSION['captcha']);
             unset($_POST['digit']);
             setLocation("craft.php");
         }
         /*
         */
     }
 } elseif (isset($_GET['klin'])) {
     $check = myquery("SELECT * FROM craft_resource_user WHERE user_id={$user_id} AND res_id={$id_resource_brevno} AND col>0 LIMIT 1");
     if ($check != false and mysql_num_rows($check) > 0) {
         myquery("UPDATE craft_build_mining SET geksa_obval=geksa_obval-2 WHERE id={$id_geks}");
         $res_user = mysql_fetch_array($check);
         if ($res_user['col'] == 1) {
             myquery("DELETE FROM craft_resource_user WHERE id=" . $res_user['id'] . "");
         } else {
             myquery("UPDATE craft_resource_user SET col=GREATEST(0,col-1) WHERE id=" . $res_user['id'] . "");
         }
         myquery("insert into craft_stat (build_id, gp, res_id, dob, vip, dat, user, type) values (0, 0, " . $res_user['id'] . ", 0, -1, " . time() . ", {$user_id}, 'z')");
开发者ID:themiddleearth,项目名称:RPG.SU,代码行数:31,代码来源:mining.inc.php

示例8: join_attack_user


//.........这里部分代码省略.........
        case 1:
            list($side) = mysql_fetch_array(myquery("SELECT side FROM combat_users WHERE combat_id=" . $player['boy'] . " and user_id=" . $player['user_id'] . " and npc=0"));
            break;
        case 2:
            $error = 'duel';
            break;
        case 3:
            $sred_level = 0;
            $sred_level_1 = 0;
            $side_1 = 0;
            $sred_level_2 = 0;
            $side_2 = 0;
            $kol = 0;
            $sel = myquery("SELECT clevel,side FROM combat_users WHERE combat_id='" . $player['boy'] . "' AND `join`=0 AND svitok=0");
            while ($boyuser = mysql_fetch_array($sel)) {
                $sred_level += $boyuser['clevel'];
                $kol++;
                if ($side_1 == 0 or $side_1 == $boyuser['side']) {
                    $side_1 = $boyuser['side'];
                    $sred_level_1 += $boyuser['clevel'];
                } elseif ($side_2 == 0 or $side_2 == $boyuser['side']) {
                    $side_2 = $boyuser['side'];
                    $sred_level_2 += $boyuser['clevel'];
                }
            }
            $sred_level = round($sred_level / $kol);
            if ($sred_level_1 <= $sred_level_2) {
                $side = $side_1;
            } else {
                $side = $side_2;
            }
            break;
        case 4:
            $side = $char['clan_id'];
            break;
        case 5:
            $side = $char['user_id'];
            break;
        case 6:
            $side = $char['sklon'];
            break;
        case 7:
            $side = $char['race'];
            break;
    }
    if ($svit == 2 and clans_war == 0) {
        list($side) = mysql_fetch_array(myquery("SELECT side FROM combat_users WHERE combat_id=" . $player['boy'] . " AND user_id=" . $player['user_id'] . ""));
    }
    if (!isset($side)) {
        list($side) = mysql_fetch_array(myquery("SELECT side FROM combat_users WHERE combat_id=" . $player['boy'] . " AND user_id=" . $player['user_id'] . ""));
    }
    $k_komu = 0;
    $svit_id = 0;
    //используем свиток
    if ($svit == 1) {
        $svit_id = svitok_small_item_id;
    } elseif ($svit == 2) {
        $svit_id = svitok_sred_item_id;
    }
    if ($svit_id != 0) {
        $ch = myquery("SELECT id FROM game_items WHERE user_id={$user_id} AND priznak=0 AND used IN (12,13,14) AND item_id='" . $svit_id . "' LIMIT 1");
        if (mysql_num_rows($ch)) {
            $svitok = mysql_fetch_array($ch);
            $Item = new Item($svitok['id']);
            $Item->use_item();
        }
        $k_komu = $player['user_id'];
    }
    save_stat($char['user_id'], '', '', 1, '', '', $player['user_id'], '', '', '', '', '');
    $nam = 0;
    if ($type == 1) {
        $nam = 14;
    }
    if ($type == 2) {
        $nam = 15;
    }
    if ($type == 3) {
        $nam = 16;
    }
    if ($type == 4) {
        $nam = 17;
    }
    if ($type == 5) {
        $nam = 18;
    }
    if ($type == 6) {
        $nam = 49;
    }
    if ($type == 7) {
        $nam = 48;
    }
    //Снимем с атакующего игрока эффект неуязвимости, если бой не с ботом
    if ($npc == 0) {
        myquery("DELETE FROM game_obelisk_users WHERE user_id=" . $char['user_id'] . " AND type=6");
    }
    list($current_hod) = mysql_fetch_array(myquery("SELECT hod FROM combat WHERE combat_id=" . $player['boy'] . ""));
    //Кидаем в бой игрока
    combat_insert($char, 0, $player['boy'], $type, $side, $current_hod, 1, $svit, $k_komu, $map['k_exp'] / 100, $map['k_gp'] / 100, 0, 6, $nam, 1);
    setLocation("http://" . domain_name . "/combat.php");
}
开发者ID:themiddleearth,项目名称:RPG.SU,代码行数:101,代码来源:lib_attack.inc.php

示例9: start_debug

 <?php 
if (function_exists("start_debug")) {
    start_debug();
}
if (preg_match('/.inc.php/', $_SERVER['PHP_SELF'])) {
    setLocation('index.php');
} else {
    // Помощь новичкам
    if ($char['clevel'] < 5) {
        include 'template_intro.inc.php';
    }
    // Тут был чат на гексе
    $online_range = time() - 300;
    /*
    $result_messages = myquery("SELECT * FROM game_chat WHERE map_name='" . $char['map_name'] . "' AND map_xpos='" . $char['map_xpos'] . "' AND map_ypos='" . $char['map_ypos'] . "' AND post_time>$online_range ORDER BY post_time LIMIT 60");
    if (mysql_num_rows($result_messages))
    {
    	$i = 0;
    	QuoteTable('open');
    	while ($player_messages = mysql_fetch_array($result_messages))
    	{
    		switch (floor($i/4))
    		{
    			case 0:
    				$font_color = 'eeeeee';
    				break;
    			case 1:
    				$font_color = 'c6c6c6';
    				break;
    			case 2:
    				$font_color = 'bbbbbb';
开发者ID:themiddleearth,项目名称:RPG.SU,代码行数:31,代码来源:template_around.inc.php

示例10: setLocation

                //попробуем так
                setLocation("../act.php?func=main");
            }
            break;
            //1.2 - сдача квеста
        //1.2 - сдача квеста
        case 12:
            //проверим, все ли в норме
            if (!isset($done)) {
                include 'quest_engine_types/quests_engine_leaving.php';
            } else {
                //”—“јЌќ¬»ћ ‘” Ќ ÷»ё "»√–ј"
                ForceFunc($user_id, 5);
                set_delay_reason_id($user_id, 1);
                if (isset($_SESSION['for_quest'])) {
                    unset($_SESSION['for_quest']);
                }
                //выход в сз
                //попробуем так
                setLocation("../act.php?func=main");
            }
            break;
    }
}
include "../inc/template_footer.inc.php";
if ($_SERVER['REMOTE_ADDR'] == debug_ip) {
    show_debug();
}
if (function_exists("save_debug")) {
    save_debug();
}
开发者ID:themiddleearth,项目名称:RPG.SU,代码行数:31,代码来源:quests_engine_chek.php

示例11: ShowCombatLog

		<img src="http://<?php 
        echo img_domain;
        ?>
/combat/n.jpg">
		<?php 
        if ($state['combat_id'] > 0 and $state['hod'] > 0) {
            ShowCombatLog($state['combat_id'], $state['hod']);
        }
        break;
    case 10:
        $combat->print_begin();
        break;
    default:
        $combat->clear_combat();
        end_script_combat();
        setLocation("act.php");
        break;
}
?>
<script type="text/javascript" language="JavaScript">
function upchat()
{
	ch_fr = top.window.frames.chat;
	if (ch_fr)
	{
		bt = ch_fr.document.getElementById("select_game_chat");
		if (bt)
		{
			if (bt.style.display!="inline")
			{
				bt.style.display="inline";
开发者ID:themiddleearth,项目名称:RPG.SU,代码行数:31,代码来源:combat.php

示例12: elseif

			<br /><br />Описание бота:<br /><textarea cols="30" rows="10" name="npc_opis"></textarea> </td>
			</tr></table><br><br><input name="submit" type="submit" value="Сохранить">';
        }
    } elseif (isset($_GET['edit'])) {
        $itemc = mysql_fetch_array(myquery("SELECT * FROM game_npc_template WHERE npc_id=" . $_GET['edit'] . ""));
        if (isset($_POST['submit'])) {
            if (!isset($_POST['canmove'])) {
                $canmove = 0;
            } else {
                $canmove = 1;
            }
            myquery("UPDATE game_npc_template SET npc_name='" . $_POST['npc_name'] . "',npc_race='" . $_POST['npc_race'] . "',npc_max_hp='" . $_POST['npc_max_hp'] . "',npc_max_mp='" . $_POST['npc_max_mp'] . "',npc_level='" . $_POST['npc_level'] . "',respawn='" . $_POST['respawn'] . "',npc_str='" . $_POST['npc_str'] . "',npc_str_deviation='" . $_POST['npc_str_deviation'] . "',npc_dex='" . $_POST['npc_dex'] . "',npc_dex_deviation='" . $_POST['npc_dex_deviation'] . "',npc_pie='" . $_POST['npc_pie'] . "',npc_pie_deviation='" . $_POST['npc_pie_deviation'] . "',npc_vit='" . $_POST['npc_vit'] . "',npc_vit_deviation='" . $_POST['npc_vit_deviation'] . "',npc_spd='" . $_POST['npc_spd'] . "',npc_spd_deviation='" . $_POST['npc_spd_deviation'] . "',npc_ntl='" . $_POST['npc_ntl'] . "',npc_ntl_deviation='" . $_POST['npc_ntl_deviation'] . "',npc_exp_max='" . $_POST['npc_exp_max'] . "',npc_gold='" . $_POST['npc_gold'] . "',canmove='" . $canmove . "',item='" . $_POST['item'] . "',agressive='" . $_POST['agressive'] . "',agressive_level='" . $_POST['agressive_level'] . "',npc_img='" . $_POST['npc_img'] . "',npc_opis='" . $_POST['npc_opis'] . "' WHERE npc_id=" . $_GET['edit'] . "");
            //сохраняем шаблон бота
            myquery("Update game_npc Set EXP=" . $_POST['npc_exp_max'] . " Where npc_id=" . $_GET['edit'] . "");
            //Изменяем получаемый опыт с бота
            setLocation("admin.php?opt=main&option=npc_template&page=" . $_GET['page'] . "");
        } elseif (isset($_GET['npcopt'])) {
            require_once 'npc_template_option.inc.php';
        } else {
            echo '
			<form name="edit_npc_template" action="admin.php?opt=main&option=npc_template&edit=' . $_GET['edit'] . '&page=' . $page . '" method="POST">
			<table border=0><tr><td><table border=0 bgcolor=111111>
			<tr><td>Имя (раса): </td><td><input type="text" name="npc_name" size="40" value="' . $itemc['npc_name'] . '"> <br /> (<input type="text" name="npc_race" size="35" value="' . $itemc['npc_race'] . '">)</td></tr>
			<tr><td>Жизни/Мана: </td><td><input type="text" name="npc_max_hp" size="7" value="' . $itemc['npc_max_hp'] . '">/<input type="text" name="npc_max_mp" size="7" value="' . $itemc['npc_max_mp'] . '"></td></tr>
			<tr><td>Уровень: </td><td><input type="text" name="npc_level" size="5" value="' . $itemc['npc_level'] . '"></td></tr>
			<tr><td>Время воскрешения: </td><td><input type="text" name="respawn" size="10" value="' . $itemc['respawn'] . '"> секунд</td></tr>
			<tr><td>Сила: </td><td><input type="text" size="5" value="' . $itemc['npc_str'] . '" name="npc_str">&plusmn;<input type="text" size="5" value="' . $itemc['npc_str_deviation'] . '" name="npc_str_deviation"></td></tr>
			<tr><td>Выносливость: </td><td><input type="text" size="5" value="' . $itemc['npc_dex'] . '" name="npc_dex">&plusmn;<input type="text" size="5" value="' . $itemc['npc_dex_deviation'] . '" name="npc_dex_deviation"></td></tr>
			<tr><td>Ловкость: </td><td><input type="text" size="5" value="' . $itemc['npc_pie'] . '" name="npc_pie">&plusmn;<input type="text" size="5" value="' . $itemc['npc_pie_deviation'] . '" name="npc_pie_deviation"></td></tr>
			<tr><td>Защита: </td><td><input type="text" size="5" value="' . $itemc['npc_vit'] . '" name="npc_vit">&plusmn;<input type="text" size="5" value="' . $itemc['npc_vit_deviation'] . '" name="npc_vit_deviation"></td></tr>
			<tr><td>Мудрость: </td><td><input type="text" size="5" value="' . $itemc['npc_spd'] . '" name="npc_spd">&plusmn;<input type="text" size="5" value="' . $itemc['npc_spd_deviation'] . '" name="npc_spd_deviation"></td></tr>
开发者ID:themiddleearth,项目名称:RPG.SU,代码行数:31,代码来源:npc_template.inc.php

示例13: max

         if (domain_name == 'testing.rpg.su' or domain_name == 'localhost') {
             $dlit = 5;
         } else {
             $dlit = max(120, 600 - getCraftLevel($user_id, 7) * 20);
         }
         if (isset($from_house)) {
             $build_id = 'sawmill';
         }
         $ad = 0;
         if (isset($_GET['part4'])) {
             $ad = $_GET['add'];
         }
         myquery("DELETE FROM craft_build_rab WHERE user_id={$user_id}");
         myquery("INSERT INTO craft_build_rab (user_id,build_id,date_rab,dlit,eliksir,`add`) VALUES ({$user_id},'{$build_id}'," . time() . ",{$dlit},'{$type_work}',{$ad})");
         ForceFunc($user_id, func_craft);
         setLocation("../craft.php");
     } else {
         echo 'Ты не можешь начать работу на лесопилке (введен неправильный код или у тебя недостаточно свободного места в инвентаре)!<br><br><br><br>';
     }
 } else {
     echo 'Для начала работы введи указанный ниже код <br>и нажми кнопку "Начать работу на лесопилке"<br>';
     echo '<br><img src="../captcha_new/index.php?' . time() . '">';
     $action = "";
     if (isset($from_house)) {
         if (isset($_GET['raspil_brevno'])) {
             $action = "?raspil_brevno" . $add_url;
         }
         if (isset($_GET['doski'])) {
             if (isset($_GET['strel'])) {
                 $action = "?doski&strel" . $add_url;
             }
开发者ID:themiddleearth,项目名称:RPG.SU,代码行数:31,代码来源:sawmill.inc.php

示例14: myquery

 $sel_hod = myquery("SELECT * FROM arcomage_history WHERE arcomage_id='" . $arcomage['id'] . "' AND user_id='{$user_id}' AND hod='{$hod}'");
 $cards2end = 1;
 // calculate history
 while ($h_card = mysql_fetch_array($sel_hod) and $cards2end > 0) {
     if ($h_card['fall'] == 1) {
         $cards2end -= 1;
     } else {
         $cards2end -= 1;
         $cards2end += extra_hod($h_card['card_id']);
     }
 }
 // and last card (not inseted into DB yet)
 $cards2end -= 1 - (1 - isset($_GET['fall'])) * extra_hod($card);
 if ($cards2end < 1) {
     myquery("UPDATE arcomage_users SET func=2,hod=" . time() . " WHERE user_id='{$user_id}'");
     setLocation("arcomage.php");
 }
 if (isset($_GET['fall'])) {
     myquery("INSERT INTO arcomage_history (arcomage_id,user_id,card_id,fall,hod) VALUES ('" . $charboy['arcomage_id'] . "','{$user_id}','{$card}',1,'{$hod}')");
 } elseif (!isset($_GET['fall']) and check_dostup($card, $charboy) == 1) {
     myquery("INSERT INTO arcomage_history (arcomage_id,user_id,card_id,fall,hod) VALUES ('" . $charboy['arcomage_id'] . "','{$user_id}','{$card}',0,'{$hod}')");
     if ($cards2end >= 0) {
         $users = array();
         $sel_init = myquery("SELECT * FROM arcomage_users WHERE arcomage_id='" . $charboy['arcomage_id'] . "'");
         while ($userboy = mysql_fetch_array($sel_init)) {
             $q = $userboy['user_id'];
             $users[$q]['tower'] = $userboy['tower'];
             $users[$q]['wall'] = $userboy['wall'];
             $users[$q]['bricks'] = $userboy['bricks'];
             $users[$q]['bricks_add'] = $userboy['bricks_add'];
             $users[$q]['gems'] = $userboy['gems'];
开发者ID:themiddleearth,项目名称:RPG.SU,代码行数:31,代码来源:otpravka.inc.php

示例15: Moder

 function Moder($action, $replys)
 {
     $location = "index.php";
     if ($this->forum_admin or $this->user_rights['category'] == 4) {
         $ar = explode(",", $replys);
         if (sizeof($ar) > 0) {
             //В ar номера обрабатываемых ответов
             $action = (int) $action;
             for ($i = 0; $i < sizeof($ar); $i++) {
                 if ($i == 0) {
                     list($topic_id) = mysql_fetch_array(myquery("SELECT topics_id FROM forum_otv WHERE id=" . $ar[$i] . ""));
                 }
                 if ($action == 1) {
                     $this->DeleteReply($ar[$i]);
                 }
                 if ($action == 2) {
                     $this->RestoreReply($ar[$i]);
                 }
                 if ($action == 3) {
                     $this->DeleteEndReply($ar[$i]);
                 }
             }
             $location = "index.php?act=topic&id={$topic_id}";
             if (isset($_GET['page'])) {
                 $location .= "&page=" . $_GET['page'];
             }
         }
     }
     setLocation("{$location}");
 }
开发者ID:themiddleearth,项目名称:RPG.SU,代码行数:30,代码来源:forum.class.php


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