-
Frances3399
-
- 文章: 40
- 註冊時間: 2004-03-30 6:22 pm
- 來自: National Kaohsiung First University of Science and Technology
-
由 Frances3399 » 2004-05-17 4:49 pm
再提一個問題~"~
為什麼輸入 '>' 會出現 '&'
而且顏色的下拉式選單的每個顏色上都出現
'&' 這個符號
煩請先進回答~~謝謝
有人說時間可以洗滌一切、忘記痛苦、拋棄思念 但為什麼我還是忘不了妳... 哆啦論壇:Kerry's Web大家有空可以來灌水一下
-
New-TypeChobits
-
- 文章: 176
- 註冊時間: 2003-12-12 9:44 am
- 來自: HONG KONG
- 性別: 男生
-
由 New-TypeChobits » 2004-05-18 1:08 am
Frances3399 寫:再提一個問題~"~ 為什麼輸入 '>' 會出現 '&' 而且顏色的下拉式選單的每個顏色上都友 '&' 這個符號 煩請先進回答~~謝謝
網址是 ...?
人在江湖... 身不由己...
-
Frances3399
-
- 文章: 40
- 註冊時間: 2004-03-30 6:22 pm
- 來自: National Kaohsiung First University of Science and Technology
-
由 Frances3399 » 2004-05-18 11:43 am
Sorry~~~
哆啦網-W.O.G線上遊戲
Account: test
Password: 1234
有人說時間可以洗滌一切、忘記痛苦、拋棄思念 但為什麼我還是忘不了妳... 哆啦論壇:Kerry's Web大家有空可以來灌水一下
-
New-TypeChobits
-
- 文章: 176
- 註冊時間: 2003-12-12 9:44 am
- 來自: HONG KONG
- 性別: 男生
-
由 New-TypeChobits » 2004-05-18 12:46 pm
嗯.. 因為phpbb的Code功能有點問題...
- 代碼: 選擇全部
$word_say=str_replace(">","& 後加上gt; $word_say=str_replace("<","&",後加上lt; echo "<option $show_select value='".$color_table[$t1]."' style='background-color: ".$color_table[$t1]."'>& 後加上nbsp;
人在江湖... 身不由己...
-
Frances3399
-
- 文章: 40
- 註冊時間: 2004-03-30 6:22 pm
- 來自: National Kaohsiung First University of Science and Technology
-
由 Frances3399 » 2004-05-20 3:23 pm
New-TypeChobits 寫:嗯.. 因為phpbb的Code功能有點問題... - 代碼: 選擇全部
$word_say=str_replace(">","& 後加上gt; $word_say=str_replace("<","&",後加上lt; echo "<option $show_select value='".$color_table[$t1]."' style='background-color: ".$color_table[$t1]."'>& 後加上nbsp;
是更改哪一個檔案
毫無頭緒~@@"
有人說時間可以洗滌一切、忘記痛苦、拋棄思念 但為什麼我還是忘不了妳... 哆啦論壇:Kerry's Web大家有空可以來灌水一下
-
New-TypeChobits
-
- 文章: 176
- 註冊時間: 2003-12-12 9:44 am
- 來自: HONG KONG
- 性別: 男生
-
由 New-TypeChobits » 2004-05-20 6:16 pm
Frances3399 寫:New-TypeChobits 寫:嗯.. 因為phpbb的Code功能有點問題... - 代碼: 選擇全部
$word_say=str_replace(">","& 後加上gt; $word_say=str_replace("<","&",後加上lt; echo "<option $show_select value='".$color_table[$t1]."' style='background-color: ".$color_table[$t1]."'>& 後加上nbsp;
是更改哪一個檔案 毫無頭緒~@@"
wog_chat.php
人在江湖... 身不由己...
-
Frances3399
-
- 文章: 40
- 註冊時間: 2004-03-30 6:22 pm
- 來自: National Kaohsiung First University of Science and Technology
-
由 Frances3399 » 2004-05-20 9:07 pm
有人說時間可以洗滌一切、忘記痛苦、拋棄思念 但為什麼我還是忘不了妳... 哆啦論壇:Kerry's Web大家有空可以來灌水一下
-
king2001
-
- 文章: 43
- 註冊時間: 2004-03-12 11:57 pm
由 king2001 » 2004-05-22 11:10 pm
那些字我的都有加上...
但結果一樣
-
kikicoco
-
由 kikicoco » 2004-06-02 8:53 pm
- 代碼: 選擇全部
echo "<script>parent.frames['chat'].location.href=\"wog_chat.php?name=".$p[p_name]."\";\n</script>";
setcookie("wog_bbs_id",$bbs_id);
原來是忘了加上上面這行
-
king2001
-
- 文章: 43
- 註冊時間: 2004-03-12 11:57 pm
由 king2001 » 2004-06-19 10:59 am
kikicoco 寫:- 代碼: 選擇全部
echo "<script>parent.frames['chat'].location.href="wog_chat.php?name=".$p[p_name]."";\n</script>";
setcookie("wog_bbs_id",$bbs_id);
原來是忘了加上上面這行
這行是加在那裡??
-
hk123
-
- 文章: 7
- 註冊時間: 2004-09-03 6:59 pm
-
由 hk123 » 2004-09-05 6:39 pm
-
viggoyu
-
- 文章: 12
- 註冊時間: 2004-08-24 6:42 pm
由 viggoyu » 2004-09-06 7:11 pm
Notice: Undefined variable: wog_arry in e:\禁\禁\user9\phpbb2\vbb_support\global.bak.php on line 23
Notice: Undefined variable: wog_arry in e:\禁\禁\user9\phpbb2\vbb_support\global.php on line 23
點解會有這些字??
還有
在未登入前 聯天欄(右下角)是白色的
如何令他變成底色?
-
viggoyu
-
- 文章: 12
- 註冊時間: 2004-08-24 6:42 pm
由 viggoyu » 2004-09-06 11:08 pm
問題已經用欺騙自己的方法在23行加@解決了
而白色的問題亦爬文後解決了
-
ㄚ玄
-
- 文章: 3
- 註冊時間: 2004-10-08 8:34 pm
- 來自: 精靈仙境
由 ㄚ玄 » 2004-10-09 9:49 am
New-TypeChobits 寫:曾答應大家將ACP Mod和Chat Mod分開, 現在譯出簡化版本.. 可給只需要聊天功能和不熟悉PHP的玩家使用.. 功能簡介: 有全頻,組頻和密頻3種 安裝難度: Easy wog_chat.php - 代碼: 選擇全部
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=big5" > <title></title> <script language="JavaScript"> function sendtowhos() { if(document.wog_chat_input.name.value!=null) {
document.wog_chat_input.towhos.value=parent.foot.document.f1.towho.value;
return true;
} return false; } </script>
</head> <style> td{ font-size : 10pt; } </style> <LINK href=./wog2.css rel=stylesheet type=text/css> <body bgcolor="#000000" leftmargin="0" topmargin="0" text="#FFFFFF" oncontextmenu="return false">
<?
$root_path = "./../"; //require($root_path.'vbb_support/function.php'); require($root_path."vbb_support/global.bak.php");
$name = $_GET["name"]; if ($name ==""){ $name = $_POST["name"]; }
if ($name == ""){ showscript("alert('聊天錯誤,請重新登入!');window.open('./','_top');"); exit(); }
$password = $_GET["password"]; if ($password == ""){ $password = $_POST["password"];}
$p=$DB_site->query_first("select p_id,p_name,p_lock,p_g_id from wog_player where p_name='$name' and p_password='$password'"); if($p) { if($p[p_lock]==1) { showscript("alert('你被凍結了');window.open('./','_top');"); exit(); } $gchat_id = $p[p_g_id]; $send_id = $p[p_id]; }else{ showscript("alert('帳號錯誤 或 密碼錯誤 或 尚未創造角色');window.open('./','_top');"); exit(); }
$bsay = $_POST["bsay"]; $color = $_POST["color"]; $color_table=array("#FFFFFF","#FFFF00","#99CC00","#A6BCFF","#F2CEFB","FF0000","#00FFFF","#928A70");//顏色表可任意更換添加 if(!empty($bsay) && trim($bsay)!=""){ $word_say=str_replace(">","&",$bsay); $word_say=str_replace("<","&",$word_say); $fp=fopen("wog_chat.txt","a"); switch ($_POST["chat_mode"]) { case "prvite": $toname = $_POST["towhos"]; $target = $DB_site->query_first("select p_id from wog_player where p_name='$toname'"); if($target) { //$towhoid = $target[p_id]; }
if ($send_id != $target[p_id] and $target[p_id] != ""){ $word_say= $send_id."#@#".$target[p_id]."#@#"."99999"."#@#".$color." #@#[密] (".date("h:i a").")<a title='發送給目標:".$name."' href='javascript:parent.yesname(&".$name."&)' target='foot' style='color: ".$color."'>".$name."</a>→<a title='發送給目標:".$name."' href='javascript:parent.yesname(&".$toname."&)' target='foot' style='color: ".$color."'>".$toname."</a>:".AddSlashes(strip_tags(trim($word_say)))."\r\n"; }else{ $word_say= $send_id."#@#"."0"."#@#"."0"."#@#".$color." #@#[全] (".date("h:i a").")<a title='發送給目標:".$name."' href='javascript:parent.yesname(&".$name."&)' target='foot' style='color: ".$color."'>".$name."</a>:".AddSlashes(strip_tags(trim($word_say)))."\r\n"; } break;
case "group": $word_say= $send_id."#@#"."0"."#@#".$gchat_id."#@#".$color." #@#[組] (".date("h:i a").")<a title='發送給目標:".$name."' href='javascript:parent.yesname(&".$name."&)' target='foot' style='color: ".$color."'>".$name."</a>:".AddSlashes(strip_tags(trim($word_say)))."\r\n"; break;
case "all": $word_say= $send_id."#@#"."0"."#@#"."0"."#@#".$color." #@#[全] (".date("h:i a").")<a title='發送給目標:".$name."' href='javascript:parent.yesname(&".$name."&)' target='foot' style='color: ".$color."'>".$name."</a>:".AddSlashes(strip_tags(trim($word_say)))."\r\n"; break; } while(!is_writeable("wog_chat.txt")){ } fputs($fp,$word_say); fclose($fp); }
?> <html>
<head> <meta http-equiv="Content-Type" content="text/html; charset=big5"> <title>即時聊天</title> </head>
<body bgcolor="#000000" leftmargin="0" topmargin="0" text="#FFFFFF">
<form method="POST" action="wog_chat.php" name="wog_chat_input" onSubmit="sendtowhos()"> <input type="hidden" name="towhos" value=""> <input type="hidden" name="name" value="<?=$name;?>"> <input type="hidden" name="password" value="<?=$password; ?>"> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" id="AutoNumber1" width="100%"> <tr> <td > <select size="1" name="color">//選顏色 <? for($t1=0;$t1<sizeof($color_table);$t1++){ $show_select=""; if($color_table[$t1]==$color) { $show_select=" selected "; } echo "<option $show_select value='".$color_table[$t1]."' style='background-color: ".$color_table[$t1]."'>&</option>"; } ?> </select> <input class="text" type="text" name="bsay" size="20" value=""> <?if ($gchat_id != 0 and $gchat_id != ""){?> 組織<input type="radio" value="group" <?if ($_POST["chat_mode"] == "group"){?>checked <?}?>name="chat_mode"><? } ?> 全體<input type="radio" value="all" onClick="javascript:parent.noname()" <?if ($_POST["chat_mode"] == "all" || $_POST["chat_mode"] == ""){?>checked <?}?>name="chat_mode"> 密談<input type="radio" value="prvite" <?if ($_POST["chat_mode"] == "prvite"){?>checked <?}?>name="chat_mode"> <input class="text" type="submit" value="送出" name="B1" > <www.et99.org name="wog_chat_write" src="wog_chat_write.php" width="102%" height="87" border="0" frameborder="0" ></www.et99.org> </td> </tr> </table> </form>
<script> wog_chat_input.bsay.focus(); </script> </body>
</html> <? // wog show java script function showscript($temp_s) { global $DB_site,$HTTP_SESSION_VARS,$wog_arry,$HTTP_SERVER_VARS,$HTTP_USER_AGENT; if(isset($DB_site)) { $DB_site->close(); } echo "<script language="JavaScript">\n"; echo $temp_s.";\n"; echo "</script>\n"; // $HTTP_SESSION_VARS['act_time']=time(); compress_exit(); // EXIT here! } ?>
wog_chat_write.php - 代碼: 選擇全部
<? $root_path = "./../"; require($root_path.'vbb_support/function.php'); require($root_path."vbb_support/global.php"); $p=$DB_site->query_first("select p_id,p_name,p_lock,p_g_id from wog_player where p_name='".$HTTP_COOKIE_VARS["wog_cookie_name"]."'"); if($p) { if($p[p_lock]==1) { showscript("alert('你被凍結了');window.open('./','_top');"); exit(); } $gchat_id = $p[p_g_id]; $p_id = $p[p_id];
}else{ showscript("alert('帳號錯誤 或 密碼錯誤 或 尚未創造角色');window.open('./','_top');"); exit(); } $timestamp1 = mktime(date("H",filemtime("wog_chat.txt")), date("i",filemtime("wog_chat.txt")), date("s",filemtime("wog_chat.txt")), date("m",filemtime("wog_chat.txt")),date("d",filemtime("wog_chat.txt")), date("Y",filemtime("wog_chat.txt"))); $timestamp2 = mktime(date("H"),date("i"),date("s"), date("m"), date("d"), date("Y")); $answer=($timestamp2-$timestamp1) / (60*60*24); if($answer>0.00694){//超過10分鐘未更新就清空 $fp=fopen("wog_chat.txt","w"); fputs($fp,""); fclose($fp); } //讀取檔案內容 $show=file("wog_chat.txt"); $max=sizeof($show); if($max-25<=0){$min=0;} else{$min=$max-25;} ?> <html>
<head> <meta http-equiv="Content-Type" content="text/html; charset=big5"> <META HTTP-EQUIV="Refresh" CONTENT=10 src="wog_chat_write.php"> <title>即時聊天</title> <style type='text/css'> <!-- table { font-size: 13px; } --> </style> </head> <body bgcolor="#000000" leftmargin="0" topmargin="0" text="#FFFFFF"> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" id="AutoNumber1" width="100%"> <? for($t1=$max;$t1>=$min;$t1--){ $show_word_text=split("#@#",$show[$t1]); //if (trim($show_word_text[0]) == $gchat_id and trim($show_word_text[0]) == "0"){ if (($show_word_text[0]) == $p_id || ($show_word_text[1]) == $p_id || ($show_word_text[2]) == $gchat_id || ($show_word_text[2]) == "0"){ //把顏色和文字分離出來 echo "<tr><td><font color='".trim($show_word_text[3])."'>".StripSlashes(trim($show_word_text[4]))."</td></tr><tr><td width='100%' height='1' bgcolor='#A2A9B8'></td></tr>"; } } ?> </table>
</body>
</html>
其實用Cookie可以減少SQL Query的次數... 如大家希望用Cookie可自行修改... (由於這是舊作品.. 所以.. 也懶修改了.. -.-")
為神麼我都做不出來阿??
我常說:努力一定能獲得優勝
可是最就都...
每個人還是都要靠自己!!
打出自己的一片天唷!!
|