這次的外掛改起來比較繁雜,請耐心的安裝吧^^"
本程式以更新為最新版本,安裝完畢後可不必安裝下列的DEBUG
範例圖片1
範例圖片2
範例圖片3
在您的資料庫中輸入下列語法
- 代碼: 選擇全部
CREATE TABLE `wog_group_style` (
`g_id` INT( 10 ) UNSIGNED NOT NULL ,
`g_s_lv` SMALLINT( 2 ) UNSIGNED DEFAULT '0' NOT NULL ,
`g_s_name` VARCHAR( 10 ) NOT NULL
);
ALTER TABLE `wog_player` ADD `p_g_lv` SMALLINT( 2 ) UNSIGNED DEFAULT '0' NOT NULL ;
開啟檔案wog/wog.js
尋找
- 代碼: 選擇全部
var p_group="";
後面,加上
- 代碼: 選擇全部
var p_style="";
尋找
- 代碼: 選擇全部
function act_click(f,a,b)
改成
- 代碼: 選擇全部
function act_click(f,a,b,c)
尋找
- 代碼: 選擇全部
thisfrom.temp_id.value=b;
後面,加上
- 代碼: 選擇全部
thisfrom.temp_id2.value=c;
尋找
- 代碼: 選擇全部
view_name.write('<tr><td><input type="button" value="認領會員" onClick="parent.act_click(\'group\',\'get_member\')"></td><td class=b1><--核准入會申請<會長專用></td></tr>');
後面,加上
- 代碼: 選擇全部
view_name.write('<tr><td><input type="button" value="頭銜授予" onClick="parent.act_click(\'group\',\'set_style_view\')"></td><td class=b1><--設定所有的頭銜<會長專用></td></tr>');
view_name.write('<tr><td><input type="button" value="頭銜設定" onClick="parent.act_click(\'group\',\'style\')"></td><td class=b1><--設定所有的頭銜<會長專用></td></tr>');
尋找
- 代碼: 選擇全部
function group_p_act(temp_d,morale,number)
前面,加上
- 代碼: 選擇全部
function group_style_view(temp,page)
{
var view_name=parent.wog_view.document;
message_cls();
view_name.write(temp_table1);
view_name.write('<form action="wog_act.php" method="post" target="mission">');
if(!page)
{
view_name.write('<tr><td width=10%>位階排行</td><td width=60%>名稱</td><td width=30%>更改</td></tr>');
var s1=temp.split(";");
for(var a=0;a<10;a++)
{
if(s1[a])
{
s2=s1[a].split(",");
view_name.write('<tr><td>'+s2[1]+'</td><td>'+s2[0]+'</td><td><input type="button" value="修改" onClick="parent.act_click(\'group\',\'chang_style\','+s2[1]+')"><input type="button" value="刪除" onClick="parent.act_click(\'group\',\'removal_style\','+s2[1]+')"></td></tr>');
}else
{
var b=a+1;
view_name.write('<tr><td>'+b+'</td><td>未設定</td><td><input type="button" value="修改" onClick="parent.act_click(\'group\',\'chang_style\','+b+')"></td></tr>');
}
}
}else
{
view_name.write('<tr><td width=10%>位階排行</td><td width=60%>名稱</td><td width=30%>更改</td></tr>');
s=temp.split(",");
view_name.write('<tr><td>'+s[1]+'</td><td><input type="text" name="chang" value="'+s[0]+'"></td><td><input type=button value="修改" onClick="parent.act_click(\'group\',\'save_style\',this.form.chang.value,'+s[1]+')"></td></tr>');
view_name.write('<input type="hidden" name="level" value="'+s[1]+'">');
}
view_name.write('</form>');
view_name.write(temp_table2);
}
function group_style_set_view(temp,page,player)
{
var view_name=parent.wog_view.document;
message_cls();
view_name.write(temp_table1);
view_name.write('<form action="wog_act.php" method="post" target="mission">');
if(!page)
{
view_name.write('<tr><td width=60%>會員名稱</td><td width=10%>頭銜有無</td><td width=30%>頭銜</td></tr>');
var s1=temp.split(";");
for(var a=0;a<s1.length;a++)
{
var s2=s1[a].split(",");
if(s2[2]==0){var p_style="無";}else{var p_style="有";}
view_name.write('<tr><td>'+s2[1]+'</td><td>'+p_style+'</td><td><input type="button" value="授與" onClick="parent.act_click(\'group\',\'set_style_chang\','+s2[0]+')"><input type="button" value="取消" onClick="parent.act_click(\'group\',\'set_style_removal\','+s2[0]+')"></td></tr>');
}
}else
{
view_name.write('<tr><td width=10%>名稱</td><td width=60%>選擇頭銜</td><td width=30%>更改</td></tr>');
view_name.write('<tr><td>'+player+'</td><td><select name="set_style">');
var s1=temp.split(";");
for(var a=0;a<s1.length;a++)
{
var s2=s1[a].split(",");
if(s2[2]){var p_check="style='background-color:#ffff00'";}else{var p_check="";}
view_name.write('<option value='+s2[1]+' '+p_check+'>'+s2[0]+'</option>');
}
view_name.write('</select></td><td><input type=submit value="修改"></td></tr>');
view_name.write('<input type="hidden" name="f" value="group">');
view_name.write('<input type="hidden" name="act" value="set_style_save">');
view_name.write('<input type="hidden" name="p_name" value="'+player+'">');
}
view_name.write('</form>');
view_name.write(temp_table2);
}
尋找
- 代碼: 選擇全部
'+p_group+'<br>
後面,加上
- 代碼: 選擇全部
'+p_style+'<br>
開啟檔案wog/wog_act.php
尋找
- 代碼: 選擇全部
case "save_book":
group_book_save($HTTP_COOKIE_VARS["wog_cookie"]);
break;
後面,加上
- 代碼: 選擇全部
case "style":
group_style_view($HTTP_COOKIE_VARS["wog_cookie"]);
break;
case "chang_style":
group_style_chang($HTTP_COOKIE_VARS["wog_cookie"]);
break;
case "save_style":
group_style_save($HTTP_COOKIE_VARS["wog_cookie"]);
break;
case "set_style_view":
group_style_set_view($HTTP_COOKIE_VARS["wog_cookie"]);
break;
case "set_style_chang":
group_style_set_chang($HTTP_COOKIE_VARS["wog_cookie"]);
break;
case "set_style_save":
group_style_set_save($HTTP_COOKIE_VARS["wog_cookie"]);
break;
case "set_style_removal":
group_style_set_removal($HTTP_COOKIE_VARS["wog_cookie"]);
break;
case "removal_style":
group_style_removal($HTTP_COOKIE_VARS["wog_cookie"]);
break;
尋找
- 代碼: 選擇全部
//######################## group_fire_set begin #################
前面,加上
- 代碼: 選擇全部
//######################## group_style_view begin ###########################
function group_style_view($user_id)
{
$wog_act_class = new wog_act_group;
$wog_act_class->group_style_view($user_id);
}
//######################## group_style_chang begin ###########################
function group_style_chang($user_id)
{
$wog_act_class = new wog_act_group;
$wog_act_class->group_style_chang($user_id);
}
//######################## group_style_save begin ###########################
function group_style_save($user_id)
{
$wog_act_class = new wog_act_group;
$wog_act_class->group_style_save($user_id);
}
//######################## group_style_set_view begin ###########################
function group_style_set_view($user_id)
{
$wog_act_class = new wog_act_group;
$wog_act_class->group_style_set_view($user_id);
}
//######################## group_style_set_chang begin ###########################
function group_style_set_chang($user_id)
{
$wog_act_class = new wog_act_group;
$wog_act_class->group_style_set_chang($user_id);
}
//######################## group_style_set_save begin ###########################
function group_style_set_save($user_id)
{
$wog_act_class = new wog_act_group;
$wog_act_class->group_style_set_save($user_id);
}
//######################## group_style_set_removal begin ###########################
function group_style_set_removal($user_id)
{
$wog_act_class = new wog_act_group;
$wog_act_class->group_style_set_removal($user_id);
}
//######################## group_style_removal begin ###########################
function group_style_removal($user_id)
{
$wog_act_class = new wog_act_group;
$wog_act_class->group_style_removal($user_id);
}
開啟檔案wog/class/wog_act_group.php
尋找
- 代碼: 選擇全部
}
?>
前面,加上
- 代碼: 選擇全部
function group_style_view($user_id)
{
global $DB_site,$_POST,$wog_arry,$lang;
$group=$DB_site->query_first("select p_g_id from wog_player where p_id=".$user_id."");
if($group['p_g_id']==0){alertWindowMsg($lang['wog_act_group_nogroup']);}
$group=$DB_site->query_first("select a.g_id,a.g_adm_id1 from wog_group_main a,wog_player b where a.g_id=b.p_g_id and b.p_id=".$user_id."");
if($group['g_adm_id1']!=$user_id){alertWindowMsg($lang['wog_act_group_nolyadmin']);}
$group2=$DB_site->query("select g_s_lv,g_s_name from wog_group_style where g_id=".$group[g_id]." order by g_s_lv asc");
while($styles=$DB_site->fetch_array($group2))
{
$s.=";".stripslashes($styles[g_s_name]).",".$styles[g_s_lv];
}
$s=substr($s,1,strlen($s));
showscript("parent.group_style_view('$s')");
unset($group);
unset($group2);
}
function group_style_chang($user_id)
{
global $DB_site,$wog_arry,$lang;
$p_group=$DB_site->query_first("select p_g_id from wog_player where p_id=".$user_id."");
$group=$DB_site->query_first("select g_s_lv,g_s_name from wog_group_style where g_s_lv=".$_POST['temp_id']." and g_id=".$p_group[p_g_id]."");
if(!$group){$s=",".$_POST['temp_id'];}else{$s=stripslashes($group[g_s_name]).",".$group[g_s_lv];}
showscript("parent.group_style_view('$s',1)");
unset($group);
}
function group_style_save($user_id)
{
global $DB_site,$_POST,$wog_arry,$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=".$user_id);
if(!$group_main){alertWindowMsg($lang['wog_act_group_nogroup']);}
if($user_id!=$group_main["g_adm_id1"]){alertWindowMsg($lang['wog_act_group_nolyadmin']);}
$g_id=$group_main['g_id'];
$chang=$_POST["temp_id"];
$group=$DB_site->query_first('select g_s_lv from wog_group_style where g_s_lv='.$_POST["temp_id2"].' and g_id='.$g_id);
if($group)
{
$DB_site->query('update wog_group_style set g_s_name="'.addslashes($chang).'" where g_id='.$g_id.' and g_s_lv='.$_POST["temp_id2"]);
}else
{
$DB_site->query("insert wog_group_style(g_id,g_s_lv,g_s_name)values(".$g_id.",".$_POST["temp_id2"].",'".addslashes($chang)."')");
}
$this->group_style_view($user_id);
}
function group_style_set_view($user_id)
{
global $DB_site,$lang;
$group_main=$DB_site->query_first("select a.g_id,a.g_adm_id1 from wog_group_main a,wog_player b where a.g_id=b.p_g_id and b.p_id=".$user_id."");
if(!$group_main){alertWindowMsg($lang['wog_act_group_nogroup']);}
if($user_id!=$group_main["g_adm_id1"]){alertWindowMsg($lang['wog_act_group_nolyadmin']);}
$temp_s="";
$get_peo=$DB_site->query("select p_id,p_name,p_g_lv from wog_player where p_g_id=".$group_main['g_id']." ");
while($list_peo=$DB_site->fetch_array($get_peo))
{
$temp_s.=";".$list_peo["p_id"].",".$list_peo["p_name"].",".$list_peo["p_g_lv"];
}
if(!$temp_s){alertWindowMsg('玩家等級不足,無法授予頭銜。');}
$temp_s=substr($temp_s,1,strlen($temp_s));
showscript("parent.group_style_set_view('$temp_s')");
unset($temp_s);
unset($group_main);
unset($list_peo);
}
function group_style_set_chang($user_id)
{
global $DB_site,$_POST,$lang;
if(!$_POST['temp_id']){alertWindowMsg('請選擇會員');}
$player=$DB_site->query_first("select p_id,p_g_id,p_g_lv from wog_player where p_id=".$_POST['temp_id']."");
if(!$player){alertWindowMsg('該玩家不存在');}
$style=$DB_site->query("select g_s_name,g_s_lv from wog_group_style where g_id=".$player[p_g_id]."");
while($style_get=$DB_site->fetch_array($style))
{
$style_list.=";".$style_get["g_s_name"].",".$style_get["g_s_lv"];
if($player['p_g_lv']==$style_get['g_s_lv']){$style_list.=",CHECKED";}
}
$style_list=substr($style_list,1,strlen($style_list));
if(!$style_list){alertWindowMsg('沒有設定封號');}
showscript("parent.group_style_set_view('$style_list',1,'$player[p_id]')");
unset($temp_s);
unset($player);
unset($style_list);
}
function group_style_set_save($user_id)
{
global $DB_site,$_POST,$wog_arry,$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=".$user_id);
if(!$group_main){alertWindowMsg($lang['wog_act_group_nogroup']);}
if($user_id!=$group_main["g_adm_id1"]){alertWindowMsg($lang['wog_act_group_nolyadmin']);}
$g_id=$group_main['g_id'];
$set_style=$_POST["set_style"];
$DB_site->query('update wog_player set p_g_lv='.$set_style.' where p_id='.$_POST["p_name"].'');
$this->group_style_set_view($user_id);
}
function group_style_set_removal($user_id)
{
global $DB_site,$_POST,$wog_arry,$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=".$user_id);
if(!$group_main){alertWindowMsg($lang['wog_act_group_nogroup']);}
if($user_id!=$group_main["g_adm_id1"]){alertWindowMsg($lang['wog_act_group_nolyadmin']);}
$g_id=$group_main['g_id'];
$p_removal=$_POST["temp_id"];
$DB_site->query('update wog_player set p_g_lv=0 where p_id='.$p_removal.'');
$this->group_style_set_view($user_id);
}
function group_style_removal($user_id)
{
global $DB_site,$_POST,$wog_arry,$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=".$user_id);
if(!$group_main){alertWindowMsg($lang['wog_act_group_nogroup']);}
if($user_id!=$group_main["g_adm_id1"]){alertWindowMsg($lang['wog_act_group_nolyadmin']);}
$g_id=$group_main['g_id'];
$s_removal=$_POST["temp_id"];
$DB_site->query('delete from wog_group_style where g_id='.$g_id.' and g_s_lv='.$s_removal.'');
$this->group_style_view($user_id);
}
開啟檔案wog/class/wog_act_chara.php
尋找
- 代碼: 選擇全部
$this->group_id=$p["g_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."");
尋找
- 代碼: 選擇全部
if($s==1)
前面,加上
- 代碼: 選擇全部
echo "parent.p_style='".$p_style["g_s_name"]."';";
儲存,關閉所有檔案。
完畢,有問題請提出。