Четверг, 28 Марта 2024, 17:46

Приветствую Вас Гость

[ Новые сообщения · Игроделы · Правила · Поиск ]
  • Страница 2 из 2
  • «
  • 1
  • 2
Форум игроделов » Записи участника » Aruro [30]
Результаты поиска
AruroДата: Вторник, 12 Июня 2012, 13:24 | Сообщение # 21 | Тема: помогите!
частый гость
Сейчас нет на сайте
Quote (Lord135)
не в бд, вот в этом месте:

что именно менять? больше или меньше число ставить? что бы больше был шанс выбивания.
AruroДата: Вторник, 12 Июня 2012, 13:15 | Сообщение # 22 | Тема: помогите!
частый гость
Сейчас нет на сайте
как в игре повысить шанс на выбивание предметов?
может в этом коду что-то?
Code
<?php
class PokemonBase2{
private $info = array();
function __construct($id_base_pok){
$this->info = first('SELECT * FROM poke_base WHERE id=%d',$id_base_pok); }

function __get($key){
return isset($this->info[$key])?$this->info[$key]:'';}    

function __set($key,$value){     //   $info =  $key,    array(); =  $value
$this->info[$key] = $value;}}

function new_status_user($effect_id){
switch ($effect_id):  
case 1:
$time_st_user = time()+3600;
$tip_st_user = 1;
$ok = 1;
break;
case 2:
$time_st_user = time()+7200;
$tip_st_user = 2;
$ok = 1;
break;
case 3:
$time_st_user = time()+3600;
$tip_st_user = 3;
$ok = 1;
break;
default:
$ok = 0;
endswitch;
if($ok == 1){
$pr_int_st = insert('status_user',array(
    'id_user'=>$_SESSION['id'],
    'time_status'=>$time_st_user,
    'uniq_sts_id'=>$tip_st_user));
if(!$pr_int_st) { $vernu_res = false; } else { $vernu_res = true; } } else { $vernu_res == false;}   
return $vernu_res;
}

function new_samolet_user($bilet_id){
$town_user = first('
SELECT u.id, u.Building, b.id, b.Town  
FROM users u  
INNER JOIN Buildings b  
ON u.Building = b.ID
WHERE u.id=%d',$_SESSION['id']);
switch ($bilet_id):  
case 1:
if($town_user['Town'] == 1){
$town = 1;
$time_sm_user = time()+180;
$id_building = 37;
$ok = 1;}
elseif($town_user['Town'] == 3){
$town = 3;
$time_sm_user = time()+180;
$id_building = 1;
$ok = 1;}
break;
case 2:
if($town_user['Town'] == 3){
$town = 3;
$time_sm_user = time()+180;
$id_building = 68;
$ok = 1;}
elseif($town_user['Town'] == 4){
$town = 4;
$time_sm_user = time()+180;
$id_building = 37;
$ok = 1;}
break;
case 3:
if($town_user['Town'] == 1){
$town = 1;
$time_sm_user = time()+180;
$id_building = 68;
$ok = 1;}
elseif($town_user['Town'] == 4){
$town = 4;
$time_sm_user = time()+180;
$id_building = 1;
$ok = 1;}
break;
default:
$ok = 0;
endswitch;
$proverka_samoleta = first('SELECT id_s FROM samolet_user WHERE id_user=%d',$_SESSION['id']);
if($ok == 1 AND !$proverka_samoleta AND $town == $town_user['Town'] AND $town_user['Building'] != 64){
$pr_int_sam = insert('samolet_user',array(
    'id_user'=>$_SESSION['id'],
    'id_building'=>$id_building,
    'time'=>$time_sm_user));
if(!$pr_int_sam) { $vernu_res = false; }  
else    {  
             update('users',array('Building'=>67),'id='.(int)$_SESSION['id']);
             $vernu_res = true; }}
               
else    { $vernu_res == false; }
return $vernu_res;   
}

function level_exp_conf($lvl){
return round(50*exp(1+$lvl/10)-50);
}

function confet_poke($pokes_id){
$pr_pokes = first('SELECT * FROM pokemon_user WHERE user=%d AND active=1 AND id=%d',$_SESSION['id'],$pokes_id);
if(!$pr_pokes OR $pr_pokes['level']>=100){ $resul = false; } else {
$ev_up = $pr_pokes['ev'] + 4;
$lvl_up = $pr_pokes['level'] + 1;
$exp_up = level_exp_conf($lvl_up-1);
$expb_up = level_exp_conf($lvl_up);
update('pokemon_user',array('ev'=>$ev_up, 'level'=>$lvl_up, 'exp'=>$exp_up, 'exp_b'=>$expb_up),'id='.(int)$pokes_id.' AND active=1');
$resul = true;}
return $resul;}

function corobca_surp($tips) {
if($tips == 1){
$random_items = ''.mt_rand(1,999);
if($random_items > 901 AND $random_items < 950){$plus_item_id = 32; $col_vo = 1;}
elseif($random_items > 951 AND $random_items < 999){$plus_item_id = 31; $col_vo = 1;}
elseif($random_items > 850 AND $random_items < 900){$plus_item_id = 30; $col_vo = 1;}
elseif($random_items > 500 AND $random_items < 650){$plus_item_id = 3; $col_vo = 10;}
elseif($random_items > 400 AND $random_items < 450){$plus_item_id = 28; $col_vo = 1;}
elseif($random_items > 300 AND $random_items < 350){$plus_item_id = 27; $col_vo = 1;}
elseif($random_items > 1 AND $random_items < 50){$plus_item_id = 26; $col_vo = 2;}
elseif($random_items > 70 AND $random_items < 80){$plus_item_id = 37; $col_vo = 50;}
else {$plus_item_id = 36; $col_vo = 50;}
plus_item($col_vo,$plus_item_id);
$resul = true;}
return $resul;}
?>
AruroДата: Понедельник, 11 Июня 2012, 20:02 | Сообщение # 23 | Тема: Не могу понять, ошибки
частый гость
Сейчас нет на сайте
Riolu, спс
AruroДата: Понедельник, 11 Июня 2012, 19:31 | Сообщение # 24 | Тема: Не могу понять, ошибки
частый гость
Сейчас нет на сайте
vadosik, и так нет =(
AruroДата: Понедельник, 11 Июня 2012, 19:09 | Сообщение # 25 | Тема: Не могу понять, ошибки
частый гость
Сейчас нет на сайте
Quote (Riolu)
1. Тебя же Макасимка взломает за исходник

хех... я общался с Макасимкой, он написал что ему всеравно. Типо там много дырок.
Quote (Riolu)
2. И Ты говоришь мне что моя игра из исходника, Между прочем она пишется ОТ РУКИ С НУЛЯ

я нечего не говорил.
Quote (Riolu)
3. Сам вали

я прошу помощи, что учить мне я сам знаю.
Quote (Riolu)
4. к html ещё учи css

ооок.

Добавлено (11.06.2012, 19:09)
---------------------------------------------
vadosik, не вышло =(

AruroДата: Понедельник, 11 Июня 2012, 18:36 | Сообщение # 26 | Тема: Не могу понять, ошибки
частый гость
Сейчас нет на сайте
Quote (Riolu)
Учи html

свали =0
AruroДата: Понедельник, 11 Июня 2012, 18:24 | Сообщение # 27 | Тема: Не могу понять, ошибки
частый гость
Сейчас нет на сайте

как это убрать? что это может быть за ошибка?
и как вместо этого можно поставить картинки?

как тут правильно сделать?
Code
<?php
include ("include/bd.php");
if (isset($_GET['id'])) {
include ("include/drop_chat.php");
}

$login = $_SESSION['login'];
$password = $_SESSION['password'];
$id = $_SESSION['id'];

$myrow = first('SELECT * FROM users WHERE id=%d AND activation=1',$id);
$Group = $myrow["groups"];
$room = $myrow["Building"];
$on = 1;
$off = 0;
if (isset($_GET['napadenie'])) { $go2=$_GET['napadenie'];

if ($go2=="on") {
$b = time() + 15;
update('users',array('Pv_eset'=>$on,'atack_poke'=>$b),'id='.(int)$myrow['id']);
echo "<script>location.href='game.php?go=buttons';</script>";  
}
if ($go2=="off") {
update('users',array('Pv_eset'=>$off),'id='.(int)$id);
echo "<script>location.href='game.php?go=buttons';</script>";  
}}

if (isset($_GET['gochat'])) { $gochat=$_GET['gochat'];

if ($gochat=="on") {
update('users',array('chat'=>1),'id='.(int)$id);
echo "<script>location.href='game.php?go=buttons';</script>"; }
if ($gochat=="off") {
update('users',array('chat'=>0),'id='.(int)$id);
echo "<script>location.href='game.php?go=buttons';</script>"; }}
?>

<?php
if (isset($_POST['text'])) { $text = $_POST['text'];//получаем текст сообщения
if (isset($_POST['text'])) { $text2 = $_POST['text'];
if (isset($_POST['author'])) { $author = $_POST['author'];//логин получателя
$u_id = $_SESSION['id'];
if($myrow['chatbox'] == "3")
{
     $now = time();
     if($myrow['time_rinok'] < $now)
     {
           $a = $now + 60;
         update('users',array('time_rinok'=>$a),'id='.(int)$myrow['id']);
     }
     else
     {
         echo "<script>alert('В торговый чат можно отправлять смс только раз в 1 миниту!'); location.href='game.php?go=buttons';</script>";
         exit;
     }
      
}
if($myrow['chatbox'] == "2")
{
     if($myrow['groups'] != 5)
     {
     if($myrow['reputation'] > 3000)
     {
         echo "<script>alert('В чат новичков смс может отправлять только новички !'); location.href='game.php?go=buttons';</script>";
         exit;
     }
     }
}
if( $text[0] == '/') {
$params = explode(' ',$text);
switch($params[0]){
case '/private':
$user = first('SELECT * FROM users WHERE login="%s"',$params[1]);
$time = time();
$minut = ($myrow["lastvisit"]-$time)/60;
$minut = ceil($minut);
if($myrow['lastvisit']>$time) { echo "<script>alert('Вы будете молчать еще $minut минут!'); location.href='game.php?go=buttons';</script>"; exit;}
if($user){
$time = time();
$Room = $myrow['Building'];
$text = $text;
$text = stripslashes($text);$text = htmlspecialchars($text);
$text = str_replace("/private","<font color=gold>to</font>",$text);
include ("poke_anim.php");
insert('message',array(
    'author'=>$_SESSION['login'],
    'date'=>MYSQL_NOW,
    'Dtime'=>MYSQL_NOW,
    'text'=>$text,
    'timer'=>$time,
    'u_id'=>$_SESSION['id'],
    'time'=>MYSQL_NOW,
    'ch_room'=>$Room,
    'user_id_to'=>$user['id'],
    'is_private'=>1));
echo "<script>location.href='game.php?go=buttons';</script>"; exit ;
}else{
echo "<script>alert('Нет такого пользователя!'); location.href='game.php?go=buttons';</script>" ; exit;
break;
}}}

if( $Group == 1 ) {
if( $text[0] == '/') {
$params = explode(' ',$text);
switch($params[0]){
case '/ban':
print 'Игрок '.$params[1].' забанен';
break;

default:
$loc =(int)substr($params[0],1);
if($loc){
$loc2 = first('SELECT * from Buildings where ID = %d',$loc);
if(!$loc2) { echo "<script>location.href='game.php?go=buttons';</script>"; } else {  
update('users',array('Building'=>$loc),'id='.(int)$id);
echo "<script>location.href='game.php?go=buttons';</script>"; exit ;
}}}}}

$time = time();
$minut = ($myrow["lastvisit"]-$time)/60;
$minut = ceil($minut);
if($myrow['lastvisit']>$time) { echo "<script>alert('Вы будете молчать еще $minut минут!'); location.href='game.php?go=buttons';</script>"; exit;}
else {
$date = date('Y-m-d',time());//дата добавления
if (empty($author) or empty($text)  or empty($date) or empty($u_id)) {//есть ли все необходимые данные? Если нет, то останавливаем
  echo "<script>alert('Вы ввели не всю информацию'); location.href='game.php?go=buttons';</script>" ; exit ;}
if( ($Group == 1) or ($Group == 2) or ($Group == 3) or ($Group == 6)) {
$text = str_replace("\"",""",$text);
} else {
$text = stripslashes($text);$text = htmlspecialchars($text);
}

if ($Group == 1 OR $Group == 5){
$text = str_replace("[nast]","<font color=#551A8B><b>",$text);
$text = str_replace("[/nast]","</b></font>",$text);
}
include ("poke_anim.php");

$time = time();
if($myrow['chat']==1){                    

insert('message',array(
    'author'=>$login,
    'date'=>MYSQL_NOW,
    'Dtime'=>MYSQL_NOW,
    'text'=>$text,
    'timer'=>$time,
    'u_id'=>$_SESSION['id'],
    'time'=>MYSQL_NOW,
    'loc_id'=>$room,
    'CHAT' => $myrow['chatbox']));
} else {   
insert('message',array(
    'author'=>$login,
    'date'=>MYSQL_NOW,
    'Dtime'=>MYSQL_NOW,
    'text'=>$text,
    'timer'=>$time,
    'u_id'=>$_SESSION['id'],
    'time'=>MYSQL_NOW,
    'ch_room'=>$room,
    'CHAT'=>$myrow['chatbox']));
}}}}}?>

<?
$player = first('SELECT * FROM users WHERE id=%d AND activation=1',$id);
$Group = $myrow["groups"];
$room = $myrow["Building"];

?>
<html>
<head>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; Charset=Windows-1251">

<LINK REL=Stylesheet HREF=css/style.css TYPE=text/css>
<?php if($Group == 1 OR $Group == 5) { ?>
<script type="text/javascript">
function simpletagnast()
{  
   cMes = document.getElementById('F1')['text'].value
   cAdd = '[nast]'+cMes+'[/nast]'
   document.getElementById('F1')['text'].value = cAdd;              }
</script>
<?php }?>
<style>
BODY {  
         color: #000000;  
         SCROLLBAR-FACE-COLOR: #14761a;
         SCROLLBAR-HIGHLIGHT-COLOR: #22b14c;
         SCROLLBAR-SHADOW-COLOR: #22b14c;
         SCROLLBAR-ARROW-COLOR: #22b14c;
         SCROLLBAR-TRACK-COLOR: #22b14c;
        SCROLLBAR-3DLIGHT-COLOR: #19b14c;
         SCROLLBAR-DARKSHADOW-COLOR: #19b14c;  
         background-color:#65927b;
}
.choose_domen {
   display: block;    
   height: 50px;    
   background: url(/new_diz/choose_domen_m.gif) repeat-x top;   
   position: relative; z-index: 4;   
}

.choose_j {
   display: block;    
   height: 50px;
    
   background: url(/new_diz/choose_domen_m.gif) repeat-x top;   
   position: relative; z-index: 4;   
}

.choose_domen .l, .choose_domen .r, .choose_j .j, .choose_j .l { height: 50px; }
.choose_domen .l { float: left; width: 19px; background: url(/new_diz/choose_domen_l.gif) no-repeat top left; }
.choose_domen .r { float: right; width: /*87*/102px; background: url(/new_diz/choose_domen_r.gif) no-repeat top left; }
.choose_j .l { float: left; width: 19px; background: url(/new_diz/choose_domen_l.gif) no-repeat top left; }
.choose_j .j { float: right; width: /*87*/35px; background: url(/new_diz/choose_1.png) no-repeat top left #65927b; }

.choose_domen .mm {   
   margin-left: 19px; margin-right: 102px; padding-top: 7px;          
}

.choose_j .mn {   
   margin-left: 19px; margin-right: 42px; padding-top: 7px;          
}
.choose_domen_input {       
   font-size: 16px;     
   color: #fff;   
   background: none;
   border: 0;   
   width: 100%;           
}
.m_price .text_left { padding:0px 3px 0px 10px; }
.m_price { width: 100%; max-width: 1300px; margin: 0 auto; }
.noscript_domain {
   position: absolute; z-index: 45;
   top:12px; left:15px;  
}
.codeNapoff {font-size:8pt;background:#FFD700 0 0 no-repeat;}  
.codeNapon {font-size:8pt;background:#A52A2A 0 0 no-repeat;}
.codeChatoff {font-size:8pt;background:#00BFFF 0 0 no-repeat;}  
.codeChatonn {font-size:8pt;background:#EEDD82 0 0 no-repeat;}   
.codeBattoninfo {font-size:8pt;background:#51B11B 0 0 no-repeat;}  
.codeBattoninfo {font-size:8pt;background:#51B11B 0 0 no-repeat;}
.codesmile {font-size:8pt;background:#40E0D0 0 0 no-repeat;}  
.relative { position: relative; display: block; }
.relative2 { position: relative; top: -7; display: block;}
</style>  

</head>

<body leftmargin=0 topmargin=0 marginheight=0 marginwidth=0 bgcolor=#E6E6E6 onload="rslength()">
<form action='' method='post' name="F1" id="F1">
<?php
print <<<HERE
<input type='hidden' name='author' value='$login'>
HERE;
?>

<table align=left  style='width: 100%'>
<tr>                    
<td align="center" colspan=2>
<?php if(( $Group == 5) or ($Group == 1))  {  ?>
<span style="padding-right: 1px;" id="bc2"><input style="background: #551A8B;" title="Цвет наставника"  value="N" onclick="simpletagnast()" class="codeButtons" style="width: 20px; font-style: italic;" type="button"></span>  
<?php }  ?>
<?php if(( $Group == 6) or ( $Group == 2) or ($Group == 1))  {  ?>
<span style="padding-right: 1px;"> <input style="background: White;" title="Жирный"  value="В" onclick="parent.AddToChat()" class="codeButtons" style="width: 20px; font-style: italic;" type="button"></span>  
<span style="padding-right: 1px;"  id="bc2"><input style="background: red;" title="Красный"  value="К" onclick="parent.simpletag()" class="codeButtons" style="width: 20px; font-style: italic;" type="button"></span>  
<span style="padding-right: 1px;" id="bc2"><input style="background: blue;" title="Синий"  value="С" onclick="parent.Sinii()" class="codeButtons" style="width: 20px; font-style: italic;" type="button"></span>  

<INPUT type="button" title="Предупреждение администрации" value="»Ругаться«" onclick="parent.tag_stop('message','')" class="codeBattonsStop" style="width:80px;" >  
<INPUT type="button" title="Внимание" value="»Внимание«" onclick="parent.tag_warning('message','')" class="codeBattonswarning" style="width:80px;" >  
<INPUT type="button" title="Информация" value="»Информация«" onclick="parent.tag_ok('message','')" class="codeBattoninfo" style="width:80px;" >  
<?php }  ?>

<?php if( $Group == 3 ) {  ?>
<span style="padding-right: 1px;"> <input style="background: White;" title="Жирный"  value="В" onclick="parent.AddToChat()" class="codeButtons" style="width: 20px; font-style: italic;" type="button"></span>  
<span style="padding-right: 1px;"  id="bc2"><input style="background: red;" title="Красный"  value="К" onclick="parent.simpletag()" class="codeButtons" style="width: 20px; font-style: italic;" type="button"></span>  
<span style="padding-right: 1px;" id="bc2"><input style="background: blue;" title="Синий"  value="С" onclick="parent.Sinii()" class="codeButtons" style="width: 20px; font-style: italic;" type="button"></span>  
<?php }  ?>
<INPUT type="button" title="Очистить весь чат" value="»Очистить чат«" onclick="parent.drop_chat()" class="codeBattoninfo" style="width:90px;" >
<INPUT type="button" title="Смайлы" value="»Смайлы«" onclick='parent.smileon("0")' class="codesmile" style="width:90px;" >  
<?php if($myrow["Pv_eset"]>0) {  ?>                    
<INPUT type="button" title="Отключить нападение покемонов" value="»Дикие покемоны«" onclick="location.href='game.php?go=buttons&napadenie=off';" class="codeNapon" style="width:120px;" >
<? } else { ?>
<INPUT type="button" title="Включить нападение покемонов" value="»Нормальный режим«" onclick="location.href='game.php?go=buttons&napadenie=on';" class="codeNapoff" style="width:120px;" >
<? } ?>

<?php if($myrow["chat"]==0) {  ?>
<INPUT type="button" title="Включить общий чат" value="»Нормальный чат«" onclick="location.href='game.php?go=buttons&gochat=on';" class="codeChatoff" style="width:120px;" >
<? } else { ?>
<INPUT type="button" title="Выключить общий чат" src="/new_diz/ok.png" onclick="location.href='game.php?go=buttons&gochat=off';" class="codeChatonn" style="width:120px;" >
<? } ?>

<INPUT type="button" title="Обмен с игроками"  value="»Инвентарь«" onclick="parent.item_on()" class="codeBattoninfo" style="width:80px;" >
<INPUT type="button" title="Разведение покемонов" value="»Разведение«" onclick="parent._location.location='game.php?go=char&newpok=1&to_tren='+document.getElementById('F1')['to'].value;" class="codeBattoninfo" style="width:90px;" >

</td></tr>                    
<td style="width:85%;">
     <div class='choose_domen m_price text_left' style="width:100%;">
         <div class='l'></div>
         <div class='block_domain'></div>
         <div class='r relative'>
             <div class='noscript_domain'>
            <span class='relative2'><input type="image" src="/img/other/b_ok.gif" name="submit" value="Отправить"></span>  
             </div>                     
         </div>       
         <div class='mm'><input type='text' name='text' value='' class='choose_domen_input' /></div>  
</td>
<td style="width:15%;">
     <div class='choose_j m_price text_left' style="width:100%;">
         <div class='l'></div>
         <div class='block_domain'></div>
         <div class='j relative'>

         </div>                
            
         <div class='mn'><input name='to' type='text' value='' class='choose_domen_input' /></div>  
</td>
</form>
</table>  
</body>
</html>
AruroДата: Понедельник, 11 Июня 2012, 13:03 | Сообщение # 28 | Тема: Помогите, ошибка в bd3.php
частый гость
Сейчас нет на сайте
Code
Parse error: syntax error, unexpected T_LNUMBER in /www/elitno.net/p/o/pokeworld/home/site/include/db3.php on line 11

сейчас такая ошибка... что это?(
AruroДата: Понедельник, 11 Июня 2012, 12:10 | Сообщение # 29 | Тема: Помогите, ошибка в bd3.php
частый гость
Сейчас нет на сайте
Quote (Lord135)
Не подключен к SQL серверу. А вообще учи php и MySql

и что делать?
AruroДата: Воскресенье, 10 Июня 2012, 22:47 | Сообщение # 30 | Тема: Помогите, ошибка в bd3.php
частый гость
Сейчас нет на сайте
В bd3.php ошибка...
Code
<?php

$db=false;
$last_sql_log = '';
  define('MYSQL_NOW','asd67kjk*(&86123');
  define('MYSQL_INC','asd6asd7kjk*(&86123');

function db($config=false){
  global $db;
  if(!$db){
   $db = mysql_connect ('localhost','root','') or  die('Not connect to SQL server');
   mysql_select_db('pokeworld',$db) or  die('Not connect to SQL database');

  }
  return $db;
}

function escapeArr($arr){
  for($i=1,$n=sizeof($arr);$i<$n;$i++){
   $arr[$i] = mysql_real_escape_string($arr[$i]);
  }
  return $arr;
}

   

function query($s){
  global $last_sql_log;
  if(func_num_args()>1){
   $arr = func_get_args();
   $s = call_user_func_array('sprintf',escapeArr($arr));
  }else if(is_array($s)){
   $s = call_user_func_array('sprintf',escapeArr($s));
  }
  $res = mysql_query($s);
  if($error = mysql_error()) {
   $last_sql_log = '<div>Query: '.$s.'</div><div style="color:red">Error: '.$error.'</div>';
   print $last_sql_log;
   die();
  }
  return $res;
}

function select(){
  $arr = func_get_args();
  $res = call_user_func_array('query',$arr);
  $arr = Array();
  while($line = mysql_fetch_assoc($res)) $arr[] = $line;
  return $arr;
}

function select_key($key,$items){
  $list = array();
  for($i=0,$n=sizeof($items);$i<$n;$i++){
   $list[$items[$i][$key]] = $items[$i];
  }
  return $list;
}
/**
  * Выполняет запрос выборки одной записи к базе данных.
  * Если передано более одного параметра, они буду  
  * вставлены в запрос sprintf`ом
  * @return array Выбранная запись
  */
function first(){
  $arr = func_get_args();
  $res = call_user_func_array('query',$arr);
  return mysql_fetch_assoc($res);
}

function insert($table, $query){
   $arg1 = array();
   $arg2 = array();
   foreach($query as $k=>$v) {
    $arg1[] = sprintf('`%s`',$k);
    switch($v){
     case MYSQL_NOW:
      $arg2[] = 'NOW()';
     break;
     default:
      $arg2[] = sprintf('"%s"',mysql_escape_string(trim($v)));
     break;
    }
   }
   $s = 'INSERT INTO '.$table.' ('.implode(',',$arg1).')VALUES('.implode(',',$arg2).')';
   if(query($s)){
    return mysql_insert_id();
   }else{
    return false;
   }
  }

function update($table,$query,$where){
  $arr=array();
  foreach($query as $k=>$v) {
   $arr[] = sprintf('`%s`="%s"',$k,mysql_escape_string(trim($v)));
  }
  return query('UPDATE '.$table.' SET '.implode(',',$arr).' WHERE '.$where);
}

function delete($table,$where){
  return query('DELETE FROM '.$table.' WHERE '.$where);
}

?>

не заходит на index.php вот какая ошибка
Code
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: NO) in /www/elitno.net/p/o/pokeworld/home/site/include/db3.php on line 11
Not connect to SQL server
Форум игроделов » Записи участника » Aruro [30]
  • Страница 2 из 2
  • «
  • 1
  • 2
Поиск:

Все права сохранены. GcUp.ru © 2008-2024 Рейтинг