-
userkit
-
- 文章: 70
- 註冊時間: 2005-11-29 6:54 pm
由 userkit » 2005-12-04 9:27 am
1.如何在聊天室中顯示玩家登入和登出?..我看了之前的文章...但都不明白要如何改才可以...
2.如何令冒險分區更新...我都看過之前的文章...但又有不明白...如何在
分區中新增一個更新按鈕呢?
請大大解答解答~
還有還有...如何在聊天室中 加入會動的圖片如
如動作列表一樣的..
-
涅魂
-
- 文章: 4463
- 註冊時間: 2004-01-04 11:17 am
- 來自: Taiwan
- 性別: 男生
由 涅魂 » 2005-12-04 11:22 am
1.請提供該篇文章連結...要把舊文章找出來也不容易的...
2.目前的WOG的線上人數早已有更新的功能,所以這可能是您修改時所產生的問題。
3.參考動作列表的文字替換方式,把替換的結果改成HTML語法中的<IMG>即可。
-
涅魂
-
- 文章: 4463
- 註冊時間: 2004-01-04 11:17 am
- 來自: Taiwan
- 性別: 男生
由 涅魂 » 2005-12-04 8:03 pm
聊天室顯示登入登出的訊息其實不會很難,只需要加入短短十幾行而已,別把它看得很難...
開啟檔案wog/class/wog_act_chara.php
尋找
- 代碼: 選擇全部
setcookie("wog_cookie",$p[p_id]);
上面,加上 - 代碼: 選擇全部
$fp=fopen("wog_message.txt","a"); fputs($fp,$p[p_id]."#@#0#@#"."0"."#@#"."FFFF9F #@#<b>[系統] (".date("h:i a").")玩家 ".$p[p_name]." 登入了</b>\r\n"); fclose($fp); $fp=fopen("wog_history.txt","a"); fputs($fp,$user_id."#@#"."0"."#@#"."FFFF9F #@#<b>[系統] (".date("Y,Md :h:i a").")玩家 ".$p[p_name]." 登入了</b>\r\n"); fclose($fp);
尋找 - 代碼: 選擇全部
setcookie("wog_cookie","");
上面,加上 - 代碼: 選擇全部
$p=$DB_site->query_first("SELECT p_name FROM wog_player WHERE p_id=$user_id"); $word_say=$user_id."#@#0#@#"."0"."#@#"."FFFF00 #@#<b>[全] (".date("h:i a").")".$p[p_name]."登出了</b>\r\n"; $fp=fopen("wog_message.txt","a"); fputs($fp,$user_id."#@#0#@#"."0"."#@#"."9F9F9 #@#<b>[系統] (".date("h:i a").")玩家 ".$p[p_name]." 登出了</b>\r\n"); fclose($fp); $fp=fopen("wog_history.txt","a"); fputs($fp,$user_id."#@#"."0"."#@#"."9F9F9F #@#<b>[系統] (".date("Y,Md :h:i a").")玩家 ".$p[p_name]." 登出了</b>\r\n"); fclose($fp);
完畢。
最後由 涅魂 於 2005-12-05 12:00 am 編輯,總共編輯了 1 次。
-
OIP
-
- 文章: 101
- 註冊時間: 2005-08-14 6:03 pm
- 來自: O-iPOWER
- 性別: 男生
-
由 OIP » 2005-12-04 11:18 pm
- 代碼: 選擇全部
$fp=fopen("wog_message.txt","a"); fputs($fp,$p[p_id]."#@#0#@#"."0"."#@#"."FFFF9F #@#<b>[系統] (".date("h:i a").")玩家 ".$p[p_name]." 登入了</b>\r\n"); fclose($fp); $fp=fopen("wog_history.txt","a"); fputs($fp,$user_id."#@#"."0"."#@#"."FFFF9F #@#[color=red]</b>[/color][系統] (".date("Y,Md :h:i a").")玩家 ".$p[p_name]." 登入了</b>\r\n"); fclose($fp);
應該是<B>
-
hawaii
-
- 文章: 11
- 註冊時間: 2004-11-15 8:37 pm
由 hawaii » 2005-12-06 7:48 pm
但這是不會自動消失的~
-
涅魂
-
- 文章: 4463
- 註冊時間: 2004-01-04 11:17 am
- 來自: Taiwan
- 性別: 男生
由 涅魂 » 2005-12-07 9:54 pm
當然不會消失,這是紀錄wog_meddage.txt中的資料
若沒有做些特殊處理的話裡面的資料不會突然消失的...
-
hawaii
-
- 文章: 11
- 註冊時間: 2004-11-15 8:37 pm
由 hawaii » 2005-12-08 5:10 pm
怎樣才可以自動消失~?
-
涅魂
-
- 文章: 4463
- 註冊時間: 2004-01-04 11:17 am
- 來自: Taiwan
- 性別: 男生
由 涅魂 » 2005-12-08 7:28 pm
在問之前請先自行研究看看吧...。
-
hawaii
-
- 文章: 11
- 註冊時間: 2004-11-15 8:37 pm
由 hawaii » 2005-12-08 11:58 pm
我已研究了一段時間~
但新手始終是新手~
-
涅魂
-
- 文章: 4463
- 註冊時間: 2004-01-04 11:17 am
- 來自: Taiwan
- 性別: 男生
由 涅魂 » 2005-12-09 7:04 pm
既然您有研究過的話您可以將您的研究成果貼出來,然後再讓大家一起來討論。
若只是一昧地請別人幫您寫好的話那新手就永遠只是個新手了。
-
userkit
-
- 文章: 70
- 註冊時間: 2005-11-29 6:54 pm
由 userkit » 2005-12-09 7:47 pm
- 代碼: 選擇全部
<? /*===================================================== Copyright (C) ETERNAL<iqstar@ms24.hinet.net> Modify : 2005/01/01 URL : http://www.2233.idv.tw This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. ===================================================== */
class wog_act_chara{ var $group_id=""; function chara_make() //創造新增頁面 { $de_ip=file("wog_deip.txt"); $p_ip=get_ip(); for($de=0;$de<count($de_ip);$de++) { if($p_ip==$de_ip[$de]){alertWindowMsg("您已經被管理員設定為禁止登入!有問題請與管理員聯繫。");} } /* alertWindowMsg("遊戲維護中,暫時關閉註冊"); */ global $DB_site,$_POST,$wog_arry,$lang; $temp_i_id=""; $img=$DB_site->query("select i_id from wog_img order by i_id asc"); while($imgs=$DB_site->fetch_array($img)) { $temp_i_id.=",".$imgs["i_id"]; } $DB_site->free_result($img); unset($imgs); $temp_i_id=substr($temp_i_id,1,strlen($temp_i_id)); $temp_ch=""; $ch=$DB_site->query("select ch_id,ch_name from wog_character where ch_mlv=1 "); while($chs=$DB_site->fetch_array($ch)) { $temp_ch.=";".$chs["ch_id"].",".$chs["ch_name"]; } $DB_site->free_result($ch); unset($chs); $temp_ch=substr($temp_ch,1,strlen($temp_ch)); include("wog_chara_make.php"); echo "<script language=JavaScript >\n"; echo "setup_temp_i_id('$temp_i_id');\n"; echo "setup_temp_ch('$temp_ch');\n"; echo "chara_make_view('$wog_arry[total_point]');\n"; echo "</script>\n"; }
function chara_save($bbs_id) //儲存新增角色 { global $DB_site,$_POST,$wog_arry,$lang; $errormessage=""; if(!isset($_POST["id"]) || !isset($_POST["pass"]) || !isset($_POST["sex"]) || !isset($_POST["s"]) || !isset($_POST["email"])) { $errormessage.=$lang['wog_act_chara_errdata']; } if(empty($_POST["id"]) || empty($_POST["pass"]) || empty($_POST["sex"]) || empty($_POST["s"]) || empty($_POST["email"])) { $errormessage.=$lang['wog_act_chara_errdata']; } if (eregi("[<>'\", ;]", $_POST["id"]) || eregi("[<>'\", ]", $_POST["pass"]) || eregi("[<>'\", ;]", $_POST["sat_name"])) { $errormessage.=$lang['wog_act_errword']; } if((int)$_POST["str"]<=0 || (int)$_POST["smart"]<=0 || (int)$_POST["agl"]<=0 || (int)$_POST["life"]<=0 ) { $errormessage.=$lang['wog_act_chara_errpoint']; } if( ((int)$_POST["str"]+(int)$_POST["smart"]+(int)$_POST["agl"]+(int)$_POST["life"]) > $wog_arry["total_point"] ) { $errormessage.=$lang['wog_act_chara_fulpoint'].$wog_arry["total_point"].","; } if((int)$_POST["ch"] > 8) { $errormessage.=$lang['wog_act_chara_errjob']; } if($p=$DB_site->query_first("select p_id from wog_player where p_name='".trim($_POST["id"])."'")) { $errormessage.=$lang['wog_act_chara_usedid']; } if(empty($forum_message)) { if($p=$DB_site->query_first("select count(p_id) as p_id from wog_player where p_email='".trim($_POST["email"])."'")) { if($wog_arry["player_num"] <= $p[0]) { $errormessage.=$lang['wog_act_chara_fulnum']; } } }
if(!empty($forum_message)) { if($p=$DB_site->query_first("select count(p_bbsid) as p_bbsid from wog_player where p_bbsid=".$bbs_id."")) { if($wog_arry["player_num"] <= $p[0]) { $errormessage.=$lang['wog_act_chara_fulnum']; } } } if(empty($errormessage)) { switch ((int)$_POST["ch"]) { case 6: $a_at=10; $a_mat=0; $a_agl=5; $a_id=2; break; case 7: $a_at=0; $a_mat=10; $a_agl=5; $a_id=4; break; case 8: $a_at=6; $a_mat=0; $a_agl=8; $a_id=3; break; } $d_df=3; $d_mdf=1; $d_agl=2; $d_id=1; // srand ((float) microtime() * 10000000); //php 4.2 以上可以不用 $luck=rand(1,10); $DB_site->query("insert into wog_player(p_name,p_at,p_df,p_mat,p_mdf,p_s ,p_url,p_homename,p_str,p_life,p_smart,p_agl,p_au,p_be,p_hp,p_luck,p_sat_name ,p_hpmax,ch_id,p_money,p_lv,p_exp,p_nextexp,p_sex,a_id,d_body_id ,p_password,i_img,p_cdate,p_email,p_online_time,p_bbsid )values('".htmlspecialchars(trim($_POST["id"]))."',".($a_at+$_POST["str"]+8).",".($d_df+$_POST["str"]+8). ",".($a_mat+$_POST["smart"]+8).",".($d_mdf+$_POST["smart"]+8).",".$_POST["s"].",'".$_POST["url"]."','".$_POST["site"]."' ,".($_POST["str"]+8).",".($_POST["life"]+8).",".($_POST["smart"]+8).",".($a_agi+$_POST["agl"]+8).",8,8 ,45,".$luck.",'".htmlspecialchars(trim($_POST["sat_name"]))."',45,".$_POST["ch"].",1000,1 ,0,1000,'".$_POST["sex"]."',".$a_id.",".$d_id.",'".$_POST["pass"]."' ,".$_POST["i_id"].",".time().",'".htmlspecialchars(trim($_POST["email"]))."',".time().",".$bbs_id." )"); $user_id=$DB_site->insert_id(); $DB_site->query("insert into wog_item(p_id,a_id,d_body_id,d_foot_id,d_hand_id,d_head_id,d_item_id )values(".$user_id.",'','','','','','')"); $DB_site->query("insert into wog_ch_exp(p_id)values(".$user_id.")"); }else { alertWindowMsg($errormessage); } echo $errormessage; unset($errormessage); setcookie("wog_cookie",$user_id); setcookie("wog_key",$key); setcookie("wog_cookie_name",trim($_POST["id"])); setcookie("wog_bbs_id",$bbs_id); echo "<script>parent.frames['chat'].location.href=\"wog_chat.php?name=".htmlspecialchars(trim($_POST["id"]))."&password=".htmlspecialchars(trim($_POST["pass"]))."\";\n</script>"; setcookie("wog_cookie_debug",md5($user_id.$bbs_id.$wog_arry[cookie_debug])); $this->show_chara($user_id,$bbs_id,1); showscript("parent.peolist.document.location.reload()"); }
function login($bbs_id,$p_ip) { global $DB_site,$_POST,$wog_arry,$lang,$forum_message; $de_ip=file("wog_deip.txt"); $p_ip=get_ip(); for($de=0;$de<count($de_ip);$de++) { if($p_ip==$de_ip[$de]){alertWindowMsg("您已經被管理員設定為禁止登入!有問題請與管理員聯繫。");} } if (eregi("[<>'\", ]", $_POST["id"]) || eregi("[<>'\", ]", $_POST["pass"])) { alertWindowMsg($lang['wog_act_errword']); } $p=$DB_site->query("select p_id from wog_player where p_online_time < ".(time()-($wog_arry["del_day"]*24*60*60))." and p_st <= 0"); //刪除角色 while($ps=$DB_site->fetch_array($p)) { $this->kill_sub($ps["p_id"]); } [color=red]$p=$DB_site->query_first("select p_id,p_name,p_lock,p_online_time,p_lock_time,p_bbsid,p_st from wog_player where p_name='".$_POST["id"]."' and p_password='".$_POST["pass"]."' ");[/color] if($p) { if($p[p_lock]==1) { alertWindowMsg($lang['wog_act_chara_nologin']); } if($p[p_st]==0) { $datecut = time() - $wog_arry["offline_time"]; $online=$DB_site->query_first("select count(p_name) as num from wog_player where p_online_time > $datecut"); $pass_user=$DB_site->query_first("select p_userlv from wog_player where p_name = '".$_POST["id"]."'"); if($online[num]>=$wog_arry["online_limit"] && $pass[p_userlv] == 0){ showscript("parent.incd(".$wog_arry["login_time"].")"); } } if($p[p_bbsid]==0) { $sql="SELECT p_bank FROM wog_player where p_id = ".$p[p_id]." "; $bank=$DB_site->query_first($sql); $DB_site->query("update ".USER_TABLE." set ".BANK_FIELB."=".BANK_FIELB."+".$bank["p_bank"]." where ".USER_ID."=".$bbs_id.""); } $DB_site->query("update wog_player set p_bbsid=".$bbs_id.",p_ip='".$p_ip."' where p_id=".$p[p_id].""); if(!empty($forum_message)) { $datecut = time() - $wog_arry["offline_time"]; $check_time=$DB_site->query_first("select p_online_time from wog_player where p_bbsid=".$bbs_id." and p_online_time > $datecut and p_id<>".$p[p_id].""); if($check_time) { alertWindowMsg($lang['wog_act_chara_sameid']); } } $fp=fopen("wog_message.txt","a"); fputs($fp,$p[p_id]."#@#0#@#"."0"."#@#"."FFFF9F #@#<b>[系統] (".date("h:i a").")玩家 ".$p[p_name]." 登入了</b>\r\n"); fclose($fp); $fp=fopen("wog_history.txt","a"); fputs($fp,$user_id."#@#"."0"."#@#"."FFFF9F #@#<b>[系統] (".date("Y,Md :h:i a").")玩家 ".$p[p_name]." 登入了</b>\r\n"); fclose($fp); setcookie("wog_cookie",$p[p_id]);
setcookie("wog_cookie_name",$p[p_name]); setcookie("wog_bbs_id",$bbs_id); echo "<script>parent.frames['chat'].location.href=\"wog_chat.php?name=".htmlspecialchars(trim($_POST["id"]))."&password=".htmlspecialchars(trim($_POST["pass"]))."\";\n</script>"; setcookie("wog_cookie_debug",md5($p[p_id].$bbs_id.$wog_arry[cookie_debug])); $this->show_chara($p[p_id],$bbs_id,1); showscript("parent.peolist.document.location.reload()"); }else { alertWindowMsg($lang['wog_act_chara_errlogin']); } unset($p); }
function revive($user_id) { global $DB_site,$wog_arry,$lang; $DB_site->query("update wog_player set p_hp=p_hpmax,p_exp=p_exp*0.8 where p_id=".$user_id); showscript("parent.job_end(19)"); } function dlo($user_id) { global $DB_site,$wog_arry,$lang; $have_price=$DB_site->query_first("select p_money,p_lv from wog_player where p_id=".$user_id.""); if($wog_arry["chang_dlo"]>$have_price[0] || $have_price[p_lost]>10){ alertWindowMsg("金額不足 或 輸的場數不足 或 悟性不足"); } $DB_site->query("update wog_player set p_lost=p_lost-10,p_money=p_money-".$wog_arry["chang_dlo"]." where p_id=".$user_id); showscript("parent.job_end(32)"); }
function logout($user_id) { global $DB_site,$wog_arry,$lang; $DB_site->query("update wog_player set p_online_time=".(time() - $wog_arry["offline_time"])." where p_id=".$user_id); $p=$DB_site->query_first("SELECT p_name FROM wog_player WHERE p_id=$user_id"); $word_say=$user_id."#@#0#@#"."0"."#@#"."FFFF00 #@#<b>[全] (".date("h:i a").")".$p[p_name]."登出了</b>\r\n"; $fp=fopen("wog_message.txt","a"); fputs($fp,$user_id."#@#0#@#"."0"."#@#"."9F9F9 #@#<b>[系統] (".date("h:i a").")玩家 ".$p[p_name]." 登出了</b>\r\n"); fclose($fp); $fp=fopen("wog_history.txt","a"); fputs($fp,$user_id."#@#"."0"."#@#"."9F9F9F #@#<b>[系統] (".date("Y,Md :h:i a").")玩家 ".$p[p_name]." 登出了</b>\r\n"); fclose($fp); setcookie("wog_cookie",""); setcookie("wog_cookie_name",""); setcookie("wog_bbs_id",""); showscript("parent.document.URL='".$wog_arry["logout_url"]."';"); }
function show_chara($user_id,$bbs_id,$s) { global $DB_site,$lang; if(empty($user_id)) { alertWindowMsg($lang['wog_act_noid']); } $p=$DB_site->query_first("select wog_player.p_name,wog_player.p_at,wog_player.p_df,wog_player.p_mat ,wog_player.p_mdf,wog_player.p_at,wog_player.p_df,wog_player.p_s,wog_player.p_url ,wog_player.p_homename,wog_player.p_str,wog_player.p_life,wog_player.p_smart,wog_player.p_agl ,wog_player.p_au,wog_player.p_be ,wog_player.p_hp,wog_player.p_hpmax,wog_player.p_money,wog_player.p_lv,wog_player.p_exp ,wog_player.p_nextexp,wog_player.p_win,wog_player.p_lost,wog_player.p_url,wog_player.p_homename ,wog_player.p_sex,wog_player.i_img,wog_player.p_sat_name,wog_character.ch_name,a.d_name as a_name,s.ch_name as s_ch_name ,b.d_name,e.d_name as e_name,d.d_name as dd_name,c.d_name as c_name,f.d_name as item_name,g.g_name,g.g_id from wog_player left join wog_character on wog_player.ch_id=wog_character.ch_id left join wog_group_main g on wog_player.p_g_id=g.g_id left join wog_character s on wog_player.p_ch_s_id=s.ch_id left join wog_df a on wog_player.a_id=a.d_id left join wog_df b on wog_player.d_body_id=b.d_id left join wog_df e on wog_player.d_head_id=e.d_id left join wog_df d on wog_player.d_hand_id=d.d_id left join wog_df c on wog_player.d_foot_id=c.d_id left join wog_df f on wog_player.d_item_id=f.d_id where wog_player.p_id=".$user_id.""); $p_style=$DB_site->query_first("select a.g_s_name from wog_group_style a,wog_player b where a.g_id=b.p_g_id and a.g_s_lv=b.p_g_lv and b.p_id=".$user_id.""); $this->group_id=$p["g_id"]; echo "<script language=JavaScript >\n"; echo "parent.p_style='".$p_style["g_s_name"]."';"; if($s==1) { echo "parent.p_group='".$p["g_name"]."';"; echo "parent.login_view($p[p_win],$p[p_lost],'$p[i_img]','$p[p_name]','$p[p_sex]','$p[ch_name]','$p[p_s]','$p[p_lv]','$p[p_exp]','$p[p_nextexp]','$p[p_money]','$p[p_hp]','$p[p_hpmax]','$p[p_str]','$p[p_smart]','$p[p_agl]','$p[p_life]','$p[p_au]','$p[p_be]','$p[p_at]','$p[p_mat]','$p[p_df]','$p[p_mdf]','$p[a_name]','$p[d_name]','$p[e_name]','$p[dd_name]','$p[c_name]','$p[item_name]','$p[p_url]','$p[p_homename]','$p[s_ch_name]','$p[p_sat_name]','$bbs_id');\n"; }elseif($s=2) { echo "parent.p_group='".$p["g_name"]."';"; echo "parent.systeam_view2($p[p_win],$p[p_lost],'$p[i_img]','$p[p_name]','$p[p_sex]','$p[ch_name]','$p[p_s]','$p[p_lv]','$p[p_exp]','$p[p_nextexp]','------','$p[p_hp]','$p[p_hpmax]','$p[p_str]','$p[p_smart]','$p[p_agl]','$p[p_life]','$p[p_au]','$p[p_be]','$p[p_at]','$p[p_mat]','$p[p_df]','$p[p_mdf]','$p[a_name]','$p[d_name]','$p[e_name]','$p[dd_name]','$p[c_name]','$p[item_name]','$p[p_url]','$p[p_homename]','$p[s_ch_name]','$p[p_sat_name]');\n"; } echo "</script>\n"; unset($p); }
function cp_view() { global $DB_site,$lang; $p=$DB_site->query_first("select wog_cp.p_name,wog_cp.p_at,wog_cp.p_df,wog_cp.p_mat ,wog_cp.p_mdf,wog_cp.p_at,wog_cp.p_df,wog_cp.p_s,wog_cp.p_url ,wog_cp.p_homename,wog_cp.p_str,wog_cp.p_life,wog_cp.p_smart,wog_cp.p_agl,wog_cp.p_au,wog_cp.p_be ,wog_cp.p_hp,wog_cp.p_hpmax,wog_cp.p_money,wog_cp.p_lv,wog_cp.p_exp,wog_cp.p_url,wog_cp.p_homename ,wog_cp.p_nextexp,wog_cp.p_win,wog_cp.p_lost,wog_cp.p_sex,wog_cp.i_img,wog_cp.p_win_total ,wog_character.ch_name,a.d_name as a_name ,b.d_name,e.d_name as e_name,d.d_name as dd_name ,c.d_name as c_name,f.d_name as item_name,s.ch_name as s_ch_name,g.g_name from wog_cp left join wog_character on wog_cp.ch_id=wog_character.ch_id left join wog_group_main g on wog_cp.p_g_id=g.g_id left join wog_character s on wog_cp.p_ch_s_id=s.ch_id left join wog_df a on wog_cp.a_id=a.d_id left join wog_df b on wog_cp.d_body_id=b.d_id left join wog_df e on wog_cp.d_head_id=e.d_id left join wog_df d on wog_cp.d_hand_id=d.d_id left join wog_df c on wog_cp.d_foot_id=c.d_id left join wog_df f on wog_cp.d_item_id=f.d_id LIMIT 1 "); $a_act=$DB_site->query("select p_name,p_a_win from wog_player order by p_a_win desc limit 3"); $temp_s=""; while($a_acts=$DB_site->fetch_array($a_act)) { $temp_s.=";".$a_acts[0].",".$a_acts[1]; } $temp_s=substr($temp_s,1,strlen($temp_s)); $DB_site->free_result($a_act); unset($a_acts); showscript("parent.p_group='".$p["g_name"]."';parent.cp_view($p[p_win],$p[p_lost],'$p[i_img]','$p[p_name]','$p[p_sex]','$p[ch_name]','$p[p_s]','$p[p_lv]','$p[p_exp]','$p[p_nextexp]','$p[p_money]','$p[p_hp]','$p[p_hpmax]','$p[p_str]','$p[p_smart]','$p[p_agl]','$p[p_life]','$p[p_au]','$p[p_be]','$p[p_at]','$p[p_mat]','$p[p_df]','$p[p_mdf]','$p[a_name]','$p[d_name]','$p[e_name]','$p[dd_name]','$p[c_name]','$p[item_name]','$p[p_url]','$p[p_homename]','$p[s_ch_name]','$p[p_win_total]','$temp_s')"); unset($p); }
function kill() { global $DB_site,$_POST,$lang; $sql="select p_id from wog_player where p_name='".trim($_POST["id"])."' and p_password='".$_POST["password"]."'"; $p=$DB_site->query_first($sql); if($p) { $this->kill_sub($p["p_id"]); showscript("parent.job_end(1)"); }else { alertWindowMsg($lang['wog_act_kill']); } unset($p); }
function kill_sub($p_id) { global $DB_site,$lang; $group_main=$DB_site->query_first("select a.g_id,a.g_adm_id1,a.g_adm_id2 from wog_group_main a,wog_player b where a.g_id=b.p_g_id and b.p_id=".$p_id); if($group_main) { if($p_id==$group_main["g_adm_id1"]) { $DB_site->query("delete from wog_group_main where g_id=".$group_main["g_id"].""); $DB_site->query("delete from wog_group_area where g_id=".$group_main["g_id"].""); $DB_site->query("delete from wog_group_event where g_b_id=".$group_main["g_id"].""); $DB_site->query("update wog_player set p_g_id=0,p_g_a_id=0,p_g_number=0,p_g_morale=0 where p_g_id=".$group_main["g_id"].""); }else { $DB_site->query("update wog_group_main set g_peo=g_peo-1 where g_id=".$group_main["g_id"].""); } } $DB_site->query("delete from wog_player where p_id=".$p_id.""); $DB_site->query("delete from wog_item where p_id=".$p_id.""); $DB_site->query("delete from wog_ch_exp where p_id=".$p_id.""); $DB_site->query("delete from wog_sale where p_id=".$p_id.""); $DB_site->query("delete from wog_pet where pe_p_id=".$p_id.""); unset($group_main); }
function system_view2($user_id) { global $DB_site,$_POST,$wog_arry,$lang; $towho=trim($_POST["towho"]); if($towho=="") { alertWindowMsg($lang['wog_act_sysview_noselect']); } $have_price=$DB_site->query_first("select p_money from wog_player where p_id=".$user_id.""); if($have_price[p_money] < $wog_arry["view2_money"]) { alertWindowMsg(sprintf($lang['wog_act_nomoney_must'], $wog_arry["view2_money"])); }else { $DB_site->query("update wog_player set p_money=p_money-".$wog_arry["view2_money"]." where p_id=".$user_id.""); } $p=$DB_site->query_first("select p_id from wog_player where p_name='".$towho."'"); if($p) { $this->show_chara($p["p_id"],$userid,2); }else { alertWindowMsg($lang['wog_act_noid']); } unset($have_price); unset($p); }
function get_password($email) { global $DB_site,$lang; $p=$DB_site->query_first("SELECT p_email FROM wog_player WHERE p_email='".addslashes(htmlspecialchars($email))."'"); if($p){ $temp_s=$lang['wog_etc_email_body1']."\r\n"; $get_p=$DB_site->query("SELECT p_name,p_password from wog_player where p_email='".addslashes(htmlspecialchars($email))."'"); while($get_ps=$DB_site->fetch_array($get_p)) { $temp_s.=sprintf($lang['wog_etc_email_body2'],$get_ps[p_name])."\r\n"; $temp_s.=sprintf($lang['wog_etc_email_body3'],$get_ps[p_password])."\r\n"; } mail($p[p_email],$lang['wog_etc_email_subject'],$temp_s,"From: \"Online FF Battle - WOG\" <iqstar@pchome.com.tw>\r\n"."Reply-To: my_email@email.com\r\n"."X-Mailer: PHP/" . phpversion()); alertWindowMsg($lang['wog_etc_email_send']); } else { alertWindowMsg($lang['wog_etc_email_error']); } } } ?>
-
涅魂
-
- 文章: 4463
- 註冊時間: 2004-01-04 11:17 am
- 來自: Taiwan
- 性別: 男生
由 涅魂 » 2005-12-09 7:51 pm
您用來儲存CHAT資料的檔案名稱有確定是wog_message.txt與wog_history.txt嗎?
-
userkit
-
- 文章: 70
- 註冊時間: 2005-11-29 6:54 pm
由 userkit » 2005-12-09 7:55 pm
涅魂 寫:您用來儲存CHAT資料的檔案名稱有確定是wog_message.txt與wog_history.txt嗎?
有了..
|