assign('category', $category); } if ($_GET['sort']) { $vsort = mysql_clean(get('sort')); $vsort = str_replace('most_comment', 'comment', $vsort); $sort = lang($vsort); if ($sort != $vsort) { assign('sort', $vsort); } else { $sort = false; } if ($vsort == 'most_recent') { $sort = false; } } $counter = get_counter('channel', $count_query); if (!$counter) { //Collecting Data for Pagination $ucount = $u_cond; $ucount['count_only'] = true; $total_rows = get_users($ucount); $counter = $total_rows; update_counter('channel', $count_query, $counter); } $total_pages = count_pages($counter, CLISTPP); //Pagination $pages->paginate($total_pages, $page); $subtitle = lang('Channels'); if ($category) { $subtitle .= " › " . $category; }
$result_array['order'] = " videoid DESC limit 9 "; $videos = get_videos($result_array); Assign('videos', $videos); */ //Getting Video List $page = mysql_clean($_GET['page']); $get_limit = create_query_limit($page, 9); $vlist = $vid_cond; $count_query = $vid_cond; $vlist['limit'] = $get_limit; $vlist['user'] = $udetails["userid"]; $videos = get_videos($vlist); Assign('videos', $videos); //Collecting Data for Pagination $vcount = $vid_cond; $counter = get_counter('video', $count_query); if (!$counter) { $vcount['count_only'] = true; $total_rows = get_videos($vcount); $total_pages = count_pages($total_rows, VLISTPP); $counter = $total_rows; update_counter('video', $count_query, $counter); } $total_pages = count_pages($counter, VLISTPP); //Pagination $link == NULL; $extra_params = NULL; $tag = '<li><a #params#>#page#</a><li>'; $pages->paginate($total_pages, $page, $link, $extra_params, $tag); // pulls user profile $profile = $userquery->get_user_profile($udetails['userid']);
function combat($active = 1, $wep_kind = '') { global $log, $mode, $main, $cmd, $battle_title, $db, $tablepre, $pls, $message, $now, $w_log, $nosta, $hdamage, $hplayer; global $pid, $name, $club, $inf, $lvl, $exp, $killnum, $bid, $tactic, $pose, $hp, $mhp; global $wep, $wepk, $wepe, $weps, $wepsk; global $edata, $w_pid, $w_name, $w_pass, $w_type, $w_endtime, $w_deathtime, $w_gd, $w_sNo, $w_icon, $w_club, $w_hp, $w_mhp, $w_sp, $w_msp, $w_att, $w_def, $w_pls, $w_lvl, $w_exp, $w_money, $w_bid, $w_inf, $w_rage, $w_pose, $w_tactic, $w_killnum, $w_state, $w_wp, $w_wk, $w_wg, $w_wc, $w_wd, $w_wf, $w_teamID, $w_teamPass; global $w_wep, $w_wepk, $w_wepe, $w_weps, $w_arb, $w_arbk, $w_arbe, $w_arbs, $w_arh, $w_arhk, $w_arhe, $w_arhs, $w_ara, $w_arak, $w_arae, $w_aras, $w_arf, $w_arfk, $w_arfe, $w_arfs, $w_art, $w_artk, $w_arte, $w_arts, $w_itm0, $w_itmk0, $w_itme0, $w_itms0, $w_itm1, $w_itmk1, $w_itme1, $w_itms1, $w_itm2, $w_itmk2, $w_itme2, $w_itms2, $w_itm3, $w_itmk3, $w_itme3, $w_itms3, $w_itm4, $w_itmk4, $w_itme4, $w_itms4, $w_itm5, $w_itmk5, $w_itme5, $w_itms5, $w_itm6, $w_itmk6, $w_itme6, $w_itms6, $w_wepsk, $w_arbsk, $w_arhsk, $w_arask, $w_arfsk, $w_artsk, $w_itmsk0, $w_itmsk1, $w_itmsk2, $w_itmsk3, $w_itmsk4, $w_itmsk5, $w_itmsk6; global $infinfo, $w_combat_inf; global $rp, $w_rp, $action, $w_action, $achievement, $w_achievement, $skills, $w_skills, $skillpoint, $w_skillpoint; $battle_title = '战斗发生'; if (!$wep_kind) { $w1 = substr($wepk, 1, 1); $w2 = substr($wepk, 2, 1); if (($w1 == 'G' || $w1 == 'J') && $weps == $nosta) { $wep_kind = $w2 ? $w2 : 'P'; } else { $wep_kind = $w1; } } elseif (strpos($wepk, $wep_kind) === false && $wep_kind != 'back') { $wep_kind = substr($wepk, 1, 1); } $wep_temp = $wep; include_once GAME_ROOT . './include/game/clubskills.func.php'; if ($active) { if ($wep_kind == 'back') { $log .= "你逃跑了。"; $action = ''; $mode = 'command'; return; } $enemyid = $active ? str_replace('enemy', '', $action) : $bid; if (!$enemyid || strpos($action, 'enemy') === false) { $log .= "<span class=\"yellow\">你没有遇到敌人,或已经离开战场!</span><br>"; $action = ''; $mode = 'command'; return; } $result = $db->query("SELECT * FROM {$tablepre}players WHERE pid='{$enemyid}'"); if (!$db->num_rows($result)) { $log .= "对方不存在!<br>"; $action = ''; $mode = 'command'; return; } $edata = $db->fetch_array($result); if ($edata['pls'] != $pls) { $log .= "<span class=\"yellow\">" . $edata['name'] . "</span>已经离开了<span class=\"yellow\">{$plsinfo[$pls]}</span>。<br>"; $action = ''; $mode = 'command'; return; } elseif ($edata['hp'] <= 0) { global $corpseprotect, $gamestate; $log .= "<span class=\"red\">" . $edata['name'] . "</span>已经死亡,不能被攻击。<br>"; if ($edata['endtime'] < $now - $corpseprotect && $gamestate < 40) { $action = 'corpse' . $edata['pid']; include_once GAME_ROOT . './include/game/battle.func.php'; findcorpse($edata); } //$action = ''; return; } if ($message) { // foreach ( Array('<','>',';',',') as $value ) { // if(strpos($message,$value)!==false){ // $message = str_replace ( $value, '', $message ); // } // } $log .= "<span class=\"lime\">你对{$edata['name']}大喊:{$message}</span><br>"; if (!$edata['type']) { $w_log = "<span class=\"lime\">{$name}对你大喊:{$message}</span><br>"; logsave($edata['pid'], $now, $w_log, 'c'); } } extract($edata, EXTR_PREFIX_ALL, 'w'); init_battle(1); include_once GAME_ROOT . './include/game/attr.func.php'; $log .= "你向<span class=\"red\">{$w_name}</span>发起了攻击!<br>"; $att_dmg = attack($wep_kind, 1); global $ggflag; if ($ggflag) { return; } $w_hp -= $att_dmg; if ($w_hp > 0 && $w_tactic != 4 && $w_pose != 5) { global $rangeinfo; $w_w1 = substr($w_wepk, 1, 1); $w_w2 = substr($w_wepk, 2, 1); if (($w_w1 == 'G' || $w_w1 == 'J') && $w_weps == $nosta) { $w_wep_kind = $w_w2 ? $w_w2 : 'P'; } else { $w_wep_kind = $w_w1; } //if (($rangeinfo [$wep_kind] == $rangeinfo [$w_wep_kind]) || ($rangeinfo [$w_wep_kind] == 'M')) { if ($rangeinfo[$wep_kind] <= $rangeinfo[$w_wep_kind] && $rangeinfo[$wep_kind] !== 0) { $counter = get_counter($w_wep_kind, $w_tactic, $w_club, $w_inf); $counter *= get_clubskill_bonus_counter($w_club, $w_skills, 'w_', $club, $skills, ''); $counter_dice = rand(0, 99); if ($counter_dice < $counter) { $log .= "<span class=\"red\">{$w_name}的反击!</span><br>"; $log .= npc_chat($w_type, $w_name, 'defend'); $def_dmg = defend($w_wep_kind); } else { $log .= npc_chat($w_type, $w_name, 'escape'); $log .= "<span class=\"red\">{$w_name}处于无法反击的状态,逃跑了!</span><br>"; } } else { $log .= npc_chat($w_type, $w_name, 'cannot'); $log .= "<span class=\"red\">{$w_name}攻击范围不足,不能反击,逃跑了!</span><br>"; } } elseif ($w_hp > 0) { $log .= "<span class=\"red\">{$w_name}逃跑了!</span><br>"; } } else { $result = $db->query("SELECT * FROM {$tablepre}players WHERE pid='{$bid}'"); $edata = $db->fetch_array($result); extract($edata, EXTR_PREFIX_ALL, 'w'); init_battle(1); include_once GAME_ROOT . './include/game/attr.func.php'; $log .= "<span class=\"red\">{$w_name}</span>突然向你袭来!<br>"; $log .= npc_chat($w_type, $w_name, 'attack'); npc_changewep(); $w_w1 = substr($w_wepk, 1, 1); $w_w2 = substr($w_wepk, 2, 1); if (($w_w1 == 'G' || $w_w1 == 'J') && $w_weps == $nosta) { $w_wep_kind = $w_w2 ? $w_w2 : 'P'; } else { $w_wep_kind = $w_w1; } $def_dmg = defend($w_wep_kind, 1); if ($hp > 0 && $tactic != 4 && $pose != 5) { global $rangeinfo; if ($rangeinfo[$wep_kind] >= $rangeinfo[$w_wep_kind] && $rangeinfo[$w_wep_kind] !== 0) { $counter = get_counter($wep_kind, $tactic, $club, $inf); $counter *= get_clubskill_bonus_counter($club, $skills, '', $w_club, $w_skills, 'w_'); $counter_dice = rand(0, 99); if ($counter_dice < $counter) { $log .= "<span class=\"red\">你的反击!</span><br>"; $wep_kind = substr($wepk, 1, 1); $att_dmg = attack($wep_kind); $w_hp -= $att_dmg; } else { $log .= "<span class=\"red\">你处于无法反击的状态,逃跑了!</span><br>"; } } else { $log .= "<span class=\"red\">你攻击范围不足,不能反击,逃跑了!</span><br>"; } } elseif ($hp > 0) { $log .= "<span class=\"red\">你逃跑了!</span><br>"; } } if ($hp == 0 && !$w_action) { $w_action = 'pacorpse' . $pid; } w_save($w_pid); $att_dmg = $att_dmg ? $att_dmg : 0; $def_dmg = $def_dmg ? $def_dmg : 0; if (!$w_type) { $w_inf_log = ''; if ($w_combat_inf) { global $exdmginf; foreach ($exdmginf as $inf_ky => $w_inf_words) { if (strpos($w_combat_inf, $inf_ky) !== false) { $w_inf_log .= "敌人的攻击造成你{$w_inf_words}了!<br>"; } } } if ($active) { $w_log = "手持<span class=\"red\">{$wep_temp}</span>的<span class=\"yellow\">{$name}</span>向你袭击!<br>你受到其<span class=\"yellow\">{$att_dmg}</span>点攻击,对其做出了<span class=\"yellow\">{$def_dmg}</span>点反击。<br>{$w_inf_log}"; } else { $w_log = "你发现了手持<span class=\"red\">{$wep_temp}</span>的<span class=\"yellow\">{$name}</span>并且先发制人!<br>你对其做出<span class=\"yellow\">{$def_dmg}</span>点攻击,受到其<span class=\"yellow\">{$att_dmg}</span>点反击。<br>{$w_inf_log}"; } if ($hp == 0) { $w_log .= "<span class=\"yellow\">{$name}</span><span class=\"red\">被你杀死了!</span><br>"; //include_once GAME_ROOT.'./include/game/achievement.func.php'; //check_battle_achievement($w_achievement,$w_type,$name); } logsave($w_pid, $now, $w_log, 'b'); } if ($att_dmg > $hdamage && $att_dmg >= $def_dmg) { $hdamage = $att_dmg; $hplayer = $name; save_combatinfo(); } elseif ($def_dmg > $hdamage && !$w_type) { $hdamage = $def_dmg; $hplayer = $w_name; save_combatinfo(); } //$bid = $w_pid; if ($w_hp <= 0 && $w_club != 99) { $w_bid = $pid; $w_hp = 0; if ($w_type == 0) { $killnum++; } include_once GAME_ROOT . './include/state.func.php'; $killmsg = kill($wep_kind, $w_name, $w_type, $w_pid, $wep_temp); $log .= npc_chat($w_type, $w_name, 'death'); include_once GAME_ROOT . './include/game/achievement.func.php'; check_battle_achievement($name, $w_type, $w_name, $wep_temp); $log .= "<span class=\"red\">{$w_name}被你杀死了!</span><br>"; //$rp = $rp + 20 ; if (!$w_type) { $rpup = $w_rp; } else { $rpup = 20; } if ($club == 19) { $rpdec = 30; $rpdec += get_clubskill_rp_dec($club, $skills); $rp += round($rpup * (100 - $rpdec) / 100); } else { $rp += $rpup; } if ($killmsg) { $log .= "<span class=\"yellow\">你对{$w_name}说:“{$killmsg}”</span><br>"; } include_once GAME_ROOT . './include/game/battle.func.php'; $result = $db->query("SELECT * FROM {$tablepre}players WHERE pid='{$w_pid}'"); $cdata = $db->fetch_array($result); $action = 'corpse' . $edata['pid']; findcorpse($cdata); return; } else { if ($w_hp <= 0) { //有第二阶段 if ($w_type) { $log .= npc_chat($w_type, $w_name, 'death'); include_once GAME_ROOT . './include/system.func.php'; $npcdata = evonpc($w_type, $w_name); $log .= '<span class="yellow">' . $w_name . '却没死去,反而爆发出真正的实力!</span><br>'; if ($npcdata) { addnews($now, 'evonpc', $w_name, $npcdata['name'], $name); foreach ($npcdata as $key => $val) { ${'w_' . $key} = $val; } } } else { include_once GAME_ROOT . './include/state.func.php'; $killmsg = kill($wep_kind, $w_name, $w_type, $w_pid, $wep_temp); $log .= '<span class="yellow">' . $w_name . '由于其及时按了BOMB键而原地满血复活了!</span><br>'; } } $main = 'battle'; init_battle(1); if (CURSCRIPT !== 'botservice') { include template('battleresult'); //$cmd = '<br><br><input type="hidden" name="mode" value="command"><input type="radio" name="command" id="back" value="back" checked><a onclick=sl("back"); href="javascript:void(0);" >确定</a><br>'; $cmd = ob_get_contents(); ob_clean(); //$bid = $hp <= 0 ? $bid : 0; } $action = ''; return; } }
<? session_start(); error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING); #################################### # # COPYRIGHT BY Sebastian Harke 2010 # #################################### ######### GET Variabeln ############ $cat=stripslashes($_GET["c"]); $mod=stripslashes($_GET["m"]); $page=stripslashes($_GET["s"]); $q=stripslashes($_GET["q"]); $suchtag = str_replace("-", "+",$cat); ########## Includes ################# include('configs/config.inc.php'); include("configs/functions.inc.php"); include("configs/class_page.php"); include("configs/class_template.php"); $gp = new Page; include("configs/class_system.php"); include("configs/class_breadcrumb.php"); ########## Counter ################## if(get_setting_data("counter")=="1") { get_counter(); } ###### Installationsverzeichnis###### if(is_dir('install')=="1"){ if(get_setting_data("url")==""){ $warning="<a href='".$_SERVER['REQUEST_URI']."install/'>drawWEBKATALOG installieren</a>"; }else{ $warning="Installationsverzeichnis löschen"; } echo '<div style="color:#404040;background-color:#caedfc;border:1px solid #CCCCCC;padding:10px;font-size:18px;font-family:Verdana,Arial,Helvetica,sans-serif;">'.$warning.'</div>'; } ########## Layout ################### include($page_layout_path_index); ?>
} else { $error = 'Возникла ошибка при обновлении счетчика'; } } // удаление счетчика if ($_GET['action'] == 'delete') { terminator(); } ?> <?php // Вывод списка счетчиков if ($_GET['action'] == 'list' && empty($error)) { $limit = '15'; $counter_list = get_counters($limit); $status = array(0 => 'отключен', 'активен'); $tpl = "stats_list_tpl.php"; } // Добавление нового или изменение существующего счетчика if ($_GET['action'] == 'add' || $_GET['action'] == 'edit' && empty($error)) { // если выбрано изменение счетчика, делаем дополнительный запрос if ($_GET['action'] == 'edit' && isset($_GET['id'])) { $counter = get_counter($_GET['id']); } $tpl = "stats_add_tpl.php"; } include "stats_main_tpl.php";